Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools headers: Update the KVM headers with the kernel sources

To pick up the changes in:

af5366bea2cb9dfb KVM: x86: Drop the now unused KVM_X86_DISABLE_VALID_EXITS
915d2f0718a42ee0 KVM: Move KVM_REG_SIZE() definition to common uAPI header
5c17848134ab1ffb KVM: x86/xen: Restrict hypercall MSR to unofficial synthetic range
9364789567f9b492 KVM: x86: Add a VM type define for TDX
fa662c9080732b1f KVM: SVM: Add Idle HLT intercept support
3adaee78306148da KVM: arm64: Allow userspace to change the implementation ID registers
faf7714a47a25c62 KVM: arm64: nv: Allow userland to set VGIC maintenance IRQ
c0000e58c74eed07 KVM: arm64: Introduce KVM_REG_ARM_VENDOR_HYP_BMAP_2
f83c41fb3dddbf47 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>

+13 -7
+2 -3
tools/arch/arm64/include/uapi/asm/kvm.h
··· 43 43 #define KVM_COALESCED_MMIO_PAGE_OFFSET 1 44 44 #define KVM_DIRTY_LOG_PAGE_OFFSET 64 45 45 46 - #define KVM_REG_SIZE(id) \ 47 - (1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT)) 48 - 49 46 struct kvm_regs { 50 47 struct user_pt_regs regs; /* sp = sp_el0 */ 51 48 ··· 105 108 #define KVM_ARM_VCPU_PTRAUTH_ADDRESS 5 /* VCPU uses address authentication */ 106 109 #define KVM_ARM_VCPU_PTRAUTH_GENERIC 6 /* VCPU uses generic authentication */ 107 110 #define KVM_ARM_VCPU_HAS_EL2 7 /* Support nested virtualization */ 111 + #define KVM_ARM_VCPU_HAS_EL2_E2H0 8 /* Limit NV support to E2H RES0 */ 108 112 109 113 struct kvm_vcpu_init { 110 114 __u32 target; ··· 416 418 #define KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS 6 417 419 #define KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO 7 418 420 #define KVM_DEV_ARM_VGIC_GRP_ITS_REGS 8 421 + #define KVM_DEV_ARM_VGIC_GRP_MAINT_IRQ 9 419 422 #define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT 10 420 423 #define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_MASK \ 421 424 (0x3fffffULL << KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT)
+4
tools/arch/x86/include/uapi/asm/kvm.h
··· 559 559 #define KVM_XEN_HVM_CONFIG_PVCLOCK_TSC_UNSTABLE (1 << 7) 560 560 #define KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA (1 << 8) 561 561 562 + #define KVM_XEN_MSR_MIN_INDEX 0x40000000u 563 + #define KVM_XEN_MSR_MAX_INDEX 0x4fffffffu 564 + 562 565 struct kvm_xen_hvm_config { 563 566 __u32 flags; 564 567 __u32 msr; ··· 928 925 #define KVM_X86_SEV_VM 2 929 926 #define KVM_X86_SEV_ES_VM 3 930 927 #define KVM_X86_SNP_VM 4 928 + #define KVM_X86_TDX_VM 5 931 929 932 930 #endif /* _ASM_X86_KVM_H */
+2
tools/arch/x86/include/uapi/asm/svm.h
··· 95 95 #define SVM_EXIT_CR14_WRITE_TRAP 0x09e 96 96 #define SVM_EXIT_CR15_WRITE_TRAP 0x09f 97 97 #define SVM_EXIT_INVPCID 0x0a2 98 + #define SVM_EXIT_IDLE_HLT 0x0a6 98 99 #define SVM_EXIT_NPF 0x400 99 100 #define SVM_EXIT_AVIC_INCOMPLETE_IPI 0x401 100 101 #define SVM_EXIT_AVIC_UNACCELERATED_ACCESS 0x402 ··· 225 224 { SVM_EXIT_CR4_WRITE_TRAP, "write_cr4_trap" }, \ 226 225 { SVM_EXIT_CR8_WRITE_TRAP, "write_cr8_trap" }, \ 227 226 { SVM_EXIT_INVPCID, "invpcid" }, \ 227 + { SVM_EXIT_IDLE_HLT, "idle-halt" }, \ 228 228 { SVM_EXIT_NPF, "npf" }, \ 229 229 { SVM_EXIT_AVIC_INCOMPLETE_IPI, "avic_incomplete_ipi" }, \ 230 230 { SVM_EXIT_AVIC_UNACCELERATED_ACCESS, "avic_unaccelerated_access" }, \
+5 -4
tools/include/uapi/linux/kvm.h
··· 617 617 #define KVM_X86_DISABLE_EXITS_HLT (1 << 1) 618 618 #define KVM_X86_DISABLE_EXITS_PAUSE (1 << 2) 619 619 #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) 624 620 625 621 /* for KVM_ENABLE_CAP */ 626 622 struct kvm_enable_cap { ··· 929 933 #define KVM_CAP_PRE_FAULT_MEMORY 236 930 934 #define KVM_CAP_X86_APIC_BUS_CYCLES_NS 237 931 935 #define KVM_CAP_X86_GUEST_MODE 238 936 + #define KVM_CAP_ARM_WRITABLE_IMP_ID_REGS 239 932 937 933 938 struct kvm_irq_routing_irqchip { 934 939 __u32 irqchip; ··· 1067 1070 1068 1071 #define KVM_REG_SIZE_SHIFT 52 1069 1072 #define KVM_REG_SIZE_MASK 0x00f0000000000000ULL 1073 + 1074 + #define KVM_REG_SIZE(id) \ 1075 + (1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT)) 1076 + 1070 1077 #define KVM_REG_SIZE_U8 0x0000000000000000ULL 1071 1078 #define KVM_REG_SIZE_U16 0x0010000000000000ULL 1072 1079 #define KVM_REG_SIZE_U32 0x0020000000000000ULL