Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145975291
D55427.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
D55427.diff
View Options
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/msi.c b/sys/x86/x86/msi.c
--- a/sys/x86/x86/msi.c
+++ b/sys/x86/x86/msi.c
@@ -59,6 +59,7 @@
#include <x86/iommu/iommu_intrmap.h>
#include <machine/specialreg.h>
#include <dev/pci/pcivar.h>
+#include <x86/kvm.h>
/* Fields in address for Intel MSI messages. */
#define MSI_INTEL_ADDR_DEST 0x000ff000
@@ -355,6 +356,7 @@
void
msi_init(void)
{
+ u_int regs[4];
/* Check if we have a supported CPU. */
switch (cpu_vendor_id) {
@@ -389,6 +391,16 @@
msi_enabled = 1;
intr_register_pic(&msi_pic);
mtx_init(&msi_lock, "msi", NULL, MTX_DEF);
+
+ /* Check if we support extended destination IDs. */
+ switch (vm_guest) {
+ case VM_GUEST_KVM:
+ kvm_cpuid_get_features(regs);
+ if ((ext_dest_id == -1) &&
+ (regs[0] & KVM_FEATURE_MSI_EXT_DEST_ID))
+ ext_dest_id = 1;
+ break;
+ }
}
static void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Feb 27, 4:40 PM (20 m, 36 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29016934
Default Alt Text
D55427.diff (1 KB)
Attached To
Mode
D55427: KVM: Detect Extended Destination ID support
Attached
Detach File
Event Timeline
Log In to Comment