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

2020-01-10 Thread André Silva
> On Fri, 10 Jan 2020 09:00:50 -0300 > André Silva wrote: > > > > What are the symptoms without your patch ? What's the QEMU version ? > > > > If using virtio for networking, guest vtnet0 interface appears with > > 'status: no carrier'. Applyi

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

2020-01-10 Thread André Silva
m 4G -net tap -netdev tap,id=n1 -device virtio-net-pci,netdev=n1 Thanks, andré On Fri, Jan 10, 2020 at 5:55 AM Greg Kurz wrote: > > On Thu, 9 Jan 2020 18:18:57 -0300 > André Silva wrote: > > > Hi Greg, > > > > Hi André, > > > Thanks for the commit info. &g

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

2020-01-09 Thread André Silva
x86_64 FreeBSD 13.0-current ppc64 BE legacy Thanks, andré On Thu, Jan 9, 2020 at 1:06 PM Greg Kurz wrote: > > On Thu, 9 Jan 2020 07:39:17 -0500 > "Michael S. Tsirkin" wrote: > > > On Thu, Jan 09, 2020 at 09:25:42AM -0300, André Silva wrote: > > > Hi

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

2020-01-09 Thread André Silva
Hi Michael! Thanks for reviewing the patch! > we always get LE values from memory subsystem, > not target endian values: I see. So do you think the patch is correct in eliminating the extra swap (as virtio_config_readw for example already makes a swap)? Thanks, andré On Thu, Jan 9, 2020 at 7:50

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

2020-01-08 Thread André Silva
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