aboutsummaryrefslogtreecommitdiff
path: root/qemu-common.h
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2011-04-07 13:02:04 +1000
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2011-04-07 14:25:53 +0100
commite54f17713f638189e79dac5ba0aa0ce606788777 (patch)
tree67c83b4b61d04ad894a46f1a39c21d14444fffcf /qemu-common.h
parent4e37bfc1f0fcd17e48bfae233e0b45066830e126 (diff)
virtio-balloon: fixed endianness bug in the config space
The specification for the virtio balloon device requres that the values in the config space be encoded little-endian. This differs from most virtio things, where guest-native endian is the norm. Currently, the qemu virtio-balloon code correctly makes the conversion on get_config(), but doesn't on set_config for the 'actual' field. The kernel driver, on the other hand, correctly converts when setting the actual field, but does not convert when reading the config space. The upshot is that virtio-balloon will only work correctly if both host and guest are LE, making all the conversions nops. This patch corrects the qemu side, correctly doing host-native <-> LE conversions when accessing the config space. This won't break any setups that aren't already broken, and fixes the case of BE host, LE guest. Fixing the BE guest case will require kernel fixes as well. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'qemu-common.h')
0 files changed, 0 insertions, 0 deletions