qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] virtio: Fix virtio_mmio_read()/virtio_mmio_write()


From: Stefano Garzarella
Subject: Re: [PATCH] virtio: Fix virtio_mmio_read()/virtio_mmio_write()
Date: Fri, 19 Mar 2021 10:24:16 +0100

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 <laurent@vivier.eu>
---
hw/virtio/virtio-mmio.c | 74 +++++++++++++++++++++++++++++------------
1 file changed, 52 insertions(+), 22 deletions(-)


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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]