From 32cf7a1e79db11b3ae87d0fa1b4cc8884d709263 Mon Sep 17 00:00:00 2001 From: Shaowei Song Date: Tue, 5 Nov 2024 12:11:31 +0000 Subject: [PATCH] Fix the IOMMU enabling issue in the default EFI boot mode --- tools/qemu_args.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/qemu_args.sh b/tools/qemu_args.sh index 3edc3471d..e7595384b 100755 --- a/tools/qemu_args.sh +++ b/tools/qemu_args.sh @@ -58,11 +58,16 @@ COMMON_QEMU_ARGS="\ " if [ "$1" = "iommu" ]; then + if [ "$OVMF" = "off" ]; then + echo "Warning: OVMF is off, enabling it for IOMMU support." 1>&2 + OVMF="on" + fi IOMMU_DEV_EXTRA=",iommu_platform=on,ats=on" IOMMU_EXTRA_ARGS="\ -device intel-iommu,intremap=on,device-iotlb=on \ - -device ioh3420,id=pcie.0,chassis=1\ + -device ioh3420,id=pcie.0,chassis=1 \ " + # TODO: Add support for enabling IOMMU on AMD platforms fi QEMU_ARGS="\