From ad981b7de07d4464ed02c81268bb6b8dc8ef9ae4 Mon Sep 17 00:00:00 2001 From: Joel Granados Date: Thu, 25 Jul 2024 10:41:40 +0200 Subject: [PATCH] examples: Add iommu arguments to x86_64-q35-base.conf It is useful to over-ride the default qemu parameters of the iommu from custom configuration files that source x86_64-q35-base.conf. Add GUEST_VIOMMU_ARGS that defaults to the previous hard-coded value. Behaviour will not change unless GUEST_VIOMMU_ARGS is set. Signed-off-by: Joel Granados --- examples/vm/x86_64-q35-base.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/vm/x86_64-q35-base.conf b/examples/vm/x86_64-q35-base.conf index 6842d3c..5a03d3b 100644 --- a/examples/vm/x86_64-q35-base.conf +++ b/examples/vm/x86_64-q35-base.conf @@ -22,6 +22,7 @@ QEMU_SYSTEM_BINARY=${QEMU_SYSTEM_X86_64} : "${GUEST_DISPLAY:="0"}" : "${GUEST_VIOMMU:="1"}" +: "${GUEST_VIOMMU_ARGS:="intel-iommu,intremap=on"}" : "${GUEST_CPU:="host"}" : "${GUEST_SMP:="4"}" : "${GUEST_MEMORY:="8G"}" @@ -53,7 +54,7 @@ _setup_x86_64_q35_base() { # guest iommu if [[ $GUEST_VIOMMU -ne 0 ]]; then - QEMU_PARAMS+=("-device" "intel-iommu,intremap=on") + QEMU_PARAMS+=("-device" "$GUEST_VIOMMU_ARGS") fi # simple user-level networking