<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/virtio, branch v3.1</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/virtio?h=v3.1</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/virtio?h=v3.1'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-07-23T06:50:30Z</updated>
<entry>
<title>virtio: expose for non-virtualization users too</title>
<updated>2011-07-23T06:50:30Z</updated>
<author>
<name>Ohad Ben-Cohen</name>
<email>ohad@wizery.com</email>
</author>
<published>2011-07-05T14:06:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e72542191cbba4cf7fda21cb22e26b42d7415daf'/>
<id>urn:sha1:e72542191cbba4cf7fda21cb22e26b42d7415daf</id>
<content type='text'>
virtio has been so far used only in the context of virtualization,
and the virtio Kconfig was sourced directly by the relevant arch
Kconfigs when VIRTUALIZATION was selected.

Now that we start using virtio for inter-processor communications,
we need to source the virtio Kconfig outside of the virtualization
scope too.

Moreover, some architectures might use virtio for both virtualization
and inter-processor communications, so directly sourcing virtio
might yield unexpected results due to conflicting selections.

The simple solution offered by this patch is to always source virtio's
Kconfig in drivers/Kconfig, and remove it from the appropriate arch
Kconfigs. Additionally, a virtio menu entry has been added so virtio
drivers don't show up in the general drivers menu.

This way anyone can use virtio, though it's arguably less accessible
(and neat!) for virtualization users now.

Note: some architectures (mips and sh) seem to have a VIRTUALIZATION
menu merely for sourcing virtio's Kconfig, so that menu is removed too.

Signed-off-by: Ohad Ben-Cohen &lt;ohad@wizery.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>virtio: add api for delayed callbacks</title>
<updated>2011-05-30T01:44:16Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2011-05-19T23:11:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7ab358c23cbf15cea08129cd722d1ce77433a94d'/>
<id>urn:sha1:7ab358c23cbf15cea08129cd722d1ce77433a94d</id>
<content type='text'>
Add an API that tells the other side that callbacks
should be delayed until a lot of work has been done.
Implement using the new event_idx feature.

Note: it might seem advantageous to let the drivers
ask for a callback after a specific capacity has
been reached. However, as a single head can
free many entries in the descriptor table,
we don't really have a clue about capacity
until get_buf is called. The API is the simplest
to implement at the moment, we'll see what kind of
hints drivers can pass when there's more than one
user of the feature.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>virtio_ring: support event idx feature</title>
<updated>2011-05-30T01:44:15Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2011-05-19T23:10:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a5c262c5fd83ece01bd649fb08416c501d4c59d7'/>
<id>urn:sha1:a5c262c5fd83ece01bd649fb08416c501d4c59d7</id>
<content type='text'>
Support for the new event idx feature:
1. When enabling interrupts, publish the current avail index
   value to the host to get interrupts on the next update.
2. Use the new avail_event feature to reduce the number
   of exits from the guest.

Simple test with the simulator:

[virtio]# time ./virtio_test
spurious wakeus: 0x7

real    0m0.169s
user    0m0.140s
sys     0m0.019s
[virtio]# time ./virtio_test --no-event-idx
spurious wakeus: 0x11

real    0m0.649s
user    0m0.295s
sys     0m0.335s

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>virtio balloon: kill tell-host-first logic</title>
<updated>2011-05-30T01:44:13Z</updated>
<author>
<name>Dave Hansen</name>
<email>dave@linux.vnet.ibm.com</email>
</author>
<published>2011-04-07T17:43:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bf50e69f63d21091e525185c3ae761412be0ba72'/>
<id>urn:sha1:bf50e69f63d21091e525185c3ae761412be0ba72</id>
<content type='text'>
The virtio balloon driver has a VIRTIO_BALLOON_F_MUST_TELL_HOST
feature bit.  Whenever the bit is set, the guest kernel must
always tell the host before we free pages back to the allocator.
Without this feature, we might free a page (and have another
user touch it) while the hypervisor is unprepared for it.

But, if the bit is _not_ set, we are under no obligation to
reverse the order; we're under no obligation to do _anything_.
As of now, qemu-kvm defines the bit, but doesn't set it.

This patch makes the "tell host first" logic the only case.  This
should make everybody happy, and reduce the amount of untested or
untestable code in the kernel.

This _also_ means that we don't have to preserve a pfn list
after the pages are freed, which should let us get rid of some
temporary storage (vb-&gt;pfns) eventually.

Signed-off-by: Dave Hansen &lt;dave@linux.vnet.ibm.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>virtio_pci: Prevent double-free of pci regions after device hot-unplug</title>
<updated>2011-04-21T13:27:00Z</updated>
<author>
<name>Amit Shah</name>
<email>amit.shah@redhat.com</email>
</author>
<published>2011-03-14T12:15:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=31a3ddda166cda86d2b5111e09ba4bda5239fae6'/>
<id>urn:sha1:31a3ddda166cda86d2b5111e09ba4bda5239fae6</id>
<content type='text'>
In the case where a virtio-console port is in use (opened by a program)
and a virtio-console device is removed, the port is kept around but all
the virtio-related state is assumed to be gone.

