[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC v2 7/8] vfio_pci: change vfio device features bit macr
From: |
Chen Fan |
Subject: |
[Qemu-devel] [RFC v2 7/8] vfio_pci: change vfio device features bit macro to enum definition |
Date: |
Wed, 28 Jan 2015 16:37:27 +0800 |
Signed-off-by: Chen Fan <address@hidden>
---
hw/vfio/pci.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 54eb6b4..65247ee 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -134,6 +134,12 @@ typedef struct VFIOMSIXInfo {
void *mmap;
} VFIOMSIXInfo;
+/* Bits in VFIOPCIDevice features field. */
+enum {
+#define VFIO_FEATURE_ENABLE_VGA_BIT 0
+ VFIO_FEATURE_ENABLE_VGA = (1 << VFIO_FEATURE_ENABLE_VGA_BIT),
+};
+
typedef struct VFIOPCIDevice {
PCIDevice pdev;
VFIODevice vbasedev;
@@ -154,8 +160,6 @@ typedef struct VFIOPCIDevice {
PCIHostDeviceAddress host;
EventNotifier err_notifier;
uint32_t features;
-#define VFIO_FEATURE_ENABLE_VGA_BIT 0
-#define VFIO_FEATURE_ENABLE_VGA (1 << VFIO_FEATURE_ENABLE_VGA_BIT)
int32_t bootindex;
uint8_t pm_cap;
bool has_vga;
--
1.9.3
- [Qemu-devel] [RFC v2 0/8] pass aer error to guest for vfio device, Chen Fan, 2015/01/28
- [Qemu-devel] [RFC v2 3/8] pcie_aer: expose pcie_aer_msg() interface, Chen Fan, 2015/01/28
- [Qemu-devel] [RFC v2 2/8] vfio-pci: add aer capability support, Chen Fan, 2015/01/28
- [Qemu-devel] [RFC v2 4/8] vfio-pci: pass the aer error to guest, Chen Fan, 2015/01/28
- [Qemu-devel] [RFC v2 6/8] vfio_pci: fix a wrong check in vfio_pci_reset, Chen Fan, 2015/01/28
- [Qemu-devel] [RFC v2 1/8] pcie_aer: fix typos in pcie_aer_inject_error comment, Chen Fan, 2015/01/28
- [Qemu-devel] [RFC v2 5/8] pcie_aer: fix a trivial typo in PCIEAERMsg comments, Chen Fan, 2015/01/28
- [Qemu-devel] [RFC v2 7/8] vfio_pci: change vfio device features bit macro to enum definition,
Chen Fan <=
- [Qemu-devel] [RFC v2 8/8] vfio-pci: add VFIO_FEATURE_ENABLE_AER_CAP feature, Chen Fan, 2015/01/28