[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 07/12] hw/arm/virt: Reject instantiation of multiple IOMMU
From: |
Igor Mammedov |
Subject: |
Re: [PATCH v5 07/12] hw/arm/virt: Reject instantiation of multiple IOMMUs |
Date: |
Thu, 21 Oct 2021 15:54:08 +0200 |
On Wed, 20 Oct 2021 18:27:41 +0100
Jean-Philippe Brucker <jean-philippe@linaro.org> wrote:
> We do not support instantiating multiple IOMMUs. Before adding a
> virtio-iommu, check that no other IOMMU is present. This will detect
> both "iommu=smmuv3" machine parameter and another virtio-iommu instance.
>
> Fixes: 70e89132c9 ("hw/arm/virt: Add the virtio-iommu device tree mappings")
> Reviewed-by: Eric Auger <eric.auger@redhat.com>
> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> ---
> hw/arm/virt.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 3da7a86e37..25db8d4262 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -2441,6 +2441,11 @@ static void
> virt_machine_device_pre_plug_cb(HotplugHandler *hotplug_dev,
> hwaddr db_start = 0, db_end = 0;
> char *resv_prop_str;
>
> + if (vms->iommu != VIRT_IOMMU_NONE) {
> + error_setg(errp, "virt machine does not support multiple
> IOMMUs");
> + return;
> + }
> +
> switch (vms->msi_controller) {
> case VIRT_MSI_CTRL_NONE:
> return;
- [PATCH v5 02/12] hw/i386/pc: Remove x86_iommu_get_type(), (continued)
- [PATCH v5 02/12] hw/i386/pc: Remove x86_iommu_get_type(), Jean-Philippe Brucker, 2021/10/20
- [PATCH v5 03/12] hw/i386/pc: Move IOMMU singleton into PCMachineState, Jean-Philippe Brucker, 2021/10/20
- [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
- Re: [PATCH v5 07/12] hw/arm/virt: Reject instantiation of multiple IOMMUs,
Igor Mammedov <=
- [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
- [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