aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2012-04-12 16:38:00 +0300
committerMichael S. Tsirkin <mst@redhat.com>2012-04-15 11:51:06 +0300
commit3ccc9372ed0fab33d20f10be3c1efd5776ff5913 (patch)
treec0e0422269e8d340906848e4993d268b8d4170ad /drivers/block
parentvirtio_balloon: Fix endian bug (diff)
downloadlinux-dev-3ccc9372ed0fab33d20f10be3c1efd5776ff5913.tar.xz
linux-dev-3ccc9372ed0fab33d20f10be3c1efd5776ff5913.zip
virtio_balloon: fix handling of PAGE_SIZE != 4k
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 <david@gibson.dropbear.id.au> Tested-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/block')
0 files changed, 0 insertions, 0 deletions