]> git.ipfire.org Git - thirdparty/qemu.git/commit
virtio: update MemoryRegionCaches when guest negotiates features
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 23 Aug 2018 12:21:23 +0000 (14:21 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 21 Mar 2019 20:45:33 +0000 (15:45 -0500)
commita40e71884d184ca9f824b7ea7f48a37b4ddfe6b5
tree51c26c776fb5242b40201bd14b6c83bb712badbd
parent457b0e4761b4720c4a49af5e048c93e664d60d2e
virtio: update MemoryRegionCaches when guest negotiates features

Because the cache is sized to include the rings and the event indices,
negotiating the VIRTIO_RING_F_EVENT_IDX feature will result in the size
of the cache changing.  And because MemoryRegionCache accesses are
range-checked, if we skip this we end up with an assertion failure.
This happens with OpenBSD 6.3.

Reported-by: Fam Zheng <famz@redhat.com>
Fixes: 97cd965c070152bc626c7507df9fb356bbe1cd81
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Tested-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit db812c4073c77c8a64db8d6663b3416a587c7b4a)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/virtio/virtio.c