[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [RFC v6 03/22] pc: Implement get_primary_pci_bus
From: |
Eric Auger |
Subject: |
[Qemu-arm] [RFC v6 03/22] pc: Implement get_primary_pci_bus |
Date: |
Mon, 12 Feb 2018 18:58:05 +0000 |
Implement this get_primary_pci_bus() which returns the root
bus.
Signed-off-by: Eric Auger <address@hidden>
---
hw/i386/pc.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 55e69d6..ac33ade 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -2342,6 +2342,13 @@ static void x86_nmi(NMIState *n, int cpu_index, Error
**errp)
}
}
+static PCIBus *pc_machine_get_primary_pci_bus(const MachineState *ms)
+{
+ PCMachineState *pcms = PC_MACHINE(ms);
+
+ return pcms->bus;
+}
+
static void pc_machine_class_init(ObjectClass *oc, void *data)
{
MachineClass *mc = MACHINE_CLASS(oc);
@@ -2381,6 +2388,7 @@ static void pc_machine_class_init(ObjectClass *oc, void
*data)
hc->unplug = pc_machine_device_unplug_cb;
nc->nmi_monitor_handler = x86_nmi;
mc->default_cpu_type = TARGET_DEFAULT_CPU_TYPE;
+ mc->get_primary_pci_bus = pc_machine_get_primary_pci_bus;
object_class_property_add(oc, PC_MACHINE_MEMHP_REGION_SIZE, "int",
pc_machine_get_hotplug_memory_region_size, NULL,
--
1.9.1
- [Qemu-arm] [RFC v6 00/22] VIRTIO-IOMMU device, Eric Auger, 2018/02/12
- [Qemu-arm] [RFC v6 01/22] machine: Add a get_primary_pci_bus callback, Eric Auger, 2018/02/12
- [Qemu-arm] [RFC v6 02/22] hw/arm/virt: Implement get_primary_pci_bus, Eric Auger, 2018/02/12
- [Qemu-arm] [RFC v6 03/22] pc: Implement get_primary_pci_bus,
Eric Auger <=
- [Qemu-arm] [RFC v6 04/22] update-linux-headers: Import virtio_iommu.h, Eric Auger, 2018/02/12
- [Qemu-arm] [RFC v6 05/22] linux-headers: Partial update for virtio-iommu v0.6, Eric Auger, 2018/02/12
- [Qemu-arm] [RFC v6 06/22] virtio-iommu: Add skeleton, Eric Auger, 2018/02/12
- [Qemu-arm] [RFC v6 07/22] virtio-iommu: Decode the command payload, Eric Auger, 2018/02/12
- [Qemu-arm] [RFC v6 08/22] virtio-iommu: Add the iommu regions, Eric Auger, 2018/02/12
- [Qemu-arm] [RFC v6 09/22] virtio-iommu: Register attached endpoints, Eric Auger, 2018/02/12
- [Qemu-arm] [RFC v6 10/22] virtio-iommu: Implement attach/detach command, Eric Auger, 2018/02/12
- [Qemu-arm] [RFC v6 11/22] virtio-iommu: Implement map/unmap, Eric Auger, 2018/02/12
- [Qemu-arm] [RFC v6 12/22] virtio-iommu: Implement translate, Eric Auger, 2018/02/12
- [Qemu-arm] [RFC v6 14/22] virtio-iommu: Add an msi_bypass property, Eric Auger, 2018/02/12