[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 03/10] hw/arm/virt: Remove device tree restriction for virtio-
From: |
Jean-Philippe Brucker |
Subject: |
[PATCH v3 03/10] hw/arm/virt: Remove device tree restriction for virtio-iommu |
Date: |
Tue, 14 Sep 2021 15:19:58 +0100 |
virtio-iommu is now supported with ACPI VIOT as well as device tree.
Remove the restriction that prevents from instantiating a virtio-iommu
device under ACPI.
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
---
hw/arm/virt.c | 10 ++--------
hw/virtio/virtio-iommu-pci.c | 7 -------
2 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 73e9c6bb7c..f238766aa1 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -2547,16 +2547,10 @@ static HotplugHandler
*virt_machine_get_hotplug_handler(MachineState *machine,
MachineClass *mc = MACHINE_GET_CLASS(machine);
if (device_is_dynamic_sysbus(mc, dev) ||
- (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 770c286be7..f30eb16cbf 100644
--- a/hw/virtio/virtio-iommu-pci.c
+++ b/hw/virtio/virtio-iommu-pci.c
@@ -48,16 +48,9 @@ static void virtio_iommu_pci_realize(VirtIOPCIProxy
*vpci_dev, Error **errp)
VirtIOIOMMU *s = VIRTIO_IOMMU(vdev);
if (!qdev_get_machine_hotplug_handler(DEVICE(vpci_dev))) {
- MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine());
-
- error_setg(errp,
- "%s machine fails to create iommu-map device tree bindings",
- mc->name);
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++) {
--
2.33.0
- [PATCH v3 00/10] virtio-iommu: Add ACPI support, Jean-Philippe Brucker, 2021/09/14
- [PATCH v3 01/10] hw/acpi: Add VIOT table, Jean-Philippe Brucker, 2021/09/14
- [PATCH v3 03/10] hw/arm/virt: Remove device tree restriction for virtio-iommu,
Jean-Philippe Brucker <=
- [PATCH v3 09/10] tests/acpi: add expected DSDT blob for VIOT test on q35, Jean-Philippe Brucker, 2021/09/14
- [PATCH v3 08/10] tests/acpi: add expected VIOT blob for virt machine, Jean-Philippe Brucker, 2021/09/14
- [PATCH v3 02/10] hw/arm/virt-acpi-build: Add VIOT table for virtio-iommu, Jean-Philippe Brucker, 2021/09/14
- [PATCH v3 04/10] hw/arm/virt: Reject instantiation of multiple IOMMUs, Jean-Philippe Brucker, 2021/09/14
- [PATCH v3 05/10] pc: Allow instantiating a virtio-iommu device, Jean-Philippe Brucker, 2021/09/14
- [PATCH v3 10/10] tests/acpi: add expected VIOT blob for q35 machine, Jean-Philippe Brucker, 2021/09/14