Skip to content

Commit

Permalink
examples: Add iommu arguments to x86_64-q35-base.conf
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Joelgranados authored and birkelund committed Sep 17, 2024
1 parent 8cc71d4 commit ad981b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/vm/x86_64-q35-base.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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"}"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ad981b7

Please sign in to comment.