From: Gleb Natapov <gleb@redhat.com>
To: avi@redhat.com, mtosatti@redhat.com
Cc: kvm@vger.kernel.org
Subject: [PATCH] add bootindex parameter to assigned device
Date: Mon, 10 Jan 2011 11:54:54 +0200 [thread overview]
Message-ID: <20110110095454.GB2202@redhat.com> (raw)
Signed-off-by: Gleb Natapov <gleb@redhat.com>
diff --git a/hw/device-assignment.c b/hw/device-assignment.c
index e97f565..0038526 100644
--- a/hw/device-assignment.c
+++ b/hw/device-assignment.c
@@ -40,6 +40,7 @@
#include "monitor.h"
#include "range.h"
#include <pci/header.h>
+#include "sysemu.h"
/* From linux/ioport.h */
#define IORESOURCE_IO 0x00000100 /* Resource type */
@@ -1771,6 +1772,8 @@ static int assigned_initfn(struct PCIDevice *pci_dev)
assigned_dev_load_option_rom(dev);
QLIST_INSERT_HEAD(&devs, dev, next);
+ add_boot_device_path(dev->bootindex, &pci_dev->qdev, NULL);
+
/* Register a vmsd so that we can mark it unmigratable. */
vmstate_register(&dev->dev.qdev, 0, &vmstate_assigned_device, dev);
register_device_unmigratable(&dev->dev.qdev,
@@ -1837,6 +1840,7 @@ static PCIDeviceInfo assign_info = {
ASSIGNED_DEVICE_USE_IOMMU_BIT, true),
DEFINE_PROP_BIT("prefer_msi", AssignedDevice, features,
ASSIGNED_DEVICE_PREFER_MSI_BIT, true),
+ DEFINE_PROP_INT32("bootindex", AssignedDevice, bootindex, -1),
DEFINE_PROP_STRING("configfd", AssignedDevice, configfd_name),
DEFINE_PROP_END_OF_LIST(),
},
diff --git a/hw/device-assignment.h b/hw/device-assignment.h
index c94a730..86af0a9 100644
--- a/hw/device-assignment.h
+++ b/hw/device-assignment.h
@@ -111,6 +111,7 @@ typedef struct AssignedDevice {
int mmio_index;
int need_emulate_cmd;
char *configfd_name;
+ int32_t bootindex;
QLIST_ENTRY(AssignedDevice) next;
} AssignedDevice;
--
Gleb.
next reply other threads:[~2011-01-10 9:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-10 9:54 Gleb Natapov [this message]
2011-01-18 20:07 ` [PATCH] add bootindex parameter to assigned device Marcelo Tosatti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110110095454.GB2202@redhat.com \
--to=gleb@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox