On 2/25/26 08:48, Xiaotian Feng via Devel wrote:
> This series refines libvirt's logic for large vCPU configurations (>255)
> on x86/q35 machine types. Historically, the threshold was tied to Intel's
> EIM capability, but the real requirement is x2APIC support for APIC IDs
> beyond 255. AMD platforms can satisfy this via xtsup on amd-iommu.
> 
> Summary of changes:
> 
>   1. Fix virDomainIOMMUDefEquals to include pt and xtsup attributes for
>      proper checks.
> 
>   2. Correct error messages for passthrough (pt) and xtsup attributes to
>      reflect their actual names instead of "dma translation".
> 
>   3. Rename QEMU_MAX_VCPUS_WITHOUT_EIM to QEMU_MAX_VCPUS_WITHOUT_X2APIC
>      and update validation logic to accept either:
>        - intel-iommu with eim='on', or
>        - amd-iommu with xtsup='on'
>      for guests with more than 255 vCPUs. Error messages now mention
>      x2APIC mode instead of extended interrupt mode.
> 
>   4. Add QEMU_CAPS_AMD_IOMMU_XTSUP capability and enable xtsup
>      by default for AMD IOMMU when a Q35 domain has >255 vCPUs,
>      similar to Intel EIM auto-enable logic. Also ensure intremap is
>      turned on when required.
> 
> This makes the behavior vendor-neutral and improves usability for AMD
> EPYC guests with large vCPU counts.
> 
> No ABI changes beyond stricter equality checks; this is a clarification
> and extension of existing logic.
> 
> Xiaotian Feng (4):
>   conf: fix virDomainIOMMUDefEquals for amd_iommu
>   conf: fix error log for passthrough and xtsup attributes
>   conf: support >255 vcpu w/ amd-iommu xtsup
>   qemu: Enable AMD IOMMU XTSUP by default
> 
>  src/conf/domain_conf.c       |  6 ++++--
>  src/qemu/qemu_capabilities.c |  2 ++
>  src/qemu/qemu_capabilities.h |  1 +
>  src/qemu/qemu_postparse.c    | 42 +++++++++++++++++++++++-------------
>  src/qemu/qemu_validate.c     | 11 +++++-----
>  src/qemu/qemu_validate.h     |  2 +-
>  6 files changed, 41 insertions(+), 23 deletions(-)
> 

Reviewed-by: Michal Privoznik <[email protected]>

and merged. Congratulations on your first libvirt contribution!

Michal

Reply via email to