diff mbox series

[4/5] hw/arm/virt: Remove device-tree restriction on virtio-iommu

Message ID 20200821162839.3182051-5-jean-philippe@linaro.org
State New
Headers show
Series virtio-iommu: Built-in topology and x86 support | expand

Commit Message

Jean-Philippe Brucker Aug. 21, 2020, 4:28 p.m. UTC
Now that the virtio-iommu has a built-in topology mechanism, it can be
used without a device tree. Remove the restriction on !ACPI or
!firmware.

Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>

---
 hw/arm/virt.c                | 10 ++--------
 hw/virtio/virtio-iommu-pci.c |  2 --
 2 files changed, 2 insertions(+), 10 deletions(-)

-- 
2.28.0
diff mbox series

Patch

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index ecfee362a18..2742c28054a 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -2358,16 +2358,10 @@  static HotplugHandler *virt_machine_get_hotplug_handler(MachineState *machine,
                                                         DeviceState *dev)
 {
     if (object_dynamic_cast(OBJECT(dev), TYPE_SYS_BUS_DEVICE) ||
-       (object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM))) {
+        object_dynamic_cast(OBJECT(dev), TYPE_PC_DIMM) ||
+        object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_IOMMU_PCI)) {
         return HOTPLUG_HANDLER(machine);
     }
-    if (object_dynamic_cast(OBJECT(dev), TYPE_VIRTIO_IOMMU_PCI)) {
-        VirtMachineState *vms = VIRT_MACHINE(machine);
-
-        if (!vms->bootinfo.firmware_loaded || !virt_is_acpi_enabled(vms)) {
-            return HOTPLUG_HANDLER(machine);
-        }
-    }
     return NULL;
 }
 
diff --git a/hw/virtio/virtio-iommu-pci.c b/hw/virtio/virtio-iommu-pci.c
index ba62d60a0a0..240e85e6363 100644
--- a/hw/virtio/virtio-iommu-pci.c
+++ b/hw/virtio/virtio-iommu-pci.c
@@ -54,8 +54,6 @@  static void virtio_iommu_pci_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
         error_append_hint(errp,
                           "Check your machine implements a hotplug handler "
                           "for the virtio-iommu-pci device\n");
-        error_append_hint(errp, "Check the guest is booted without FW or with "
-                          "-no-acpi\n");
         return;
     }
     for (int i = 0; i < s->nb_reserved_regions; i++) {