From patchwork Mon Apr 1 19:58:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 232801 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DB21A2C00CE for ; Tue, 2 Apr 2013 06:59:46 +1100 (EST) Received: from localhost ([::1]:55504 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMktN-0000Q9-5m for incoming@patchwork.ozlabs.org; Mon, 01 Apr 2013 15:59:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37036) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMks4-0007Ev-Dy for qemu-devel@nongnu.org; Mon, 01 Apr 2013 15:58:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UMks1-00038Z-8v for qemu-devel@nongnu.org; Mon, 01 Apr 2013 15:58:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34717) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMks0-00038Q-Us for qemu-devel@nongnu.org; Mon, 01 Apr 2013 15:58:21 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r31JwKog001637 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 1 Apr 2013 15:58:20 -0400 Received: from bling.home (ovpn-113-45.phx2.redhat.com [10.3.113.45]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r31JwJiG028563; Mon, 1 Apr 2013 15:58:19 -0400 To: aliguori@us.ibm.com, qemu-devel@nongnu.org From: Alex Williamson Date: Mon, 01 Apr 2013 13:58:19 -0600 Message-ID: <20130401195819.17115.15415.stgit@bling.home> In-Reply-To: <20130401195242.17115.51929.stgit@bling.home> References: <20130401195242.17115.51929.stgit@bling.home> User-Agent: StGit/0.16 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kvm@vger.kernel.org Subject: [Qemu-devel] [PATCH 8/9] vfio: Add bootindex support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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),