History

KVM: x86: add KVM_CAP_X2APIC_API

KVM_CAP_X2APIC_API is a capability for features related to x2APIC enablement. KVM_X2APIC_API_32BIT_FORMAT feature can be enabled to extend APIC ID in get/set ioctl and MSI addresses to 32 bits. Both are needed to support x2APIC. The feature has to be enableable and disabled by default, because get/set ioctl shifted and truncated APIC ID to 8 bits by using a non-standard protocol inspired by xAPIC and the change is not backward-compatible. Changes to MSI addresses follow the format used by interrupt remapping unit. The upper address word, that used to be 0, contains upper 24 bits of the LAPIC address in its upper 24 bits. Lower 8 bits are reserved as 0. Using the upper address word is not backward-compatible either as we didn't check that userspace zeroed the word. Reserved bits are still not explicitly checked, but non-zero data will affect LAPIC addresses, which will cause a bug.

Radim Krčmář committed 10 years ago

Commit 37131311 parent c63cf538 files · +99 −13Browse files

Showing the changes to include/uapi/linux (1 of 8 files). Show all

Unified · Split

include/uapi/linux/kvm.h+3−0
@@ -866,6 +866,7 @@ struct kvm_ppc_smmu_info { · 865 unmodified lines
866866 #define KVM_CAP_ARM_PMU_V3 126
867867 #define KVM_CAP_VCPU_ATTRIBUTES 127
868868 #define KVM_CAP_MAX_VCPU_ID 128
869+#define KVM_CAP_X2APIC_API 129
869870
870871 #ifdef KVM_CAP_IRQ_ROUTING
871872
@@ -1313,4 +1314,6 @@ struct kvm_assigned_msix_entry { · 441 unmodified lines
13131314 __u16 padding[3];
13141315 };
13151316
1317+#define KVM_X2APIC_API_USE_32BIT_IDS (1ULL << 0)
1318+
13161319 #endif /* __LINUX_KVM_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t