]> Git Repo - qemu.git/commit - hw/virtio/virtio.c
virtio: update MemoryRegionCaches when guest negotiates features
authorPaolo Bonzini <[email protected]>
Thu, 23 Aug 2018 12:21:23 +0000 (14:21 +0200)
committerMichael S. Tsirkin <[email protected]>
Fri, 7 Sep 2018 21:05:18 +0000 (17:05 -0400)
commitdb812c4073c77c8a64db8d6663b3416a587c7b4a
tree8ca2687455cbbeea15a2352a617d11fad18607ea
parentdbb6da8ba7e02105bdbb33b527e088249c9843c8
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 <[email protected]>
Fixes: 97cd965c070152bc626c7507df9fb356bbe1cd81
Cc: [email protected]
Signed-off-by: Paolo Bonzini <[email protected]>
Tested-by: Fam Zheng <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
hw/virtio/virtio.c
This page took 0.020494 seconds and 4 git commands to generate.