diff options
| author | Colin Percival <cperciva@FreeBSD.org> | 2026-02-22 04:09:00 +0000 |
|---|---|---|
| committer | Colin Percival <cperciva@FreeBSD.org> | 2026-03-28 05:54:48 +0000 |
| commit | 9b18ba2c16a0750e6c78f348845368284ef1a704 (patch) | |
| tree | 94366879d42c8749ae2ae56f202002c261a06d8d | |
| parent | 8c986d1645312487adf21a9104d667ac1e19c25f (diff) | |
Xen: Detect Extended Destination ID support
Xen advertises support for the Extended Destination ID standard via
bit 5 (aka XEN_HVM_CPUID_EXT_DEST_ID) of the value returned in the
EAX register when Xen features are queried via CPUID.
MFC after: 3 weeks
Sponsored by: Amazon
Differential Revision: https://reviews.freebsd.org/D55429
| -rw-r--r-- | sys/x86/x86/local_apic.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c index fb3b93e4164f..accdf853a174 100644 --- a/sys/x86/x86/local_apic.c +++ b/sys/x86/x86/local_apic.c @@ -73,6 +73,7 @@ #include <machine/specialreg.h> #include <x86/init.h> #include <x86/kvm.h> +#include <contrib/xen/arch-x86/cpuid.h> #ifdef DDB #include <sys/interrupt.h> @@ -2100,6 +2101,11 @@ detect_extended_dest_id(void) /* Check if we support extended destination IDs. */ switch (vm_guest) { + case VM_GUEST_XEN: + cpuid_count(hv_base + 4, 0, regs); + if (regs[0] & XEN_HVM_CPUID_EXT_DEST_ID) + apic_ext_dest_id = 1; + break; case VM_GUEST_KVM: kvm_cpuid_get_features(regs); if (regs[0] & KVM_FEATURE_MSI_EXT_DEST_ID) |
