From: David Woodhouse <d...@amazon.co.uk> The 15-bit MSI enlightenment which allows for up to 32768 vCPUs without a virtual IOMMU is documented at http://david.woodhou.se/ExtDestId.pdf and has been supported for native KVM guests since QEMU v6.0.
Although Xen itself has only defined the CPUID bit and not yet implemented it because of complexity in the interface between QEMU and Xen for MSI handling, there's no reason why it can't work when QEMU/KVM is hosting Xen guests. Advertise it accordingly. Tested with a standard Linux guest (which has supported this under Xen since v5.17) and QEMU command line including -M q35 -smp 4,maxcpus=288 -device host-x86_64-cpu,socket-id=0,core-id=257,thread-id=0 -cpu host,+xen-vapic We need +xen-vapic to test it properly, or the guest turns every MSI and I/O APIC interrupt into an event channel. Testing shows that both line interrupts and MSIs can be set affine to the fifth CPU and are delivered correctly. Signed-off-by: David Woodhouse <d...@amazon.co.uk> --- target/i386/kvm/kvm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 369626f8c8..1401d7a903 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -2221,6 +2221,7 @@ int kvm_arch_init_vcpu(CPUState *cs) if (cs->kvm_state->xen_version >= XEN_VERSION(4, 17)) { c->eax |= XEN_HVM_CPUID_UPCALL_VECTOR; + c->eax |= XEN_HVM_CPUID_EXT_DEST_ID; } } -- 2.49.0
smime.p7s
Description: S/MIME cryptographic signature