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 <peter.mayd...@linaro.org> wrote: > > On Wed, 8 Jan 2020 at 16:20, Andre Silva <afscoe...@gmail.com> 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