qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tests/libqos: Add loongarch virt machine node


From: maobibo
Subject: Re: [PATCH] tests/libqos: Add loongarch virt machine node
Date: Wed, 29 May 2024 16:05:55 +0800
User-agent: Mozilla/5.0 (X11; Linux loongarch64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

Thomas,

Thanks for reviewing the patch.

On 2024/5/29 下午3:10, Thomas Huth wrote:
On 28/05/2024 10.20, Bibo Mao wrote:
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>
---
  hw/loongarch/virt.c                         |   2 +
  tests/qtest/libqos/loongarch-virt-machine.c | 114 ++++++++++++++++++++
  tests/qtest/libqos/meson.build              |   1 +
  3 files changed, 117 insertions(+)
  create mode 100644 tests/qtest/libqos/loongarch-virt-machine.c

diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
index 3e6e93edf3..2d7f718570 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);
      }
diff --git a/tests/qtest/libqos/loongarch-virt-machine.c b/tests/qtest/libqos/loongarch-virt-machine.c
new file mode 100644
index 0000000000..c12089c015
--- /dev/null
+++ b/tests/qtest/libqos/loongarch-virt-machine.c
@@ -0,0 +1,114 @@
+/*
+ * libqos driver framework
+ *
+ * Copyright (c) 2018 Emanuele Giuseppe Esposito <e.emanuelegiuseppe@gmail.com>
+ *

Don't you want to add your information here, too?
Will add in next version.


Anyway:
Acked-by: Thomas Huth <thuth@redhat.com>

I assume this will go through the loongarch tree. Let me know if you want to get this merged through the qtest tree instead.
yes, I think it will go through the loongarch tree.

Regards
Bibo Mao




reply via email to

[Prev in Thread] Current Thread [Next in Thread]