From: Aneesh Kumar K.V Date: Sun, 4 Dec 2011 17:05:28 +0000 (+0530) Subject: hw/9pfs: Add qdev.reset callback for virtio-9p-pci device X-Git-Tag: qemu-xen-4.3.0-rc1~18^2~60 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=64dd41bc2de392fa018c5ce804cc451b83f18b94;p=qemu-upstream-4.3-testing.git hw/9pfs: Add qdev.reset callback for virtio-9p-pci device Add the device reset callback Signed-off-by: Aneesh Kumar K.V --- diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index c9bca8bf7..cd343e1d8 100644 --- a/hw/9pfs/virtio-9p-device.c +++ b/hw/9pfs/virtio-9p-device.c @@ -176,7 +176,8 @@ static PCIDeviceInfo virtio_9p_info = { DEFINE_PROP_STRING("mount_tag", VirtIOPCIProxy, fsconf.tag), DEFINE_PROP_STRING("fsdev", VirtIOPCIProxy, fsconf.fsdev_id), DEFINE_PROP_END_OF_LIST(), - } + }, + .qdev.reset = virtio_pci_reset, }; static void virtio_9p_register_devices(void) diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index 64c6a9414..c665f5c94 100644 --- a/hw/virtio-pci.c +++ b/hw/virtio-pci.c @@ -266,7 +266,7 @@ static void virtio_pci_stop_ioeventfd(VirtIOPCIProxy *proxy) proxy->ioeventfd_started = false; } -static void virtio_pci_reset(DeviceState *d) +void virtio_pci_reset(DeviceState *d) { VirtIOPCIProxy *proxy = container_of(d, VirtIOPCIProxy, pci_dev.qdev); virtio_pci_stop_ioeventfd(proxy); diff --git a/hw/virtio-pci.h b/hw/virtio-pci.h index f8404de92..344c22b68 100644 --- a/hw/virtio-pci.h +++ b/hw/virtio-pci.h @@ -45,6 +45,7 @@ typedef struct { } VirtIOPCIProxy; void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev); +void virtio_pci_reset(DeviceState *d); /* Virtio ABI version, if we increment this, we break the guest driver. */ #define VIRTIO_PCI_ABI_VERSION 0