From 59a46d11cad715b082d30c0de33317466a9bab9e Mon Sep 17 00:00:00 2001 From: Auger Eric Date: Mon, 3 Jun 2019 19:17:40 +0100 Subject: [PATCH 3/9] aarch64: Allow ARM VIRT iommu option in RHEL8.1 machine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RH-Author: Auger Eric Message-id: <20190603191740.32665-3-eric.auger@redhat.com> Patchwork-id: 88460 O-Subject: [RHEL-AV-8.1.0 qemu-kvm PATCH 2/2] aarch64: Allow ARM VIRT iommu option in RHEL8.1 machine Bugzilla: 1713735 RH-Acked-by: Andrew Jones RH-Acked-by: Laszlo Ersek RH-Acked-by: Philippe Mathieu-Daudé This patch restores the ARM VIRT iommu option historically introduced in qemu 3.0 and disabled in rhel8.0 (RHBZ#1656504 / commit 7bfdb4cd2b49) as we did not have support of the feature at libvirt level. Signed-off-by: Eric Auger Signed-off-by: Danilo C. L. de Paula --- hw/arm/virt.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 9316a8d..670fa10 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1785,7 +1785,6 @@ static void virt_set_gic_version(Object *obj, const char *value, Error **errp) } } -#if 0 /* Disabled for Red Hat Enterprise Linux */ static char *virt_get_iommu(Object *obj, Error **errp) { VirtMachineState *vms = VIRT_MACHINE(obj); @@ -1813,7 +1812,6 @@ static void virt_set_iommu(Object *obj, const char *value, Error **errp) error_append_hint(errp, "Valid values are none, smmuv3.\n"); } } -#endif /* disabled for RHEL */ static CpuInstanceProperties virt_cpu_index_to_props(MachineState *ms, unsigned cpu_index) @@ -2198,8 +2196,13 @@ static void rhel810_virt_instance_init(Object *obj) NULL); } - /* IOMMU is disabled by default and non-configurable for RHEL */ + /* Default disallows iommu instantiation */ vms->iommu = VIRT_IOMMU_NONE; + object_property_add_str(obj, "iommu", virt_get_iommu, virt_set_iommu, NULL); + object_property_set_description(obj, "iommu", + "Set the IOMMU type. " + "Valid values are none and smmuv3", + NULL); vms->irqmap=a15irqmap; } -- 1.8.3.1