From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGOEa-0005mT-Qt for qemu-devel@nongnu.org; Wed, 28 Jan 2015 03:44:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGOEW-0002lz-7b for qemu-devel@nongnu.org; Wed, 28 Jan 2015 03:44:24 -0500 Received: from [59.151.112.132] (port=9536 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGOEV-0002jd-Na for qemu-devel@nongnu.org; Wed, 28 Jan 2015 03:44:20 -0500 From: Chen Fan Date: Wed, 28 Jan 2015 16:37:27 +0800 Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [RFC v2 7/8] vfio_pci: change vfio device features bit macro to enum definition List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: marcel@redhat.com, izumi.taku@jp.fujitsu.com, Alex Williamson Signed-off-by: Chen Fan --- 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