dcavalca / rpms / qemu

Forked from rpms/qemu a year ago
Clone

Blame 0006-hw-9pfs-Add-qdev.reset-callback-for-virtio-9p-pci-de.patch

Justin M. Forbes 45e84a
From 64dd41bc2de392fa018c5ce804cc451b83f18b94 Mon Sep 17 00:00:00 2001
Justin M. Forbes 45e84a
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Justin M. Forbes 45e84a
Date: Sun, 4 Dec 2011 22:35:28 +0530
Justin M. Forbes 45e84a
Subject: [PATCH 06/25] hw/9pfs: Add qdev.reset callback for virtio-9p-pci
Justin M. Forbes 45e84a
 device
Justin M. Forbes 45e84a
Justin M. Forbes 45e84a
Add the device reset callback
Justin M. Forbes 45e84a
Justin M. Forbes 45e84a
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Justin M. Forbes 45e84a
---
Justin M. Forbes 45e84a
 hw/9pfs/virtio-9p-device.c |    3 ++-
Justin M. Forbes 45e84a
 hw/virtio-pci.c            |    2 +-
Justin M. Forbes 45e84a
 hw/virtio-pci.h            |    1 +
Justin M. Forbes 45e84a
 3 files changed, 4 insertions(+), 2 deletions(-)
Justin M. Forbes 45e84a
Justin M. Forbes 45e84a
diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
Justin M. Forbes 45e84a
index c9bca8b..cd343e1 100644
Justin M. Forbes 45e84a
--- a/hw/9pfs/virtio-9p-device.c
Justin M. Forbes 45e84a
+++ b/hw/9pfs/virtio-9p-device.c
Justin M. Forbes 45e84a
@@ -176,7 +176,8 @@ static PCIDeviceInfo virtio_9p_info = {
Justin M. Forbes 45e84a
         DEFINE_PROP_STRING("mount_tag", VirtIOPCIProxy, fsconf.tag),
Justin M. Forbes 45e84a
         DEFINE_PROP_STRING("fsdev", VirtIOPCIProxy, fsconf.fsdev_id),
Justin M. Forbes 45e84a
         DEFINE_PROP_END_OF_LIST(),
Justin M. Forbes 45e84a
-    }
Justin M. Forbes 45e84a
+    },
Justin M. Forbes 45e84a
+    .qdev.reset = virtio_pci_reset,
Justin M. Forbes 45e84a
 };
Justin M. Forbes 45e84a
Justin M. Forbes 45e84a
 static void virtio_9p_register_devices(void)
Justin M. Forbes 45e84a
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
Justin M. Forbes 45e84a
index 64c6a94..c665f5c 100644
Justin M. Forbes 45e84a
--- a/hw/virtio-pci.c
Justin M. Forbes 45e84a
+++ b/hw/virtio-pci.c
Justin M. Forbes 45e84a
@@ -266,7 +266,7 @@ static void virtio_pci_stop_ioeventfd(VirtIOPCIProxy *proxy)
Justin M. Forbes 45e84a
     proxy->ioeventfd_started = false;
Justin M. Forbes 45e84a
 }
Justin M. Forbes 45e84a
Justin M. Forbes 45e84a
-static void virtio_pci_reset(DeviceState *d)
Justin M. Forbes 45e84a
+void virtio_pci_reset(DeviceState *d)
Justin M. Forbes 45e84a
 {
Justin M. Forbes 45e84a
     VirtIOPCIProxy *proxy = container_of(d, VirtIOPCIProxy, pci_dev.qdev);
Justin M. Forbes 45e84a
     virtio_pci_stop_ioeventfd(proxy);
Justin M. Forbes 45e84a
diff --git a/hw/virtio-pci.h b/hw/virtio-pci.h
Justin M. Forbes 45e84a
index f8404de..344c22b 100644
Justin M. Forbes 45e84a
--- a/hw/virtio-pci.h
Justin M. Forbes 45e84a
+++ b/hw/virtio-pci.h
Justin M. Forbes 45e84a
@@ -45,6 +45,7 @@ typedef struct {
Justin M. Forbes 45e84a
 } VirtIOPCIProxy;
Justin M. Forbes 45e84a
Justin M. Forbes 45e84a
 void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev);
Justin M. Forbes 45e84a
+void virtio_pci_reset(DeviceState *d);
Justin M. Forbes 45e84a
Justin M. Forbes 45e84a
 /* Virtio ABI version, if we increment this, we break the guest driver. */
Justin M. Forbes 45e84a
 #define VIRTIO_PCI_ABI_VERSION          0
Justin M. Forbes 45e84a
-- 
Justin M. Forbes 45e84a
1.7.7.5
Justin M. Forbes 45e84a