From 18352c36ec2a2eba8ffd161a7ca30c2cd7f8ba12 Mon Sep 17 00:00:00 2001 From: Jakob Naucke Date: Wed, 23 Jun 2021 17:14:20 +0200 Subject: [PATCH] qemu: Fix iommu_platform for vhost user CCW Enable iommu_platform for vhost user devices Fixes: #178 Signed-off-by: Jakob Naucke --- qemu/qemu.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qemu/qemu.go b/qemu/qemu.go index c4aada81e..7d60bb7e1 100644 --- a/qemu/qemu.go +++ b/qemu/qemu.go @@ -1435,6 +1435,9 @@ func (vhostuserDev VhostUserDevice) QemuFSParams(config *Config) []string { deviceParams = append(deviceParams, "versiontable=/dev/shm/fuse_shared_versions") } if vhostuserDev.Transport.isVirtioCCW(config) { + if config.Knobs.IOMMUPlatform { + deviceParams = append(deviceParams, "iommu_platform=on") + } deviceParams = append(deviceParams, fmt.Sprintf("devno=%s", vhostuserDev.DevNo)) } if vhostuserDev.Transport.isVirtioPCI(config) && vhostuserDev.ROMFile != "" {