<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/virtio, branch v3.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-07-08T23:37:22Z</updated>
<entry>
<title>virtio-balloon: fix add/get API use</title>
<updated>2012-07-08T23:37:22Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2012-07-02T07:33:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9c378abc5c0c6fc8e3acf5968924d274503819b3'/>
<id>urn:sha1:9c378abc5c0c6fc8e3acf5968924d274503819b3</id>
<content type='text'>
Since ee7cd8981e15bcb365fc762afe3fc47b8242f630 'virtio: expose added
descriptors immediately.', in virtio balloon virtqueue_get_buf might
now run concurrently with virtqueue_kick.  I audited both and this
seems safe in practice but this is not guaranteed by the API.
Additionally, a spurious interrupt might in theory make
virtqueue_get_buf run in parallel with virtqueue_add_buf, which is
racy.

While we might try to protect against spurious callbacks it's
easier to fix the driver: balloon seems to be the only one
(mis)using the API like this, so let's just fix balloon.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt; (removed unused var)
</content>
</entry>
<entry>
<title>virtio-mmio: Devices parameter parsing</title>
<updated>2012-05-22T02:46:15Z</updated>
<author>
<name>Pawel Moll</name>
<email>pawel.moll@arm.com</email>
</author>
<published>2012-05-09T17:30:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=81a054ce0b469b66c88e9da6403082759c64bf73'/>
<id>urn:sha1:81a054ce0b469b66c88e9da6403082759c64bf73</id>
<content type='text'>
This patch adds an option to instantiate guest virtio-mmio devices
basing on a kernel command line (or module) parameter, for example:

	virtio_mmio.devices=0x100@0x100b0000:48

Signed-off-by: Pawel Moll &lt;pawel.moll@arm.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&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>
<email>asias@redhat.com</email>
</author>
<published>2012-05-03T02:20:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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: balloon: separate out common code between remove and freeze functions</title>
<updated>2012-05-22T02:46:11Z</updated>
<author>
<name>Amit Shah</name>
<email>amit.shah@redhat.com</email>
</author>
<published>2012-04-26T19:15:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c877bab5072c8f461397949babbac10e348ae70d'/>
<id>urn:sha1:c877bab5072c8f461397949babbac10e348ae70d</id>
<content type='text'>
The remove and freeze functions have a lot of shared code; put it into a
common function that gets called by both.

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: balloon: drop restore_common()</title>
<updated>2012-05-22T02:46:11Z</updated>
<author>
<name>Amit Shah</name>
<email>amit.shah@redhat.com</email>
</author>
<published>2012-04-26T19:15:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c45b4166d9eaed612fa29acb041662aa4ceb2712'/>
<id>urn:sha1:c45b4166d9eaed612fa29acb041662aa4ceb2712</id>
<content type='text'>
restore_common() was used when there were different thaw and freeze PM
callbacks implemented.  We removed thaw in commit
f38f8387cbdc4138a492ce9f2a5f04fd3cd3cf33.

restore_common() can be removed and virtballoon_restore() can itself do
the restore ops.

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: balloon: let host know of updated balloon size before module removal</title>
<updated>2012-05-17T09:14:34Z</updated>
<author>
<name>Amit Shah</name>
<email>amit.shah@redhat.com</email>
</author>
<published>2012-04-26T19:15:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b8ae0eb320b38415da94a41f75e9f99e0aaff06c'/>
<id>urn:sha1:b8ae0eb320b38415da94a41f75e9f99e0aaff06c</id>
<content type='text'>
When the balloon module is removed, we deflate the balloon, reclaiming
all the pages that were given to the host.  However, we don't update the
config values for the new balloon size, resulting in the host showing
outdated balloon values.

The size update is done after each leak and fill operation, only the
module removal case was left out.

Signed-off-by: Amit Shah &lt;amit.shah@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>virtio_balloon: fix handling of PAGE_SIZE != 4k</title>
<updated>2012-04-15T08:51:06Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2012-04-12T13:38:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3ccc9372ed0fab33d20f10be3c1efd5776ff5913'/>
<id>urn:sha1:3ccc9372ed0fab33d20f10be3c1efd5776ff5913</id>
<content type='text'>
As reported by David Gibson, current code handles PAGE_SIZE != 4k
completely wrong which can lead to guest memory corruption errors:

- page_to_balloon_pfn is wrong: e.g. on system with 64K page size
 it gives the same pfn value for 16 different pages.

- we also need to convert back to linux pfns when we free.

- for each linux page we need to tell host about multiple balloon
  pages, but code only adds one pfn to the array.

This patch fixes all that, tested with a 64k ppc64 kernel.

Reported-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Tested-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>virtio_balloon: Fix endian bug</title>
<updated>2012-04-15T08:51:05Z</updated>
<author>
<name>David Gibson</name>
<email>david@gibson.dropbear.id.au</email>
</author>
<published>2012-04-12T05:36:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1a87228f5f1d316002c7c161316f5524592be766'/>
<id>urn:sha1:1a87228f5f1d316002c7c161316f5524592be766</id>
<content type='text'>
Although virtio config space fields are usually in guest-native endian,
the spec for the virtio balloon device explicitly states that both fields
in its config space are little-endian.

However, the current virtio_balloon driver does not have a suitable endian
swap for the 'num_pages' field, although it does have one for the 'actual'
field.  This patch corrects the bug, adding sparse annotation while we're
at it.

Signed-off-by: David Gibson &lt;david@gibson.dropbear.id.au&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>virtio-pci: switch to PM ops macro to initialise PM functions</title>
<updated>2012-03-31T02:39:51Z</updated>
<author>
<name>Amit Shah</name>
<email>amit.shah@redhat.com</email>
</author>
<published>2012-03-29T07:28:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f878d0be229ab129bc4b224191f217106a4b0bc1'/>
<id>urn:sha1:f878d0be229ab129bc4b224191f217106a4b0bc1</id>
<content type='text'>
Use the SET_SYSTEM_SLEEP_PM_OPS macro to initialise the suspend/resume
functions in the new PM API.

Signed-off-by: Amit Shah &lt;amit.shah@redhat.com&gt;
</content>
</entry>
<entry>
<title>virtio-pci: S3 support</title>
<updated>2012-03-31T02:39:51Z</updated>
<author>
<name>Amit Shah</name>
<email>amit.shah@redhat.com</email>
</author>
<published>2012-03-29T07:21:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=04c2322bee841121cfdd7f284e1d4274e9e60e33'/>
<id>urn:sha1:04c2322bee841121cfdd7f284e1d4274e9e60e33</id>
<content type='text'>
There's no difference in supporting S3 and S4 for virtio devices: the
vqs have to be re-created as the device has to be assumed to be reset at
restore-time.  Since S4 already handles this situation, we can directly
use the same code and callbacks for S3 support.

Signed-off-by: Amit Shah &lt;amit.shah@redhat.com&gt;
</content>
</entry>
</feed>
