x86/cpuid: add CPUID flag for Extended Destination ID support
authorRoger Pau Monné <roger.pau@citrix.com>
Fri, 18 Feb 2022 08:17:47 +0000 (09:17 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 18 Feb 2022 08:17:47 +0000 (09:17 +0100)
Introduce the CPUID flag to be used in order to signal the support for
using an extended destination ID in IO-APIC RTEs and MSI address
fields. Such format expands the maximum target APIC ID from 255 to
32768 without requiring the usage of interrupt remapping.

The design document describing the feature can be found at:

http://david.woodhou.se/15-bit-msi.pdf

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/include/public/arch-x86/cpuid.h

index ce46305bee99acd4f86dcf6d2a301e987bda2242..f2b2b3632c2d21fcb6d894be60d0f92e9b0af499 100644 (file)
 #define XEN_HVM_CPUID_IOMMU_MAPPINGS   (1u << 2)
 #define XEN_HVM_CPUID_VCPU_ID_PRESENT  (1u << 3) /* vcpu id is present in EBX */
 #define XEN_HVM_CPUID_DOMID_PRESENT    (1u << 4) /* domid is present in ECX */
+/*
+ * With interrupt format set to 0 (non-remappable) bits 55:49 from the
+ * IO-APIC RTE and bits 11:5 from the MSI address can be used to store
+ * high bits for the Destination ID. This expands the Destination ID
+ * field from 8 to 15 bits, allowing to target APIC IDs up 32768.
+ */
+#define XEN_HVM_CPUID_EXT_DEST_ID      (1u << 5)
 
 /*
  * Leaf 6 (0x40000x05)