tools/include: Sync uapi/linux/kvm.h with the kernel sources
And other arch-specific UAPI headers to pick up changes from:4b23e0c199KVM: Ensure new code that references immediate_exit gets extra scrutiny85542adb65KVM: x86: Add KVM_RUN_X86_GUEST_MODE kvm_run flag6fef518594KVM: x86: Add a capability to configure bus frequency for APIC timer34ff659017x86/sev: Use kernel provided SVSM Calling Areas5dcc1e7614Merge tag 'kvm-x86-misc-6.11' of https://github.com/kvm-x86/linux into HEAD9a0d2f4995KVM: PPC: Book3S HV: Add one-reg interface for HASHPKEYR registere9eb790b25KVM: PPC: Book3S HV: Add one-reg interface for HASHKEYR register1a1e6865f5KVM: PPC: Book3S HV: Add one-reg interface for DEXCR register This should be used to beautify KVM syscall arguments and it addresses these tools/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/powerpc/include/uapi/asm/kvm.h arch/powerpc/include/uapi/asm/kvm.h Please see tools/include/uapi/README for details (it's in the first patch of this series). Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: kvm@vger.kernel.org Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
@@ -192,11 +192,24 @@ struct kvm_xen_exit {
|
||||
/* Flags that describe what fields in emulation_failure hold valid data. */
|
||||
#define KVM_INTERNAL_ERROR_EMULATION_FLAG_INSTRUCTION_BYTES (1ULL << 0)
|
||||
|
||||
/*
|
||||
* struct kvm_run can be modified by userspace at any time, so KVM must be
|
||||
* careful to avoid TOCTOU bugs. In order to protect KVM, HINT_UNSAFE_IN_KVM()
|
||||
* renames fields in struct kvm_run from <symbol> to <symbol>__unsafe when
|
||||
* compiled into the kernel, ensuring that any use within KVM is obvious and
|
||||
* gets extra scrutiny.
|
||||
*/
|
||||
#ifdef __KERNEL__
|
||||
#define HINT_UNSAFE_IN_KVM(_symbol) _symbol##__unsafe
|
||||
#else
|
||||
#define HINT_UNSAFE_IN_KVM(_symbol) _symbol
|
||||
#endif
|
||||
|
||||
/* for KVM_RUN, returned by mmap(vcpu_fd, offset=0) */
|
||||
struct kvm_run {
|
||||
/* in */
|
||||
__u8 request_interrupt_window;
|
||||
__u8 immediate_exit;
|
||||
__u8 HINT_UNSAFE_IN_KVM(immediate_exit);
|
||||
__u8 padding1[6];
|
||||
|
||||
/* out */
|
||||
@@ -918,6 +931,8 @@ struct kvm_enable_cap {
|
||||
#define KVM_CAP_GUEST_MEMFD 234
|
||||
#define KVM_CAP_VM_TYPES 235
|
||||
#define KVM_CAP_PRE_FAULT_MEMORY 236
|
||||
#define KVM_CAP_X86_APIC_BUS_CYCLES_NS 237
|
||||
#define KVM_CAP_X86_GUEST_MODE 238
|
||||
|
||||
struct kvm_irq_routing_irqchip {
|
||||
__u32 irqchip;
|
||||
|
||||
Reference in New Issue
Block a user