On 5/20/2025 4:20 AM, Daniel P. Berrangé wrote:
Add support for "smmuv3Dev" IOMMU model, and add
support for parsing multiple IOMMU devices from
the VM definition when "smmuv3Dev" is the IOMMU model.
Enable plugging smmuv3Dev into pcie-root and
pcie-expander-bus.
Signed-off-by: Nathan Chen<nath...@nvidia.com>
---
docs/formatdomain.rst | 5 +-
src/conf/domain_addr.c | 12 ++-
src/conf/domain_addr.h | 4 +-
src/conf/domain_conf.c | 153 ++++++++++++++++++++++++++----
src/conf/domain_conf.h | 11 ++-
src/conf/domain_validate.c | 38 +++++---
src/conf/schemas/domaincommon.rng | 8 +-
src/libvirt_private.syms | 2 +
src/qemu/qemu_alias.c | 15 ++-
src/qemu/qemu_command.c | 135 +++++++++++++++++---------
src/qemu/qemu_domain_address.c | 33 ++++---
src/qemu/qemu_driver.c | 8 +-
src/qemu/qemu_postparse.c | 11 ++-
src/qemu/qemu_validate.c | 22 ++++-
14 files changed, 342 insertions(+), 115 deletions(-)
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 58b97a2b54..75568ff50a 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -3005,6 +3005,7 @@ typedef enum {
VIR_DOMAIN_IOMMU_MODEL_INTEL,
VIR_DOMAIN_IOMMU_MODEL_SMMUV3,
VIR_DOMAIN_IOMMU_MODEL_VIRTIO,
+ VIR_DOMAIN_IOMMU_MODEL_SMMUV3_DEV,
Can you remove this addition from this patch and put it
in a following commit...
VIR_DOMAIN_IOMMU_MODEL_LAST
} virDomainIOMMUModel;
@@ -3258,6 +3259,9 @@ struct _virDomainDef {
size_t nwatchdogs;
virDomainWatchdogDef **watchdogs;
+ size_t niommus;
+ virDomainIOMMUDef **iommu;
...so we focus exclusively on this bit.
Yes, I will separate these changes out in the next revision so that we
have separate commits - one for multiple IOMMU definitions and one for
smmuv3Dev support.
+
/* At maximum 2 TPMs on the domain if a TPM Proxy is present. */
size_t ntpms;
virDomainTPMDef **tpms;
@@ -3267,7 +3271,6 @@ struct _virDomainDef {
virDomainNVRAMDef *nvram;
virCPUDef *cpu;
virDomainRedirFilterDef *redirfilter;
- virDomainIOMMUDef *iommu;
virDomainVsockDef *vsock;
virDomainPstoreDef *pstore;
With regards,
Daniel
Thanks,
Nathan