Re: [Qemu-devel] [PATCH v3 01/39] virtio-pci: get config on init

2011-08-08 Thread Michael S. Tsirkin
On Fri, Aug 05, 2011 at 08:52:25AM -0500, Anthony Liguori wrote: On 08/04/2011 08:05 AM, Avi Kivity wrote: From: Michael S. Tsirkinm...@redhat.com We originally did get config on map, so that following write accesses are done on an updated config. New memory API doesn't give us a callback

Re: [Qemu-devel] [PATCH v3 01/39] virtio-pci: get config on init

2011-08-08 Thread Anthony Liguori
On 08/08/2011 05:36 AM, Michael S. Tsirkin wrote: Thinking more closely, I don't think this right. Updating on map ensured that the config was refreshed after each time the bar was mapped. In the very least, the config needs to be refreshed during reset because the guest may write to the guest

Re: [Qemu-devel] [PATCH v3 01/39] virtio-pci: get config on init

2011-08-08 Thread Avi Kivity
On 08/08/2011 03:45 PM, Anthony Liguori wrote: Actually, you never need to call config_get() AFAICT. It's called in every read/write access. So I think the code you changed is extraneous now. Ok; I'll drop this patch and report (and just remove the code in virtio_map()). -- error

Re: [Qemu-devel] [PATCH v3 01/39] virtio-pci: get config on init

2011-08-08 Thread Michael S. Tsirkin
On Mon, Aug 08, 2011 at 07:45:19AM -0500, Anthony Liguori wrote: On 08/08/2011 05:36 AM, Michael S. Tsirkin wrote: Thinking more closely, I don't think this right. Updating on map ensured that the config was refreshed after each time the bar was mapped. In the very least, the config needs

Re: [Qemu-devel] [PATCH v3 01/39] virtio-pci: get config on init

2011-08-08 Thread Anthony Liguori
On 08/08/2011 07:56 AM, Michael S. Tsirkin wrote: On Mon, Aug 08, 2011 at 07:45:19AM -0500, Anthony Liguori wrote: On 08/08/2011 05:36 AM, Michael S. Tsirkin wrote: Thinking more closely, I don't think this right. Updating on map ensured that the config was refreshed after each time the bar

Re: [Qemu-devel] [PATCH v3 01/39] virtio-pci: get config on init

2011-08-08 Thread Michael S. Tsirkin
On Mon, Aug 08, 2011 at 08:02:08AM -0500, Anthony Liguori wrote: On 08/08/2011 07:56 AM, Michael S. Tsirkin wrote: On Mon, Aug 08, 2011 at 07:45:19AM -0500, Anthony Liguori wrote: On 08/08/2011 05:36 AM, Michael S. Tsirkin wrote: Thinking more closely, I don't think this right. Updating on

Re: [Qemu-devel] [PATCH v3 01/39] virtio-pci: get config on init

2011-08-08 Thread Anthony Liguori
On 08/08/2011 08:14 AM, Michael S. Tsirkin wrote: Probably not noticeable because guests don't do the RMW in practice. We also send the config over on migration. That's probably a bug as well ... It's probably unnecessary, but I don't think it's a bug.. Regards, Anthony Liguori -- To

Re: [Qemu-devel] [PATCH v3 01/39] virtio-pci: get config on init

2011-08-07 Thread Avi Kivity
On 08/05/2011 04:52 PM, Anthony Liguori wrote: static void virtio_write_config(PCIDevice *pci_dev, uint32_t address, @@ -689,6 +686,10 @@ void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev) proxy-host_features |= 0x1 VIRTIO_F_NOTIFY_ON_EMPTY; proxy-host_features |=

Re: [Qemu-devel] [PATCH v3 01/39] virtio-pci: get config on init

2011-08-05 Thread Anthony Liguori
On 08/04/2011 08:05 AM, Avi Kivity wrote: From: Michael S. Tsirkinm...@redhat.com We originally did get config on map, so that following write accesses are done on an updated config. New memory API doesn't give us a callback on map, and arguably, devices don't know when cpu really can access