Page MenuHomeFreeBSD

D55427.diff
No OneTemporary

D55427.diff

diff --git a/sys/x86/include/kvm.h b/sys/x86/include/kvm.h
--- a/sys/x86/include/kvm.h
+++ b/sys/x86/include/kvm.h
@@ -49,6 +49,7 @@
#define KVM_FEATURE_CLOCKSOURCE 0x00000001
#define KVM_FEATURE_CLOCKSOURCE2 0x00000008
+#define KVM_FEATURE_MSI_EXT_DEST_ID 0x00008000
#define KVM_FEATURE_CLOCKSOURCE_STABLE_BIT 0x01000000
/* Deprecated: for the CLOCKSOURCE feature. */
diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c
--- a/sys/x86/x86/local_apic.c
+++ b/sys/x86/x86/local_apic.c
@@ -72,6 +72,7 @@
#include <machine/smp.h>
#include <machine/specialreg.h>
#include <x86/init.h>
+#include <x86/kvm.h>
#ifdef DDB
#include <sys/interrupt.h>
@@ -2095,6 +2096,16 @@
static void
detect_extended_dest_id(void)
{
+ u_int regs[4];
+
+ /* Check if we support extended destination IDs. */
+ switch (vm_guest) {
+ case VM_GUEST_KVM:
+ kvm_cpuid_get_features(regs);
+ if (regs[0] & KVM_FEATURE_MSI_EXT_DEST_ID)
+ apic_ext_dest_id = 1;
+ break;
+ }
}
/*

File Metadata

Mime Type
text/plain
Expires
Tue, Jun 23, 12:41 PM (14 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34228926
Default Alt Text
D55427.diff (987 B)

Event Timeline