[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 06/12] hw/arm/virt: Remove device tree restriction for vir
From: |
Igor Mammedov |
Subject: |
Re: [PATCH v5 06/12] hw/arm/virt: Remove device tree restriction for virtio-iommu |
Date: |
Thu, 21 Oct 2021 15:53:14 +0200 |
On Wed, 20 Oct 2021 18:27:40 +0100
Jean-Philippe Brucker <jean-philippe@linaro.org> wrote:
> 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>
Acked-by: Igor Mammedov <imammedo@redhat.com>
> ---
> hw/arm/virt.c | 10 ++--------
> hw/virtio/virtio-iommu-pci.c | 12 ++----------
> 2 files changed, 4 insertions(+), 18 deletions(-)
>
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index f7f456bf58..3da7a86e37 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -2561,16 +2561,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..5c0b87316a 100644
> --- a/hw/virtio/virtio-iommu-pci.c
> +++ b/hw/virtio/virtio-iommu-pci.c
> @@ -48,16 +48,8 @@ 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");
> + error_setg(errp, "Check your machine implements a hotplug handler "
> + "for the virtio-iommu-pci device");
> return;
> }
> for (int i = 0; i < s->nb_reserved_regions; i++) {
- Re: [PATCH v5 03/12] hw/i386/pc: Move IOMMU singleton into PCMachineState, (continued)
- [PATCH v5 04/12] hw/i386/pc: Allow instantiating a virtio-iommu device, Jean-Philippe Brucker, 2021/10/20
- [PATCH v5 07/12] hw/arm/virt: Reject instantiation of multiple IOMMUs, Jean-Philippe Brucker, 2021/10/20
- [PATCH v5 05/12] hw/arm/virt-acpi-build: Add VIOT table for virtio-iommu, Jean-Philippe Brucker, 2021/10/20
- [PATCH v5 06/12] hw/arm/virt: Remove device tree restriction for virtio-iommu, Jean-Philippe Brucker, 2021/10/20
- Re: [PATCH v5 06/12] hw/arm/virt: Remove device tree restriction for virtio-iommu,
Igor Mammedov <=
- [PATCH v5 08/12] hw/arm/virt: Use object_property_set instead of qdev_prop_set, Jean-Philippe Brucker, 2021/10/20
- [PATCH v5 11/12] tests/acpi: add expected blob for VIOT test on virt machine, Jean-Philippe Brucker, 2021/10/20
- [PATCH v5 09/12] tests/acpi: allow updates of VIOT expected data files, Jean-Philippe Brucker, 2021/10/20
- [PATCH v5 12/12] tests/acpi: add expected blobs for VIOT test on q35 machine, Jean-Philippe Brucker, 2021/10/20
- [PATCH v5 10/12] tests/acpi: add test cases for VIOT, Jean-Philippe Brucker, 2021/10/20