virtio-pci: Changed vdev to proxy for VirtIO PCI BAR callbacks.
commitccec7e9603f446fe75c6c563ba335c00cfda6a06
authorAndrew Melnychenko <andrew@daynix.com>
Mon, 6 Jul 2020 11:21:23 +0000 (6 14:21 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 22 Jul 2020 12:05:37 +0000 (22 08:05 -0400)
treef07555fafc4826611b23219a2bf1fbca74d8c7c0
parenta4544c45e109ceee87ee8c19baff28be3890d788
virtio-pci: Changed vdev to proxy for VirtIO PCI BAR callbacks.

There is an issue when callback may be called with invalid vdev.
It happens on unplug when vdev already deleted and VirtIOPciProxy is not.
So now, callbacks accept proxy device, and vdev retrieved from it.
Technically memio callbacks should be removed during the flatview update,
but memoryregions remain til PCI device(and it's address space) completely deleted.
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1716352
Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
Message-Id: <20200706112123.971087-1-andrew@daynix.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/virtio/virtio-pci.c