add bootindex parameter to assigned device
PATCH 1/1 add bootindex parameter to assigned device
Signed-off-by Gleb Natapov <[email protected]>
hw/device-assignment.c +4 -0
@@ -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(), },
hw/device-assignment.h +1 -0
@@ -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.
Marcelo Tosatti
Appliedhw/device-assignment.c
Quoted 4 lines · Gleb Natapov
Signed-off-by Gleb Natapov <[email protected]>hw/device-assignment.c +0
-0
Applied, thanks.