<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/virtio/virtio.c, branch linux-3.6.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.6.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.6.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-11-26T20:14:06Z</updated>
<entry>
<title>virtio: Don't access index after unregister.</title>
<updated>2012-11-26T20:14:06Z</updated>
<author>
<name>Cornelia Huck</name>
</author>
<published>2012-11-09T04:24:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=01ae49199e6a67075b53150ecd8dfc627a67183b'/>
<id>urn:sha1:01ae49199e6a67075b53150ecd8dfc627a67183b</id>
<content type='text'>
commit 237242bddc99041e15a4ca51b8439657cadaff17 upstream.

Virtio wants to release used indices after the corresponding
virtio device has been unregistered. However, virtio does not
hold an extra reference, giving up its last reference with
device_unregister(), making accessing dev-&gt;index afterwards
invalid.

I actually saw problems when testing my (not-yet-merged)
virtio-ccw code:

- device_add virtio-net,id=xxx
-&gt; creates device virtio&lt;n&gt; with n&gt;0

- device_del xxx
-&gt; deletes virtio&lt;n&gt;, but calls ida_simple_remove with an
   index of 0

- device_add virtio-net,id=xxx
-&gt; tries to add virtio0, which is still in use...

So let's save the index we want to release before calling
device_unregister().

Signed-off-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Acked-by: Sjur Brændeland &lt;sjur.brandeland@stericsson.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>[SCSI] virtio-scsi: Add vdrv-&gt;scan for post VIRTIO_CONFIG_S_DRIVER_OK LUN scanning</title>
<updated>2012-07-20T07:59:03Z</updated>
<author>
<name>Nicholas Bellinger</name>
</author>
<published>2012-07-11T21:22:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=59057fbc37178f10a196ab7ec170b80273f75a47'/>
<id>urn:sha1:59057fbc37178f10a196ab7ec170b80273f75a47</id>
<content type='text'>
This patch changes virtio-scsi to use a new virtio_driver-&gt;scan() callback
so that scsi_scan_host() can be properly invoked once virtio_dev_probe() has
set add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK) to signal active virtio-ring
operation, instead of from within virtscsi_probe().

This fixes a bug where SCSI LUN scanning for both virtio-scsi-raw and
virtio-scsi/tcm_vhost setups was happening before VIRTIO_CONFIG_S_DRIVER_OK
had been set, causing VIRTIO_SCSI_S_BAD_TARGET to occur.  This fixes a bug
with virtio-scsi/tcm_vhost where LUN scan was not detecting LUNs.

Tested with virtio-scsi-raw + virtio-scsi/tcm_vhost w/ IBLOCK on 3.5-rc2 code.

Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Acked-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>virtio: Use ida to allocate virtio index</title>
<updated>2012-05-22T02:46:12Z</updated>
<author>
<name>Asias He</name>
</author>
<published>2012-05-03T02:20:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=90e03207f468e84258270ad07095ef50f925c17d'/>
<id>urn:sha1:90e03207f468e84258270ad07095ef50f925c17d</id>
<content type='text'>
Current index allocation in virtio is based on a monotonically
increasing variable "index". This means we'll run out of numbers
after a while. E.g. someone crazy doing this in host side.

while(1) {
	hot-plug a virtio device
	hot-unplug the virito devcie
}

Signed-off-by: Asias He &lt;asias@redhat.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>virtio: Add module.h to drivers/virtio users.</title>
<updated>2011-10-31T23:32:14Z</updated>
<author>
<name>Paul Gortmaker</name>
</author>
<published>2011-07-03T20:20:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b5a2c4f1996d1d258ac10897e0bbb57c6904a735'/>
<id>urn:sha1:b5a2c4f1996d1d258ac10897e0bbb57c6904a735</id>
<content type='text'>
Up to now, the module.h header was as hard to keep out as
sunlight.  But we are cleaning that up.  Fix the virtio users
who simply expect module.h to be there in every C file.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</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>
</author>
<published>2010-11-10T06:20:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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: enhance id_matching for virtio drivers</title>
<updated>2009-06-12T12:46:40Z</updated>
<author>
<name>Christian Borntraeger</name>
</author>
<published>2009-05-26T13:46:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e3353853730eb99c56b7b0aed1667d51c0e3699a'/>
<id>urn:sha1:e3353853730eb99c56b7b0aed1667d51c0e3699a</id>
<content type='text'>
This patch allows a virtio driver to use VIRTIO_DEV_ANY_ID for the
device id. This will be used by a test module that can be bound to
any virtio device.

Signed-off-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>virtio: fix id_matching for virtio drivers</title>
<updated>2009-06-12T12:46:40Z</updated>
<author>
<name>Christian Borntraeger</name>
</author>
<published>2009-05-26T13:46:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c89e80168ba1ed37627fe03116b0cf8474dcb7e0'/>
<id>urn:sha1:c89e80168ba1ed37627fe03116b0cf8474dcb7e0</id>
<content type='text'>
This bug never appeared, since all current virtio drivers use
VIRTIO_DEV_ANY_ID for the vendor field. If a real vendor would be used,
the check in virtio_id_match is wrong - it returns 0 if
id-&gt;vendor == dev-&gt;id.vendor.

Signed-off-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>virtio: expose features in sysfs</title>
<updated>2009-06-12T12:46:38Z</updated>
<author>
<name>Rusty Russell</name>
</author>
<published>2009-06-13T04:16:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a92892825a122a74ddad1d408fa27132e28b05ae'/>
<id>urn:sha1:a92892825a122a74ddad1d408fa27132e28b05ae</id>
<content type='text'>
Each device negotiates feature bits; expose these in sysfs to help
diagnostics and debugging.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>virtio: add names to virtqueue struct, mapping from devices to queues.</title>
<updated>2009-06-12T12:46:36Z</updated>
<author>
<name>Rusty Russell</name>
</author>
<published>2009-06-13T04:16:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9499f5e7ed5224c40706f0cec6542a9916bc7606'/>
<id>urn:sha1:9499f5e7ed5224c40706f0cec6542a9916bc7606</id>
<content type='text'>
Add a linked list of all virtqueues for a virtio device: this helps for
debugging and is also needed for upcoming interface change.

Also, add a "name" field for clearer debug messages.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>virtio: meet virtio spec by finalizing features before using device</title>
<updated>2009-06-12T12:46:35Z</updated>
<author>
<name>Rusty Russell</name>
</author>
<published>2009-06-13T04:16:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ef688e151c00e5d529703be9a04fd506df8bc54e'/>
<id>urn:sha1:ef688e151c00e5d529703be9a04fd506df8bc54e</id>
<content type='text'>
Virtio devices are supposed to negotiate features before they start using
the device, but the current code doesn't do this.  This is because the
driver's probe() function invariably has to add buffers to a virtqueue,
or probe the disk (virtio_blk).

This currently doesn't matter since no existing backend is strict about
the feature negotiation.  But it's possible to imagine a future feature
which completely changes how a device operates: in this case, we'd need
to acknowledge it before using the device.

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
</feed>
