qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] virtio: Prevent double swap due to target pre 1.0 VirtIO


From: André Silva
Subject: Re: [PATCH] virtio: Prevent double swap due to target pre 1.0 VirtIO
Date: Wed, 8 Jan 2020 16:37:27 -0300

Yes, it looks like. virtio_pci_config_read is called via a pointer
from memory_region_read_accessor and memory_region_write_accessor
calls virtio_pci_config_write.
I tested the patch in a linux/ppc64 host with a FreeBSD/ppc64 guest
and VirtIO 0.9 (legacy) driver and from what I saw the config area is
accessed only in these functions.

Thanks!
andré

On Wed, Jan 8, 2020 at 2:51 PM Peter Maydell <address@hidden> wrote:
>
> On Wed, 8 Jan 2020 at 16:20, Andre Silva <address@hidden> wrote:
> >
> > Remove the bswap function calls after reading and before writing
> > memory bytes in virtio_pci_config_read and virtio_pci_config_write
> > because they are reverting back an already swapped bytes
>
> Is "because we wrote it via virtio_pci_config_write" really
> the only way that the data read by virtio_pci_config_read
> is ever set or updated ?
>
> thanks
> -- PMM



reply via email to

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