diff options
author | Bibo Mao <maobibo@loongson.cn> | 2024-05-28 16:20:53 +0800 |
---|---|---|
committer | Song Gao <gaosong@loongson.cn> | 2024-06-06 11:56:36 +0800 |
commit | fe43cc5bde32d8bba930242f34ad55002ea4819e (patch) | |
tree | 042041a382d6ca5c09a42c4f3d57128a51b235a3 /hw | |
parent | db2feb2df8d19592c9859efb3f682404e0052957 (diff) | |
download | qemu-fe43cc5bde32d8bba930242f34ad55002ea4819e.zip qemu-fe43cc5bde32d8bba930242f34ad55002ea4819e.tar.gz qemu-fe43cc5bde32d8bba930242f34ad55002ea4819e.tar.bz2 |
tests/libqos: Add loongarch virt machine node
Add loongarch virt machine to the graph. It is a modified copy of
the existing riscv virtmachine in riscv-virt-machine.c
It contains a generic-pcihost controller, and an extra function
loongarch_config_qpci_bus() to configure GPEX pci host controller
information, such as ecam and pio_base addresses.
Also hotplug handle checking about TYPE_VIRTIO_IOMMU_PCI device is
added on loongarch virt machine, since virtio_mmu_pci device requires
it.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Acked-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20240528082053.938564-1-maobibo@loongson.cn>
Signed-off-by: Song Gao <gaosong@loongson.cn>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/loongarch/virt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index 3e6e93e..2d7f718 100644 --- a/hw/loongarch/virt.c +++ b/hw/loongarch/virt.c @@ -45,6 +45,7 @@ #include "sysemu/tpm.h" #include "sysemu/block-backend.h" #include "hw/block/flash.h" +#include "hw/virtio/virtio-iommu.h" #include "qemu/error-report.h" static PFlashCFI01 *virt_flash_create1(LoongArchVirtMachineState *lvms, @@ -1213,6 +1214,7 @@ static HotplugHandler *virt_get_hotplug_handler(MachineState *machine, MachineClass *mc = MACHINE_GET_CLASS(machine); if (device_is_dynamic_sysbus(mc, dev) || + object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_IOMMU_PCI) || memhp_type_supported(dev)) { return HOTPLUG_HANDLER(machine); } |