mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:04:51 +01:00
tools headers UAPI: Sync x86's asm/kvm.h with the kernel sources
To pick the changes in:fddd07626b("KVM: x86: Define AMD's #HV, #VC, and #SX exception vectors")f2f5519aa4("KVM: x86: Define Control Protection Exception (#CP) vector")9d6812d415("KVM: x86: Enable guest SSP read/write interface with new uAPIs")06f2969c6a("KVM: x86: Introduce KVM_{G,S}ET_ONE_REG uAPIs support") That just rebuilds kvm-stat.c on x86, no change in functionality. This silences these perf build warning: Warning: Kernel ABI header differences: diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h Please see tools/include/uapi/README for further details. Cc: Sean Christopherson <seanjc@google.com> Cc: Yang Weijiang <weijiang.yang@intel.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
fde7f62642
commit
b1d46bc10f
1 changed files with 34 additions and 0 deletions
|
|
@ -35,6 +35,11 @@
|
|||
#define MC_VECTOR 18
|
||||
#define XM_VECTOR 19
|
||||
#define VE_VECTOR 20
|
||||
#define CP_VECTOR 21
|
||||
|
||||
#define HV_VECTOR 28
|
||||
#define VC_VECTOR 29
|
||||
#define SX_VECTOR 30
|
||||
|
||||
/* Select x86 specific features in <linux/kvm.h> */
|
||||
#define __KVM_HAVE_PIT
|
||||
|
|
@ -411,6 +416,35 @@ struct kvm_xcrs {
|
|||
__u64 padding[16];
|
||||
};
|
||||
|
||||
#define KVM_X86_REG_TYPE_MSR 2
|
||||
#define KVM_X86_REG_TYPE_KVM 3
|
||||
|
||||
#define KVM_X86_KVM_REG_SIZE(reg) \
|
||||
({ \
|
||||
reg == KVM_REG_GUEST_SSP ? KVM_REG_SIZE_U64 : 0; \
|
||||
})
|
||||
|
||||
#define KVM_X86_REG_TYPE_SIZE(type, reg) \
|
||||
({ \
|
||||
__u64 type_size = (__u64)type << 32; \
|
||||
\
|
||||
type_size |= type == KVM_X86_REG_TYPE_MSR ? KVM_REG_SIZE_U64 : \
|
||||
type == KVM_X86_REG_TYPE_KVM ? KVM_X86_KVM_REG_SIZE(reg) : \
|
||||
0; \
|
||||
type_size; \
|
||||
})
|
||||
|
||||
#define KVM_X86_REG_ID(type, index) \
|
||||
(KVM_REG_X86 | KVM_X86_REG_TYPE_SIZE(type, index) | index)
|
||||
|
||||
#define KVM_X86_REG_MSR(index) \
|
||||
KVM_X86_REG_ID(KVM_X86_REG_TYPE_MSR, index)
|
||||
#define KVM_X86_REG_KVM(index) \
|
||||
KVM_X86_REG_ID(KVM_X86_REG_TYPE_KVM, index)
|
||||
|
||||
/* KVM-defined registers starting from 0 */
|
||||
#define KVM_REG_GUEST_SSP 0
|
||||
|
||||
#define KVM_SYNC_X86_REGS (1UL << 0)
|
||||
#define KVM_SYNC_X86_SREGS (1UL << 1)
|
||||
#define KVM_SYNC_X86_EVENTS (1UL << 2)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue