From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: [PATCH 8/9] vfio: Add bootindex support Date: Mon, 01 Apr 2013 13:58:19 -0600 Message-ID: <20130401195819.17115.15415.stgit@bling.home> References: <20130401195242.17115.51929.stgit@bling.home> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: aliguori@us.ibm.com, qemu-devel@nongnu.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:16918 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758931Ab3DAT6X (ORCPT ); Mon, 1 Apr 2013 15:58:23 -0400 In-Reply-To: <20130401195242.17115.51929.stgit@bling.home> Sender: kvm-owner@vger.kernel.org List-ID: Signed-off-by: Alex Williamson --- hw/vfio_pci.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index d310730..0d2a445 100644 --- a/hw/vfio_pci.c +++ b/hw/vfio_pci.c @@ -30,6 +30,7 @@ #include "qemu/event_notifier.h" #include "exec/address-spaces.h" #include "sysemu/kvm.h" +#include "sysemu/sysemu.h" #include "exec/memory.h" #include "hw/pci/msi.h" #include "hw/pci/msix.h" @@ -160,6 +161,7 @@ typedef struct VFIODevice { 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 reset_works; bool has_vga; @@ -3070,6 +3072,8 @@ static int vfio_initfn(PCIDevice *pdev) } } + add_boot_device_path(vdev->bootindex, &pdev->qdev, NULL); + return 0; out_teardown: @@ -3157,6 +3161,7 @@ static Property vfio_pci_dev_properties[] = { intx.mmap_timeout, 1100), DEFINE_PROP_BIT("x-vga", VFIODevice, features, VFIO_FEATURE_ENABLE_VGA_BIT, false), + DEFINE_PROP_INT32("bootindex", VFIODevice, bootindex, -1), /* * TODO - support passed fds... is this necessary? * DEFINE_PROP_STRING("vfiofd", VFIODevice, vfiofd_name),