Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146546889
D55432.id.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.id.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/msi.c b/sys/x86/x86/msi.c
--- a/sys/x86/x86/msi.c
+++ b/sys/x86/x86/msi.c
@@ -62,6 +62,7 @@
#include <x86/kvm.h>
#include <contrib/xen/arch-x86/cpuid.h>
#include <x86/bhyve.h>
+#include <dev/hyperv/vmbus/x86/hyperv_reg.h>
/* Fields in address for Intel MSI messages. */
#define MSI_INTEL_ADDR_DEST 0x000ff000
@@ -402,6 +403,15 @@
(regs[0] & XEN_HVM_CPUID_EXT_DEST_ID))
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 ((ext_dest_id == -1) &&
+ (regs[0] & HYPERV_PROPERTIES_EXT_DEST_ID))
+ ext_dest_id = 1;
+ break;
case VM_GUEST_KVM:
kvm_cpuid_get_features(regs);
if ((ext_dest_id == -1) &&
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 4, 1:32 PM (20 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29244561
Default Alt Text
D55432.id.diff (1 KB)
Attached To
Mode
D55432: Hyper-V: Detect Extended Destination ID support
Attached
Detach File
Event Timeline
Log In to Comment