On a Thursday in 2025, Nathan Chen wrote:
Hi Jano,On 11/20/2025 8:00 AM, Ján Tomko wrote:Introduce support for "pciBus" driver attribute for "smmuv3" IOMMU model. The "pciBus" attribute indicates the index of the controller that a smmuv3 IOMMU device is attached to, and differentiates the device-pluggable arm-smmuv3 model from the virt-machine-associated smmuv3 model. Signed-off-by: Nathan Chen <[email protected]> --- docs/formatdomain.rst | 4 +++ src/conf/domain_conf.c | 16 +++++++++ src/conf/domain_conf.h | 1 + src/conf/domain_validate.c | 28 +++++++++++++-- src/conf/schemas/domaincommon.rng | 5 +++ src/qemu/qemu_command.c | 58 +++++++++++++++++++++++++++++-- 6 files changed, 106 insertions(+), 6 deletions(-)Reviewed-by: Ján Tomko <[email protected]> I will squash in the following: @@ -6361,7 +6343,7 @@ qemuBuildIOMMUCommandLine(virCommand *cmd, case VIR_DOMAIN_IOMMU_MODEL_SMMUV3: if (iommu->pci_bus >= 0) {- if (!(props = qemuBuildPCINestedSmmuv3DevProps(def, iommu, i))) + if (!(props = qemuBuildPCINestedSmmuv3DevProps(def, iommu)))return -1;if (qemuBuildDeviceCommandlineFromJSON(cmd, props, def, qemuCaps) < 0)return -1;Thank you for your review - I tried applying this proposed squash locally and I'm seeing a compilation error where qemuBuildDeviceAddressPCIGetBus() expects a virDomainDeviceInfo * for the second input argument instead of the virPCIDeviceAddress * passed to it. Would you agree with revising it to the following changes?
Oops, I left the office in a hurry and forgot to mention the patch I sent separately to convert the function to take a virPCIDeviceAddress.
Change these lines: virPCIDeviceAddress addr = { .bus = iommu->pci_bus }; bus = qemuBuildDeviceAddressPCIGetBus(def, &addr); Into something like: virDomainDeviceInfo tempInfo = { 0 }; tempInfo.addr.pci.bus = iommu->pci_bus; bus = qemuBuildDeviceAddressPCIGetBus(def, &tempInfo);In addition, the tests/qemuxmlconfdata/iommu-smmuv3-pci-bus.aarch64-latest.args in the later qemuxmlconftest commit needs to change the nested smmuv3's id value to be "iommu0" and "iommu1" instead of "smmuv3.0" and "smmuv3.1" after we base it on iommu->info.alias in this squash.
Fixed. And pushed now. Jano
-Nathan
signature.asc
Description: PGP signature
