Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F159561530
D55432.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D55432.diff
View Options
diff --git a/sys/dev/hyperv/vmbus/x86/hyperv_reg.h b/sys/dev/hyperv/vmbus/x86/hyperv_reg.h
--- a/sys/dev/hyperv/vmbus/x86/hyperv_reg.h
+++ b/sys/dev/hyperv/vmbus/x86/hyperv_reg.h
@@ -45,4 +45,10 @@
#define CPUID_LEAF_HV_IDENTITY 0x40000002
#define CPUID_LEAF_HV_FEATURES 0x40000003
#define CPUID_LEAF_HV_RECOMMENDS 0x40000004
+
+#define CPUID_LEAF_HV_STACK_INTERFACE 0x40000081
+#define HYPERV_STACK_INTERFACE_EAX_SIG 0x31235356 /* "VS#1" */
+#define CPUID_LEAF_HV_STACK_PROPERTIES 0x40000082
+#define HYPERV_PROPERTIES_EXT_DEST_ID 0x00000004
+
#endif /* !_HYPERV_REG_H_ */
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
@@ -75,6 +75,7 @@
#include <x86/kvm.h>
#include <contrib/xen/arch-x86/cpuid.h>
#include <x86/bhyve.h>
+#include <dev/hyperv/vmbus/x86/hyperv_reg.h>
#ifdef DDB
#include <sys/interrupt.h>
@@ -2107,6 +2108,14 @@
if (regs[0] & XEN_HVM_CPUID_EXT_DEST_ID)
apic_ext_dest_id = 1;
break;
+ case VM_GUEST_HV:
+ cpuid_count(CPUID_LEAF_HV_STACK_INTERFACE, 0, regs);
+ if (regs[0] != HYPERV_STACK_INTERFACE_EAX_SIG)
+ break;
+ cpuid_count(CPUID_LEAF_HV_STACK_PROPERTIES, 0, regs);
+ if (regs[0] & HYPERV_PROPERTIES_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)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jun 16, 5:48 PM (9 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33995906
Default Alt Text
D55432.diff (1 KB)
Attached To
Mode
D55432: Hyper-V: Detect Extended Destination ID support
Attached
Detach File
Event Timeline
Log In to Comment