Skip to content

Commit ddc5929

Browse files
committed
tools headers: Update the KVM headers with the kernel sources
To pick up the changes in: af5366b KVM: x86: Drop the now unused KVM_X86_DISABLE_VALID_EXITS 915d2f0 KVM: Move KVM_REG_SIZE() definition to common uAPI header 5c17848 KVM: x86/xen: Restrict hypercall MSR to unofficial synthetic range 9364789 KVM: x86: Add a VM type define for TDX fa662c9 KVM: SVM: Add Idle HLT intercept support 3adaee7 KVM: arm64: Allow userspace to change the implementation ID registers faf7714 KVM: arm64: nv: Allow userland to set VGIC maintenance IRQ c0000e5 KVM: arm64: Introduce KVM_REG_ARM_VENDOR_HYP_BMAP_2 f83c41f KVM: arm64: Allow userspace to limit NV support to nVHE Addressing this perf tools build warning: Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h diff -u tools/arch/x86/include/uapi/asm/svm.h arch/x86/include/uapi/asm/svm.h diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h Please see tools/include/uapi/README for further details. Acked-by: Ingo Molnar <mingo@kernel.org> Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com> Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20250410001125.391820-2-namhyung@kernel.org Signed-off-by: Namhyung Kim <namhyung@kernel.org>
1 parent 0af2f6b commit ddc5929

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

tools/arch/arm64/include/uapi/asm/kvm.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@
4343
#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
4444
#define KVM_DIRTY_LOG_PAGE_OFFSET 64
4545

46-
#define KVM_REG_SIZE(id) \
47-
(1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT))
48-
4946
struct kvm_regs {
5047
struct user_pt_regs regs; /* sp = sp_el0 */
5148

@@ -108,6 +105,7 @@ struct kvm_regs {
108105
#define KVM_ARM_VCPU_PTRAUTH_ADDRESS 5 /* VCPU uses address authentication */
109106
#define KVM_ARM_VCPU_PTRAUTH_GENERIC 6 /* VCPU uses generic authentication */
110107
#define KVM_ARM_VCPU_HAS_EL2 7 /* Support nested virtualization */
108+
#define KVM_ARM_VCPU_HAS_EL2_E2H0 8 /* Limit NV support to E2H RES0 */
111109

112110
struct kvm_vcpu_init {
113111
__u32 target;
@@ -418,6 +416,7 @@ enum {
418416
#define KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS 6
419417
#define KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO 7
420418
#define KVM_DEV_ARM_VGIC_GRP_ITS_REGS 8
419+
#define KVM_DEV_ARM_VGIC_GRP_MAINT_IRQ 9
421420
#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT 10
422421
#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_MASK \
423422
(0x3fffffULL << KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT)

tools/arch/x86/include/uapi/asm/kvm.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,9 @@ struct kvm_x86_mce {
559559
#define KVM_XEN_HVM_CONFIG_PVCLOCK_TSC_UNSTABLE (1 << 7)
560560
#define KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA (1 << 8)
561561

562+
#define KVM_XEN_MSR_MIN_INDEX 0x40000000u
563+
#define KVM_XEN_MSR_MAX_INDEX 0x4fffffffu
564+
562565
struct kvm_xen_hvm_config {
563566
__u32 flags;
564567
__u32 msr;
@@ -925,5 +928,6 @@ struct kvm_hyperv_eventfd {
925928
#define KVM_X86_SEV_VM 2
926929
#define KVM_X86_SEV_ES_VM 3
927930
#define KVM_X86_SNP_VM 4
931+
#define KVM_X86_TDX_VM 5
928932

929933
#endif /* _ASM_X86_KVM_H */

tools/arch/x86/include/uapi/asm/svm.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
#define SVM_EXIT_CR14_WRITE_TRAP 0x09e
9696
#define SVM_EXIT_CR15_WRITE_TRAP 0x09f
9797
#define SVM_EXIT_INVPCID 0x0a2
98+
#define SVM_EXIT_IDLE_HLT 0x0a6
9899
#define SVM_EXIT_NPF 0x400
99100
#define SVM_EXIT_AVIC_INCOMPLETE_IPI 0x401
100101
#define SVM_EXIT_AVIC_UNACCELERATED_ACCESS 0x402
@@ -224,6 +225,7 @@
224225
{ SVM_EXIT_CR4_WRITE_TRAP, "write_cr4_trap" }, \
225226
{ SVM_EXIT_CR8_WRITE_TRAP, "write_cr8_trap" }, \
226227
{ SVM_EXIT_INVPCID, "invpcid" }, \
228+
{ SVM_EXIT_IDLE_HLT, "idle-halt" }, \
227229
{ SVM_EXIT_NPF, "npf" }, \
228230
{ SVM_EXIT_AVIC_INCOMPLETE_IPI, "avic_incomplete_ipi" }, \
229231
{ SVM_EXIT_AVIC_UNACCELERATED_ACCESS, "avic_unaccelerated_access" }, \

tools/include/uapi/linux/kvm.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -617,10 +617,6 @@ struct kvm_ioeventfd {
617617
#define KVM_X86_DISABLE_EXITS_HLT (1 << 1)
618618
#define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2)
619619
#define KVM_X86_DISABLE_EXITS_CSTATE (1 << 3)
620-
#define KVM_X86_DISABLE_VALID_EXITS (KVM_X86_DISABLE_EXITS_MWAIT | \
621-
KVM_X86_DISABLE_EXITS_HLT | \
622-
KVM_X86_DISABLE_EXITS_PAUSE | \
623-
KVM_X86_DISABLE_EXITS_CSTATE)
624620

625621
/* for KVM_ENABLE_CAP */
626622
struct kvm_enable_cap {
@@ -933,6 +929,7 @@ struct kvm_enable_cap {
933929
#define KVM_CAP_PRE_FAULT_MEMORY 236
934930
#define KVM_CAP_X86_APIC_BUS_CYCLES_NS 237
935931
#define KVM_CAP_X86_GUEST_MODE 238
932+
#define KVM_CAP_ARM_WRITABLE_IMP_ID_REGS 239
936933

937934
struct kvm_irq_routing_irqchip {
938935
__u32 irqchip;
@@ -1070,6 +1067,10 @@ struct kvm_dirty_tlb {
10701067

10711068
#define KVM_REG_SIZE_SHIFT 52
10721069
#define KVM_REG_SIZE_MASK 0x00f0000000000000ULL
1070+
1071+
#define KVM_REG_SIZE(id) \
1072+
(1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT))
1073+
10731074
#define KVM_REG_SIZE_U8 0x0000000000000000ULL
10741075
#define KVM_REG_SIZE_U16 0x0010000000000000ULL
10751076
#define KVM_REG_SIZE_U32 0x0020000000000000ULL

0 commit comments

Comments
 (0)