On Wed, Jan 21, 2026 at 17:27:22 +0100, Michal Privoznik via Devel wrote: > From: Michal Privoznik <[email protected]> > > Resolves: https://issues.redhat.com/browse/RHEL-76269 > Signed-off-by: Michal Privoznik <[email protected]> > --- > src/qemu/qemu_command.c | 6 ++++++ > .../virtio-iommu-aarch64.aarch64-latest.args | 2 +- > 2 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c > index 6a01d647b9..0fde2eb659 100644 > --- a/src/qemu/qemu_command.c > +++ b/src/qemu/qemu_command.c > @@ -6285,6 +6285,7 @@ qemuBuildIOMMUCommandLine(virCommand *cmd, > virDomainIOMMUDef *iommu = def->iommus[i]; > g_autoptr(virJSONValue) props = NULL; > g_autoptr(virJSONValue) wrapperProps = NULL; > + const char *granule_mode = NULL; > > switch (iommu->model) { > case VIR_DOMAIN_IOMMU_MODEL_INTEL: > @@ -6306,10 +6307,15 @@ qemuBuildIOMMUCommandLine(virCommand *cmd, > break; > > case VIR_DOMAIN_IOMMU_MODEL_VIRTIO: > + if (iommu->granule_mode != VIR_DOMAIN_IOMMU_GRANULE_MODE_NONE) { > + granule_mode = > virDomainIOMMUGranuleModeTypeToString(iommu->granule_mode); > + } > + > if (virJSONValueObjectAdd(&props, > "s:driver", "virtio-iommu", > "s:id", iommu->info.alias, > "z:aw-bits", iommu->aw_bits, > + "S:granule", granule_mode,
okay so you are doing a 1:1 mapping to qemu values, but I still wonder what the intention behind the specific values is. If it's supposed to mean the number we IMO should use proper unit. (which will require a different enum convertor for use here).
