Add pasid-bits attribute to qemu command line if specified in
domain conf.
Signed-off-by: Zhenzhong Duan <[email protected]>
---
src/qemu/qemu_command.c | 1 +
tests/qemuxmlconfdata/intel-iommu-pasid-bits.x86_64-latest.args | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 8c59ca4383..5ea8337602 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6345,6 +6345,7 @@ qemuBuildIOMMUCommandLine(virCommand *cmd,
"T:dma-translation",
iommu->dma_translation,
"T:scalable-mode", iommu->scalable_mode,
"T:fsts", iommu->fsts,
+ "p:pasid-bits", iommu->pasid_bits,
NULL) < 0)
return -1;
diff --git a/tests/qemuxmlconfdata/intel-iommu-pasid-bits.x86_64-latest.args
b/tests/qemuxmlconfdata/intel-iommu-pasid-bits.x86_64-latest.args
index 5db49142e5..e2f5adfc93 100644
--- a/tests/qemuxmlconfdata/intel-iommu-pasid-bits.x86_64-latest.args
+++ b/tests/qemuxmlconfdata/intel-iommu-pasid-bits.x86_64-latest.args
@@ -26,7 +26,7 @@
XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
--device
'{"driver":"intel-iommu","id":"iommu0","scalable-mode":true,"fsts":true}' \
+-device
'{"driver":"intel-iommu","id":"iommu0","scalable-mode":true,"fsts":true,"pasid-bits":6}'
\
-audiodev '{"id":"audio1","driver":"none"}' \
-global ICH9-LPC.noreboot=off \
-watchdog-action reset \
--
2.52.0