<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/virtio, branch v3.4.9</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/virtio?h=v3.4.9</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/virtio?h=v3.4.9'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-05-17T09:14:34Z</updated>
<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.amat.us/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.amat.us/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.amat.us/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.amat.us/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.amat.us/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>
<entry>
<title>virtio-pci: drop restore_common()</title>
<updated>2012-03-31T02:39:51Z</updated>
<author>
<name>Amit Shah</name>
<email>amit.shah@redhat.com</email>
</author>
<published>2012-03-29T07:24:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0517fdd156c46c23501451158c6b0ff9fb7236d1'/>
<id>urn:sha1:0517fdd156c46c23501451158c6b0ff9fb7236d1</id>
<content type='text'>
restore_common() was shared between restore and thaw callbacks.  With
thaw gone, we don't need restore_common() anymore.

Signed-off-by: Amit Shah &lt;amit.shah@redhat.com&gt;
</content>
</entry>
<entry>
<title>virtio: drop thaw PM operation</title>
<updated>2012-03-31T02:39:50Z</updated>
<author>
<name>Amit Shah</name>
<email>amit.shah@redhat.com</email>
</author>
<published>2012-03-29T07:20:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f38f8387cbdc4138a492ce9f2a5f04fd3cd3cf33'/>
<id>urn:sha1:f38f8387cbdc4138a492ce9f2a5f04fd3cd3cf33</id>
<content type='text'>
The thaw operation was used by the balloon driver, but after the last
commit there's no reason to have separate thaw and restore callbacks.

Signed-off-by: Amit Shah &lt;amit.shah@redhat.com&gt;
</content>
</entry>
<entry>
<title>virtio: balloon: Allow stats update after restore from S4</title>
<updated>2012-03-31T02:39:50Z</updated>
<author>
<name>Amit Shah</name>
<email>amit.shah@redhat.com</email>
</author>
<published>2012-03-29T07:18:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e47d854e57698d3be4579d2118f6057f9f12a17c'/>
<id>urn:sha1:e47d854e57698d3be4579d2118f6057f9f12a17c</id>
<content type='text'>
There's no reason stats update after restore can't work.  If a host
requested for stats, and before servicing the request, the guest entered
S4, upon restore, the stats request can still be processed and sent off
to the host.

Signed-off-by: Amit Shah &lt;amit.shah@redhat.com&gt;
</content>
</entry>
<entry>
<title>Remove all #inclusions of asm/system.h</title>
<updated>2012-03-28T17:30:03Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2012-03-28T17:30:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9ffc93f203c18a70623f21950f1dd473c9ec48cd'/>
<id>urn:sha1:9ffc93f203c18a70623f21950f1dd473c9ec48cd</id>
<content type='text'>
Remove all #inclusions of asm/system.h preparatory to splitting and killing
it.  Performed with the following command:

perl -p -i -e 's!^#\s*include\s*&lt;asm/system[.]h&gt;.*\n!!' `grep -Irl '^#\s*include\s*&lt;asm/system[.]h&gt;' *`

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>virtio: balloon: leak / fill balloon across S4</title>
<updated>2012-02-29T22:58:41Z</updated>
<author>
<name>Amit Shah</name>
<email>amit.shah@redhat.com</email>
</author>
<published>2012-02-29T12:12:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4eb05d562ea1ea34ff607aa877aefbf05b21c140'/>
<id>urn:sha1:4eb05d562ea1ea34ff607aa877aefbf05b21c140</id>
<content type='text'>
commit e562966dbaf49e7804097cd991e5d3a8934fc148 added support for S4 to
the balloon driver.  The freeze function did nothing to free the pages,
since reclaiming the pages from the host to immediately give them back
(if S4 was successful) seemed wasteful.  Also, if S4 wasn't successful,
the guest would have to re-fill the balloon.  On restore, the pages were
supposed to be marked freed and the free page counters were incremented
to reflect the balloon was totally deflated.

However, this wasn't done right.  The pages that were earlier taken away
from the guest during a balloon inflation operation were just shown as
used pages after a successful restore from S4.  Just a fancy way of
leaking lots of memory.

Instead of trying that, just leak the balloon on freeze and fill it on
restore/thaw paths.  This works properly now.  The optimisation to not
leak can be added later on after a bit of refactoring of the code.

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