On Sun, Mar 14, 2021 at 09:03:00PM +0100, Laurent Vivier wrote:
Both functions don't check the personality of the interface (legacy or
modern) before accessing the configuration memory and always use
virtio_config_readX()/virtio_config_writeX().

With this patch, they now check the personality and in legacy mode
call virtio_config_readX()/virtio_config_writeX(), otherwise call
virtio_config_modern_readX()/virtio_config_modern_writeX().

This change has been tested with virtio-mmio guests (virt stretch/armhf and
virt sid/m68k) and virtio-pci guests (pseries RHEL-7.3/ppc64 and /ppc64le).

Signed-off-by: Laurent Vivier <laur...@vivier.eu>
---
hw/virtio/virtio-mmio.c | 74 +++++++++++++++++++++++++++++------------
1 file changed, 52 insertions(+), 22 deletions(-)


Reviewed-by: Stefano Garzarella <sgarz...@redhat.com>


Reply via email to