[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCHv3 12/14] Add bootindex parameter to pci assigned dev
From: |
Gleb Natapov |
Subject: |
[Qemu-devel] [PATCHv3 12/14] Add bootindex parameter to pci assigned device. |
Date: |
Wed, 10 Nov 2010 19:14:19 +0200 |
Signed-off-by: Gleb Natapov <address@hidden>
---
hw/device-assignment.c | 7 +++++++
hw/device-assignment.h | 1 +
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/hw/device-assignment.c b/hw/device-assignment.c
index bde231d..15c2b42 100644
--- a/hw/device-assignment.c
+++ b/hw/device-assignment.c
@@ -39,6 +39,7 @@
#include "loader.h"
#include "monitor.h"
#include <pci/header.h>
+#include "sysemu.h"
/* From linux/ioport.h */
#define IORESOURCE_IO 0x00000100 /* Resource type */
@@ -1490,6 +1491,11 @@ static int assigned_initfn(struct PCIDevice *pci_dev)
assigned_dev_load_option_rom(dev);
QLIST_INSERT_HEAD(&devs, dev, next);
+
+ if (dev->bootindex >= 0) {
+ add_boot_device_path(dev->bootindex, &pci_dev->qdev, NULL);
+ }
+
return 0;
assigned_out:
@@ -1549,6 +1555,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;
--
1.7.1
- [Qemu-devel] Re: [PATCHv3 08/14] Add get_fw_dev_path callback for pci bus., (continued)
- [Qemu-devel] Re: [PATCHv3 08/14] Add get_fw_dev_path callback for pci bus., Gerd Hoffmann, 2010/11/11
- [Qemu-devel] Re: [PATCHv3 08/14] Add get_fw_dev_path callback for pci bus., Gleb Natapov, 2010/11/11
- [Qemu-devel] Re: [PATCHv3 08/14] Add get_fw_dev_path callback for pci bus., Gerd Hoffmann, 2010/11/11
- [Qemu-devel] Re: [PATCHv3 08/14] Add get_fw_dev_path callback for pci bus., Michael S. Tsirkin, 2010/11/11
- [Qemu-devel] Re: [PATCHv3 08/14] Add get_fw_dev_path callback for pci bus., Gleb Natapov, 2010/11/11
- [Qemu-devel] Re: [PATCHv3 08/14] Add get_fw_dev_path callback for pci bus., Michael S. Tsirkin, 2010/11/11
[Qemu-devel] [PATCHv3 12/14] Add bootindex parameter to pci assigned device.,
Gleb Natapov <=
[Qemu-devel] [PATCHv3 09/14] Record which USBDevice USBPort belongs too., Gleb Natapov, 2010/11/10
[Qemu-devel] [PATCHv3 05/14] Store IDE bus id in IDEBus structure for easy access., Gleb Natapov, 2010/11/10
[Qemu-devel] [PATCHv3 14/14] Pass boot device list to firmware., Gleb Natapov, 2010/11/10
[Qemu-devel] [PATCHv3 13/14] Add notifier that will be called when machine is fully created., Gleb Natapov, 2010/11/10
[Qemu-devel] [PATCHv3 11/14] Add bootindex parameter to net/block/fd device, Gleb Natapov, 2010/11/10