[nvidia_stable-11.9] NVIDIA: SAUCE: qemu: Use pci_bus to identify multi-smmuv3 model#6
Conversation
Use presence of non-negative pci_bus to identify multi-smmuv3 IOMMU model, instead of the niommus attribute. This allows for specifying a single arm-smmuv3 on the qemu command line, instead of both the virt-machine smmuv3 and arm-smmuv3 being specified at the same time. Signed-off-by: Nathan Chen <nathanc@nvidia.com> (cherry-picked from commit 178bf386450c99b43879e69f810ef18db9075fba https://github.com/NathanChenNVIDIA/libvirt/commits/single-smmuv3-12-25/) Link: https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/XPGZP3XO7VX64JWGWP45UMTLUDDCYADJ/ Signed-off-by: Nathan Chen <nathanc@nvidia.com>
Signed-off-by: Nathan Chen <nathanc@nvidia.com>
|
@NathanChenNVIDIA Two comments
|
The libvirt XML does not change, it would be something like the following for both cases: The broken qemu command line case contains both smmuv3 models: The fixed qemu command line only contains the arm-smmuv3 model:
pci_bus is initialized to -1 on creation of a virDomainIOMMUDef: And if a value is specified for the pciBus attribute in the domain definition, it gets picked up here: |
nvmochs
left a comment
There was a problem hiding this comment.
Thanks for clarifying, no issues from me.
Acked-by: Matthew R. Ochs <mochs@nvidia.com>
ianm-nv
left a comment
There was a problem hiding this comment.
LGTM
Acked-by: Ian May <ianm@nvidia.com>
MitchellAugustin
left a comment
There was a problem hiding this comment.
LGTM, thanks!
Acked-by: Mitchell Augustin <mitchell.augustin@canonical.com>
The previous qemu virt-machine smmuv3 model and the new arm-smmuv3
model cannot both be specified at the same time. When launching
a Libvirt VM with a single arm-smmuv3 model denoted by the
attribute, qemuBuildMachineCommandLine() still appends
the iommu=smmuv3 -machine parameter in addition to the arm-smmuv3
model passed to -device, preventing the VM from booting.
Use the presence of a non-negative pci_bus to
identify the multi-smmuv3 IOMMU model, instead of the
niommus attribute. This allows for specifying a single
arm-smmuv3 on the qemu command line, instead of both
the virt-machine smmuv3 and arm-smmuv3 being specified
at the same time.
Signed-off-by: Nathan Chen nathanc@nvidia.com