diff options
author | Bernhard Beschow <shentey@gmail.com> | 2023-06-30 09:37:06 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-07-10 16:29:17 -0400 |
commit | 06a492bd2b75653970e30c3ae0ea79ab1ed4ae31 (patch) | |
tree | cab13ab8d4a469ea78043bb3a58b090630b2d91f /hw/pci-host/q35.c | |
parent | 8cf08065b1b19cea1958a43187755cec6546a5d0 (diff) | |
download | qemu-06a492bd2b75653970e30c3ae0ea79ab1ed4ae31.zip qemu-06a492bd2b75653970e30c3ae0ea79ab1ed4ae31.tar.gz qemu-06a492bd2b75653970e30c3ae0ea79ab1ed4ae31.tar.bz2 |
hw/pci-host/q35: Initialize PCMachineState::bus in board code
The Q35 PCI host currently sets the PC machine's PCI bus attribute
through global state, thereby assuming the machine to be a PC machine.
The Q35 machine code already holds on to Q35's pci bus attribute, so can
easily set its own property while preserving encapsulation.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230630073720.21297-4-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci-host/q35.c')
-rw-r--r-- | hw/pci-host/q35.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index 84137b9..0604464 100644 --- a/hw/pci-host/q35.c +++ b/hw/pci-host/q35.c @@ -66,7 +66,6 @@ static void q35_host_realize(DeviceState *dev, Error **errp) s->mch.pci_address_space, s->mch.address_space_io, 0, TYPE_PCIE_BUS); - PC_MACHINE(qdev_get_machine())->bus = pci->bus; pci->bypass_iommu = PC_MACHINE(qdev_get_machine())->default_bus_bypass_iommu; qdev_realize(DEVICE(&s->mch), BUS(pci->bus), &error_fatal); |