mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
tools headers kvm: Sync uapi/{asm/linux} kvm.h headers with the kernel sources
To pick up the changes in:89b0e7de34
("KVM: arm64: nv: Introduce nested virtualization VCPU feature")14329b825f
("KVM: x86/pmu: Introduce masked events to the pmu event filter")6213b701a9
("KVM: x86: Replace 0-length arrays with flexible arrays")3fd49805d1
("KVM: s390: Extend MEM_OP ioctl by storage key checked cmpxchg")14329b825f
("KVM: x86/pmu: Introduce masked events to the pmu event filter") That don't change functionality in tools/perf, as no new ioctl is added for the 'perf trace' scripts to harvest. This addresses these perf build warnings: Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h' diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/kvm.h' differs from latest version at 'arch/x86/include/uapi/asm/kvm.h' diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h' diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h Cc: Aaron Lewis <aaronlewis@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Christoffer Dall <christoffer.dall@arm.com> Cc: Ian Rogers <irogers@google.com> Cc: Janis Schoetterl-Glausch <scgl@linux.ibm.com> Cc: Janosch Frank <frankja@linux.ibm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kees Kook <keescook@chromium.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Oliver Upton <oliver.upton@linux.dev> Cc: Sean Christopherson <seanjc@google.com> Link: https://lore.kernel.org/lkml/ZAJlg7%2FfWDVGX0F3@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
5f800380af
commit
33c53f9b5a
@ -109,6 +109,7 @@ struct kvm_regs {
|
||||
#define KVM_ARM_VCPU_SVE 4 /* enable SVE for this CPU */
|
||||
#define KVM_ARM_VCPU_PTRAUTH_ADDRESS 5 /* VCPU uses address authentication */
|
||||
#define KVM_ARM_VCPU_PTRAUTH_GENERIC 6 /* VCPU uses generic authentication */
|
||||
#define KVM_ARM_VCPU_HAS_EL2 7 /* Support nested virtualization */
|
||||
|
||||
struct kvm_vcpu_init {
|
||||
__u32 target;
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/stddef.h>
|
||||
|
||||
#define KVM_PIO_PAGE_OFFSET 1
|
||||
#define KVM_COALESCED_MMIO_PAGE_OFFSET 2
|
||||
@ -507,8 +508,8 @@ struct kvm_nested_state {
|
||||
* KVM_{GET,PUT}_NESTED_STATE ioctl values.
|
||||
*/
|
||||
union {
|
||||
struct kvm_vmx_nested_state_data vmx[0];
|
||||
struct kvm_svm_nested_state_data svm[0];
|
||||
__DECLARE_FLEX_ARRAY(struct kvm_vmx_nested_state_data, vmx);
|
||||
__DECLARE_FLEX_ARRAY(struct kvm_svm_nested_state_data, svm);
|
||||
} data;
|
||||
};
|
||||
|
||||
@ -525,6 +526,35 @@ struct kvm_pmu_event_filter {
|
||||
#define KVM_PMU_EVENT_ALLOW 0
|
||||
#define KVM_PMU_EVENT_DENY 1
|
||||
|
||||
#define KVM_PMU_EVENT_FLAG_MASKED_EVENTS BIT(0)
|
||||
#define KVM_PMU_EVENT_FLAGS_VALID_MASK (KVM_PMU_EVENT_FLAG_MASKED_EVENTS)
|
||||
|
||||
/*
|
||||
* Masked event layout.
|
||||
* Bits Description
|
||||
* ---- -----------
|
||||
* 7:0 event select (low bits)
|
||||
* 15:8 umask match
|
||||
* 31:16 unused
|
||||
* 35:32 event select (high bits)
|
||||
* 36:54 unused
|
||||
* 55 exclude bit
|
||||
* 63:56 umask mask
|
||||
*/
|
||||
|
||||
#define KVM_PMU_ENCODE_MASKED_ENTRY(event_select, mask, match, exclude) \
|
||||
(((event_select) & 0xFFULL) | (((event_select) & 0XF00ULL) << 24) | \
|
||||
(((mask) & 0xFFULL) << 56) | \
|
||||
(((match) & 0xFFULL) << 8) | \
|
||||
((__u64)(!!(exclude)) << 55))
|
||||
|
||||
#define KVM_PMU_MASKED_ENTRY_EVENT_SELECT \
|
||||
(GENMASK_ULL(7, 0) | GENMASK_ULL(35, 32))
|
||||
#define KVM_PMU_MASKED_ENTRY_UMASK_MASK (GENMASK_ULL(63, 56))
|
||||
#define KVM_PMU_MASKED_ENTRY_UMASK_MATCH (GENMASK_ULL(15, 8))
|
||||
#define KVM_PMU_MASKED_ENTRY_EXCLUDE (BIT_ULL(55))
|
||||
#define KVM_PMU_MASKED_ENTRY_UMASK_MASK_SHIFT (56)
|
||||
|
||||
/* for KVM_{GET,SET,HAS}_DEVICE_ATTR */
|
||||
#define KVM_VCPU_TSC_CTRL 0 /* control group for the timestamp counter (TSC) */
|
||||
#define KVM_VCPU_TSC_OFFSET 0 /* attribute for the TSC offset */
|
||||
|
@ -583,6 +583,8 @@ struct kvm_s390_mem_op {
|
||||
struct {
|
||||
__u8 ar; /* the access register number */
|
||||
__u8 key; /* access key, ignored if flag unset */
|
||||
__u8 pad1[6]; /* ignored */
|
||||
__u64 old_addr; /* ignored if cmpxchg flag unset */
|
||||
};
|
||||
__u32 sida_offset; /* offset into the sida */
|
||||
__u8 reserved[32]; /* ignored */
|
||||
@ -595,11 +597,17 @@ struct kvm_s390_mem_op {
|
||||
#define KVM_S390_MEMOP_SIDA_WRITE 3
|
||||
#define KVM_S390_MEMOP_ABSOLUTE_READ 4
|
||||
#define KVM_S390_MEMOP_ABSOLUTE_WRITE 5
|
||||
#define KVM_S390_MEMOP_ABSOLUTE_CMPXCHG 6
|
||||
|
||||
/* flags for kvm_s390_mem_op->flags */
|
||||
#define KVM_S390_MEMOP_F_CHECK_ONLY (1ULL << 0)
|
||||
#define KVM_S390_MEMOP_F_INJECT_EXCEPTION (1ULL << 1)
|
||||
#define KVM_S390_MEMOP_F_SKEY_PROTECTION (1ULL << 2)
|
||||
|
||||
/* flags specifying extension support via KVM_CAP_S390_MEM_OP_EXTENSION */
|
||||
#define KVM_S390_MEMOP_EXTENSION_CAP_BASE (1 << 0)
|
||||
#define KVM_S390_MEMOP_EXTENSION_CAP_CMPXCHG (1 << 1)
|
||||
|
||||
/* for KVM_INTERRUPT */
|
||||
struct kvm_interrupt {
|
||||
/* in */
|
||||
@ -1175,6 +1183,7 @@ struct kvm_ppc_resize_hpt {
|
||||
#define KVM_CAP_DIRTY_LOG_RING_ACQ_REL 223
|
||||
#define KVM_CAP_S390_PROTECTED_ASYNC_DISABLE 224
|
||||
#define KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP 225
|
||||
#define KVM_CAP_PMU_EVENT_MASKED_EVENTS 226
|
||||
|
||||
#ifdef KVM_CAP_IRQ_ROUTING
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user