runtime-rs: fix iommu_platform support for qemu vhost-user-fs device

iommu_platform support was already added on initial DeviceVhostUserFs
introduction, however it incorrectly enabled iommu_platform also on
non-CCW (e.g. PCI) systems.

Signed-off-by: Pavel Mores <pmores@redhat.com>
This commit is contained in:
Pavel Mores
2024-04-24 18:03:02 +02:00
parent 174fc8f44b
commit 908ec31d9b

View File

@@ -1278,7 +1278,7 @@ impl<'a> QemuCmdLine<'a> {
let mut virtiofs_device = DeviceVhostUserFs::new(chardev_name, mount_tag, self.bus_type());
virtiofs_device.set_queue_size(queue_size);
if self.config.device_info.enable_iommu_platform {
if self.config.device_info.enable_iommu_platform && self.bus_type() == VirtioBusType::Ccw {
virtiofs_device.set_iommu_platform(true);
}
self.devices.push(Box::new(virtiofs_device));