[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 2/3] hw/vfio/common: vfio_kvm_device_fd moved in the c
From: |
Eric Auger |
Subject: |
[Qemu-devel] [RFC 2/3] hw/vfio/common: vfio_kvm_device_fd moved in the common header |
Date: |
Fri, 13 Feb 2015 04:00:19 +0000 |
the device is now used in platform for forwarded IRQ setup
Signed-off-by: Eric Auger <address@hidden>
---
hw/vfio/common.c | 3 ++-
include/hw/vfio/vfio-common.h | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index c5d1551..be72ad6 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -44,9 +44,10 @@ struct vfio_as_head vfio_address_spaces =
* initialized, this file descriptor is only released on QEMU exit and
* we'll re-use it should another vfio device be attached before then.
*/
-static int vfio_kvm_device_fd = -1;
+int vfio_kvm_device_fd = -1;
#endif
+
/*
* Common VFIO interrupt disable
*/
diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h
index 2d1d8b3..8816731 100644
--- a/include/hw/vfio/vfio-common.h
+++ b/include/hw/vfio/vfio-common.h
@@ -41,6 +41,11 @@
#define VFIO_ALLOW_KVM_MSI 1
#define VFIO_ALLOW_KVM_MSIX 1
+#ifdef CONFIG_KVM
+extern int vfio_kvm_device_fd;
+#endif
+
+
enum {
VFIO_DEVICE_TYPE_PCI = 0,
VFIO_DEVICE_TYPE_PLATFORM = 1,
--
1.8.3.2