When the port is finally released (close() called), we call
device_destroy() on the port's device.  This results in the parent
device's structures to be freed as well.  This includes the PCI regions
for the virtio-console PCI device.

Once this is done, however, virtio_pci_release_dev() kicks in, as the
last ref to the virtio device is now gone, and attempts to do

     pci_iounmap(pci_dev, vp_dev-&gt;ioaddr);
     pci_release_regions(pci_dev);
     pci_disable_device(pci_dev);

which results in a double-free warning.

Move the code that releases regions, etc., to the virtio_pci_remove()
function, and all that's now left in release_dev is the final freeing of
the vp_dev.

Signed-off-by: Amit Shah &lt;amit.shah@redhat.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>virtio: Decrement avail idx on buffer detach</title>
<updated>2011-04-21T13:27:00Z</updated>
<author>
<name>Amit Shah</name>
<email>amit.shah@redhat.com</email>
</author>
<published>2011-03-16T13:42:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b3258ff1d6086bd2b9eeb556844a868ad7d49bc8'/>
<id>urn:sha1:b3258ff1d6086bd2b9eeb556844a868ad7d49bc8</id>
<content type='text'>
When detaching a buffer from a vq, the avail.idx value should be
decremented as well.

This was noticed by hot-unplugging a virtio console port and then
plugging in a new one on the same number (re-using the vqs which were
just 'disowned').  qemu reported

   'Guest moved used index from 0 to 256'

when any IO was attempted on the new port.

CC: stable@kernel.org
Reported-by: juzhang &lt;juzhang@redhat.com&gt;
Signed-off-by: Amit Shah &lt;amit.shah@redhat.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>virtio: remove virtio-pci root device</title>
<updated>2011-01-20T11:07:30Z</updated>
<author>
<name>Milton Miller</name>
<email>miltonm@bga.com</email>
</author>
<published>2011-01-07T08:55:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8b3bb3ecf1934ac4a7005ad9017de1127e2fbd2f'/>
<id>urn:sha1:8b3bb3ecf1934ac4a7005ad9017de1127e2fbd2f</id>
<content type='text'>
We sometimes need to map between the virtio device and
the given pci device. One such use is OS installer that
gets the boot pci device from BIOS and needs to
find the relevant block device. Since it can't,
installation fails.

Instead of creating a top-level devices/virtio-pci
directory, create each device under the corresponding
pci device node.  Symlinks to all virtio-pci
devices can be found under the pci driver link in
bus/pci/drivers/virtio-pci/devices, and all virtio
devices under drivers/bus/virtio/devices.

Signed-off-by: Milton Miller &lt;miltonm@bga.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Tested-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Gleb Natapov &lt;gleb@redhat.com&gt;
Tested-by: "Daniel P. Berrange" &lt;berrange@redhat.com&gt;
Cc: stable@kernel.org
</content>
</entry>
<entry>
<title>virtio: fix format of sysfs driver/vendor files</title>
<updated>2010-11-24T04:51:12Z</updated>
<author>
<name>Stephen Hemminger</name>
<email>shemminger@vyatta.com</email>
</author>
<published>2010-11-10T06:20:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=be6528b2e58d92ef2ffed6f130e2d42bb85dbf29'/>
<id>urn:sha1:be6528b2e58d92ef2ffed6f130e2d42bb85dbf29</id>
<content type='text'>
The sysfs files for virtio produce the wrong format and are missing
the required newline. The output for virtio bus vendor/device should
have the same format as the corresponding entries for PCI devices.

Although this technically changes the ABI for sysfs, these files were
broken to start with!

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>virtio: return correct capacity to users</title>
<updated>2010-11-24T04:51:11Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2010-11-04T12:24:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7ae4b866f86f9ab7b99484b56dd303a860ad1cc9'/>
<id>urn:sha1:7ae4b866f86f9ab7b99484b56dd303a860ad1cc9</id>
<content type='text'>
We can't rely on indirect buffers for capacity
calculations because they need a memory allocation
which might fail.  In particular, virtio_net can get
into this situation under stress, and it drops packets
and performs badly.

So return the number of buffers we can guarantee users.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Reported-By: Krishna Kumar2 &lt;krkumar2@in.ibm.com&gt;
</content>
</entry>
<entry>
<title>virtio: fix oops on OOM</title>
<updated>2010-07-26T15:05:31Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2010-07-26T07:25:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1fe9b6fef11771461e69ecd1bc8935a1c7c90cb5'/>
<id>urn:sha1:1fe9b6fef11771461e69ecd1bc8935a1c7c90cb5</id>
<content type='text'>
virtio ring was changed to return an error code on OOM,
but one caller was missed and still checks for vq-&gt;vring.num.
The fix is just to check for &lt;0 error code.

Long term it might make sense to change goto add_head to
just return an error on oom instead, but let's apply
a minimal fix for 2.6.35.

Reported-by: Chris Mason &lt;chris.mason@oracle.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Tested-by: Chris Mason &lt;chris.mason@oracle.com&gt;
Cc: stable@kernel.org # .34.x
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
