mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
tools headers: Sync KVM headers with the kernel sources
To pick up the changes in:103ff3a50e("KVM: s390: Add capability to support 2G hugepages")229132c309("LoongArch: KVM: Add DMSINTC device support")2619da73bb("KVM: x86: Use __DECLARE_FLEX_ARRAY() for UAPI structures with VLAs")4aebd7d5c7("KVM: s390: Add KVM capability for ESA mode guests")4f256d5770("KVM: x86: nSVM: Save/restore gPAT with KVM_{GET,SET}_NESTED_STATE")822790ab01("KVM: x86: Define KVM_X86_QUIRK_NESTED_SVM_SHARED_PAT")8800dbf661("KVM: arm64: Allow userspace to create protected VMs when pKVM is enabled")bf8f3cec93("KVM: s390: vsie: Refactor handle_stfle")c547c51ff4("KVM: arm64: gic-v5: Add ARM_VGIC_V5 device to KVM headers")d7507a94a0("KVM: SVM: Treat exit_code as an unsigned 64-bit value through all of KVM") This addresses these perf build warnings: 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/s390/include/uapi/asm/kvm.h arch/s390/include/uapi/asm/kvm.h Please see tools/include/uapi/README for further details. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
42bfbb3e8d
commit
fac520e43a
|
|
@ -444,6 +444,7 @@ struct kvm_s390_vm_cpu_machine {
|
|||
#define KVM_S390_VM_CPU_FEAT_PFMFI 11
|
||||
#define KVM_S390_VM_CPU_FEAT_SIGPIF 12
|
||||
#define KVM_S390_VM_CPU_FEAT_KSS 13
|
||||
#define KVM_S390_VM_CPU_FEAT_ASTFLEIE2 14
|
||||
struct kvm_s390_vm_cpu_feat {
|
||||
__u64 feat[16];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -197,13 +197,13 @@ struct kvm_msrs {
|
|||
__u32 nmsrs; /* number of msrs in entries */
|
||||
__u32 pad;
|
||||
|
||||
struct kvm_msr_entry entries[];
|
||||
__DECLARE_FLEX_ARRAY(struct kvm_msr_entry, entries);
|
||||
};
|
||||
|
||||
/* for KVM_GET_MSR_INDEX_LIST */
|
||||
struct kvm_msr_list {
|
||||
__u32 nmsrs; /* number of msrs in entries */
|
||||
__u32 indices[];
|
||||
__DECLARE_FLEX_ARRAY(__u32, indices);
|
||||
};
|
||||
|
||||
/* Maximum size of any access bitmap in bytes */
|
||||
|
|
@ -245,7 +245,7 @@ struct kvm_cpuid_entry {
|
|||
struct kvm_cpuid {
|
||||
__u32 nent;
|
||||
__u32 padding;
|
||||
struct kvm_cpuid_entry entries[];
|
||||
__DECLARE_FLEX_ARRAY(struct kvm_cpuid_entry, entries);
|
||||
};
|
||||
|
||||
struct kvm_cpuid_entry2 {
|
||||
|
|
@ -267,7 +267,7 @@ struct kvm_cpuid_entry2 {
|
|||
struct kvm_cpuid2 {
|
||||
__u32 nent;
|
||||
__u32 padding;
|
||||
struct kvm_cpuid_entry2 entries[];
|
||||
__DECLARE_FLEX_ARRAY(struct kvm_cpuid_entry2, entries);
|
||||
};
|
||||
|
||||
/* for KVM_GET_PIT and KVM_SET_PIT */
|
||||
|
|
@ -398,7 +398,7 @@ struct kvm_xsave {
|
|||
* the contents of CPUID leaf 0xD on the host.
|
||||
*/
|
||||
__u32 region[1024];
|
||||
__u32 extra[];
|
||||
__DECLARE_FLEX_ARRAY(__u32, extra);
|
||||
};
|
||||
|
||||
#define KVM_MAX_XCRS 16
|
||||
|
|
@ -477,6 +477,7 @@ struct kvm_sync_regs {
|
|||
#define KVM_X86_QUIRK_STUFF_FEATURE_MSRS (1 << 8)
|
||||
#define KVM_X86_QUIRK_IGNORE_GUEST_PAT (1 << 9)
|
||||
#define KVM_X86_QUIRK_VMCS12_ALLOW_FREEZE_IN_SMM (1 << 10)
|
||||
#define KVM_X86_QUIRK_NESTED_SVM_SHARED_PAT (1 << 11)
|
||||
|
||||
#define KVM_STATE_NESTED_FORMAT_VMX 0
|
||||
#define KVM_STATE_NESTED_FORMAT_SVM 1
|
||||
|
|
@ -532,6 +533,7 @@ struct kvm_svm_nested_state_data {
|
|||
|
||||
struct kvm_svm_nested_state_hdr {
|
||||
__u64 vmcb_pa;
|
||||
__u64 gpat;
|
||||
};
|
||||
|
||||
/* for KVM_CAP_NESTED_STATE */
|
||||
|
|
@ -566,7 +568,7 @@ struct kvm_pmu_event_filter {
|
|||
__u32 fixed_counter_bitmap;
|
||||
__u32 flags;
|
||||
__u32 pad[4];
|
||||
__u64 events[];
|
||||
__DECLARE_FLEX_ARRAY(__u64, events);
|
||||
};
|
||||
|
||||
#define KVM_PMU_EVENT_ALLOW 0
|
||||
|
|
|
|||
|
|
@ -103,38 +103,38 @@
|
|||
#define SVM_EXIT_VMGEXIT 0x403
|
||||
|
||||
/* SEV-ES software-defined VMGEXIT events */
|
||||
#define SVM_VMGEXIT_MMIO_READ 0x80000001
|
||||
#define SVM_VMGEXIT_MMIO_WRITE 0x80000002
|
||||
#define SVM_VMGEXIT_NMI_COMPLETE 0x80000003
|
||||
#define SVM_VMGEXIT_AP_HLT_LOOP 0x80000004
|
||||
#define SVM_VMGEXIT_AP_JUMP_TABLE 0x80000005
|
||||
#define SVM_VMGEXIT_MMIO_READ 0x80000001ull
|
||||
#define SVM_VMGEXIT_MMIO_WRITE 0x80000002ull
|
||||
#define SVM_VMGEXIT_NMI_COMPLETE 0x80000003ull
|
||||
#define SVM_VMGEXIT_AP_HLT_LOOP 0x80000004ull
|
||||
#define SVM_VMGEXIT_AP_JUMP_TABLE 0x80000005ull
|
||||
#define SVM_VMGEXIT_SET_AP_JUMP_TABLE 0
|
||||
#define SVM_VMGEXIT_GET_AP_JUMP_TABLE 1
|
||||
#define SVM_VMGEXIT_PSC 0x80000010
|
||||
#define SVM_VMGEXIT_GUEST_REQUEST 0x80000011
|
||||
#define SVM_VMGEXIT_EXT_GUEST_REQUEST 0x80000012
|
||||
#define SVM_VMGEXIT_AP_CREATION 0x80000013
|
||||
#define SVM_VMGEXIT_PSC 0x80000010ull
|
||||
#define SVM_VMGEXIT_GUEST_REQUEST 0x80000011ull
|
||||
#define SVM_VMGEXIT_EXT_GUEST_REQUEST 0x80000012ull
|
||||
#define SVM_VMGEXIT_AP_CREATION 0x80000013ull
|
||||
#define SVM_VMGEXIT_AP_CREATE_ON_INIT 0
|
||||
#define SVM_VMGEXIT_AP_CREATE 1
|
||||
#define SVM_VMGEXIT_AP_DESTROY 2
|
||||
#define SVM_VMGEXIT_SNP_RUN_VMPL 0x80000018
|
||||
#define SVM_VMGEXIT_SAVIC 0x8000001a
|
||||
#define SVM_VMGEXIT_SNP_RUN_VMPL 0x80000018ull
|
||||
#define SVM_VMGEXIT_SAVIC 0x8000001aull
|
||||
#define SVM_VMGEXIT_SAVIC_REGISTER_GPA 0
|
||||
#define SVM_VMGEXIT_SAVIC_UNREGISTER_GPA 1
|
||||
#define SVM_VMGEXIT_SAVIC_SELF_GPA ~0ULL
|
||||
#define SVM_VMGEXIT_HV_FEATURES 0x8000fffd
|
||||
#define SVM_VMGEXIT_TERM_REQUEST 0x8000fffe
|
||||
#define SVM_VMGEXIT_HV_FEATURES 0x8000fffdull
|
||||
#define SVM_VMGEXIT_TERM_REQUEST 0x8000fffeull
|
||||
#define SVM_VMGEXIT_TERM_REASON(reason_set, reason_code) \
|
||||
/* SW_EXITINFO1[3:0] */ \
|
||||
(((((u64)reason_set) & 0xf)) | \
|
||||
/* SW_EXITINFO1[11:4] */ \
|
||||
((((u64)reason_code) & 0xff) << 4))
|
||||
#define SVM_VMGEXIT_UNSUPPORTED_EVENT 0x8000ffff
|
||||
#define SVM_VMGEXIT_UNSUPPORTED_EVENT 0x8000ffffull
|
||||
|
||||
/* Exit code reserved for hypervisor/software use */
|
||||
#define SVM_EXIT_SW 0xf0000000
|
||||
#define SVM_EXIT_SW 0xf0000000ull
|
||||
|
||||
#define SVM_EXIT_ERR -1
|
||||
#define SVM_EXIT_ERR -1ull
|
||||
|
||||
#define SVM_EXIT_REASONS \
|
||||
{ SVM_EXIT_READ_CR0, "read_cr0" }, \
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include <linux/const.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/stddef.h>
|
||||
#include <linux/ioctl.h>
|
||||
#include <asm/kvm.h>
|
||||
|
||||
|
|
@ -542,7 +543,7 @@ struct kvm_coalesced_mmio {
|
|||
|
||||
struct kvm_coalesced_mmio_ring {
|
||||
__u32 first, last;
|
||||
struct kvm_coalesced_mmio coalesced_mmio[];
|
||||
__DECLARE_FLEX_ARRAY(struct kvm_coalesced_mmio, coalesced_mmio);
|
||||
};
|
||||
|
||||
#define KVM_COALESCED_MMIO_MAX \
|
||||
|
|
@ -592,7 +593,7 @@ struct kvm_clear_dirty_log {
|
|||
/* for KVM_SET_SIGNAL_MASK */
|
||||
struct kvm_signal_mask {
|
||||
__u32 len;
|
||||
__u8 sigset[];
|
||||
__DECLARE_FLEX_ARRAY(__u8, sigset);
|
||||
};
|
||||
|
||||
/* for KVM_TPR_ACCESS_REPORTING */
|
||||
|
|
@ -703,6 +704,11 @@ struct kvm_enable_cap {
|
|||
#define KVM_VM_TYPE_ARM_IPA_SIZE_MASK 0xffULL
|
||||
#define KVM_VM_TYPE_ARM_IPA_SIZE(x) \
|
||||
((x) & KVM_VM_TYPE_ARM_IPA_SIZE_MASK)
|
||||
|
||||
#define KVM_VM_TYPE_ARM_PROTECTED (1UL << 31)
|
||||
#define KVM_VM_TYPE_ARM_MASK (KVM_VM_TYPE_ARM_IPA_SIZE_MASK | \
|
||||
KVM_VM_TYPE_ARM_PROTECTED)
|
||||
|
||||
/*
|
||||
* ioctls for /dev/kvm fds:
|
||||
*/
|
||||
|
|
@ -989,6 +995,8 @@ struct kvm_enable_cap {
|
|||
#define KVM_CAP_ARM_SEA_TO_USER 245
|
||||
#define KVM_CAP_S390_USER_OPEREXEC 246
|
||||
#define KVM_CAP_S390_KEYOP 247
|
||||
#define KVM_CAP_S390_VSIE_ESAMODE 248
|
||||
#define KVM_CAP_S390_HPAGE_2G 249
|
||||
|
||||
struct kvm_irq_routing_irqchip {
|
||||
__u32 irqchip;
|
||||
|
|
@ -1051,7 +1059,7 @@ struct kvm_irq_routing_entry {
|
|||
struct kvm_irq_routing {
|
||||
__u32 nr;
|
||||
__u32 flags;
|
||||
struct kvm_irq_routing_entry entries[];
|
||||
__DECLARE_FLEX_ARRAY(struct kvm_irq_routing_entry, entries);
|
||||
};
|
||||
|
||||
#define KVM_IRQFD_FLAG_DEASSIGN (1 << 0)
|
||||
|
|
@ -1142,7 +1150,7 @@ struct kvm_dirty_tlb {
|
|||
|
||||
struct kvm_reg_list {
|
||||
__u64 n; /* number of regs */
|
||||
__u64 reg[];
|
||||
__DECLARE_FLEX_ARRAY(__u64, reg);
|
||||
};
|
||||
|
||||
struct kvm_one_reg {
|
||||
|
|
@ -1224,6 +1232,8 @@ enum kvm_device_type {
|
|||
#define KVM_DEV_TYPE_LOONGARCH_EIOINTC KVM_DEV_TYPE_LOONGARCH_EIOINTC
|
||||
KVM_DEV_TYPE_LOONGARCH_PCHPIC,
|
||||
#define KVM_DEV_TYPE_LOONGARCH_PCHPIC KVM_DEV_TYPE_LOONGARCH_PCHPIC
|
||||
KVM_DEV_TYPE_LOONGARCH_DMSINTC,
|
||||
#define KVM_DEV_TYPE_LOONGARCH_DMSINTC KVM_DEV_TYPE_LOONGARCH_DMSINTC
|
||||
KVM_DEV_TYPE_ARM_VGIC_V5,
|
||||
#define KVM_DEV_TYPE_ARM_VGIC_V5 KVM_DEV_TYPE_ARM_VGIC_V5
|
||||
|
||||
|
|
@ -1610,7 +1620,7 @@ struct kvm_stats_desc {
|
|||
#ifdef __KERNEL__
|
||||
char name[KVM_STATS_NAME_SIZE];
|
||||
#else
|
||||
char name[];
|
||||
__DECLARE_FLEX_ARRAY(char, name);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user