]> Git Repo - qemu.git/commit
ivshmem: Fix 64 bit memory bar configuration
authorZhuang Yanying <[email protected]>
Thu, 17 Nov 2016 12:31:03 +0000 (20:31 +0800)
committerMichael S. Tsirkin <[email protected]>
Fri, 18 Nov 2016 15:29:34 +0000 (17:29 +0200)
commitbe4e0d737527d8670dc271712faae0de6a181b4e
tree5dbc85c11f98abcf3e4742c1977a67cc0ee0d890
parent83d768b5640946b7da55ce8335509df297e2c7cd
ivshmem: Fix 64 bit memory bar configuration

Device ivshmem property use64=0 is designed to make the device
expose a 32 bit shared memory BAR instead of 64 bit one.  The
default is a 64 bit BAR, except pc-1.2 and older retain a 32 bit
BAR.  A 32 bit BAR can support only up to 1 GiB of shared memory.

This worked as designed until commit 5400c02 accidentally flipped
its sense: since then, we misinterpret use64=0 as use64=1 and vice
versa.  Worse, the default got flipped as well.  Devices
ivshmem-plain and ivshmem-doorbell are not affected.

Fix by restoring the test of IVShmemState member not_legacy_32bit
that got messed up in commit 5400c02.  Also update its
initialization for devices ivhsmem-plain and ivshmem-doorbell.
Without that, they'd regress to 32 bit BARs.

Cc: [email protected]
Signed-off-by: Zhuang Yanying <[email protected]>
Reviewed-by: Gonglei <[email protected]>
Reviewed-by: Marc-AndrĂ© Lureau <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
hw/misc/ivshmem.c
This page took 0.027111 seconds and 4 git commands to generate.