Skip to content

Commit dd76c30

Browse files
committed
tools headers UAPI: Sync kvm.h headers with the kernel sources
To pick the changes in: f97f5a5 ("x86/kvm/hyper-v: Add support for synthetic debugger interface") 850448f ("KVM: nVMX: Fix VMX preemption timer migration") 2c4c413 ("KVM: x86: Print symbolic names of VMX VM-Exit flags in traces") cc440cd ("KVM: nSVM: implement KVM_GET_NESTED_STATE and KVM_SET_NESTED_STATE") f7d31e6 ("x86/kvm/hyper-v: Explicitly align hcall param for kvm_hyperv_exit") 72de5fa ("KVM: x86: announce KVM_FEATURE_ASYNC_PF_INT") acd0578 ("kvm: add capability for halt polling") 3ecad8c ("docs: fix broken references for ReST files that moved around") That do not result in any change in tooling, as the additions are not being used in any table generator. This silences these perf build warning: 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/x86/include/uapi/asm/vmx.h' differs from latest version at 'arch/x86/include/uapi/asm/vmx.h' diff -u tools/arch/x86/include/uapi/asm/vmx.h arch/x86/include/uapi/asm/vmx.h Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Matlack <dmatlack@google.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Jon Doron <arilou@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Peter Shier <pshier@google.com> Cc: Sean Christopherson <sean.j.christopherson@intel.com> Cc: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 377cb67 commit dd76c30

3 files changed

Lines changed: 36 additions & 2 deletions

File tree

‎tools/arch/x86/include/uapi/asm/kvm.h‎

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,33 +385,48 @@ struct kvm_sync_regs {
385385
#define KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT (1 << 4)
386386

387387
#define KVM_STATE_NESTED_FORMAT_VMX 0
388-
#define KVM_STATE_NESTED_FORMAT_SVM 1 /* unused */
388+
#define KVM_STATE_NESTED_FORMAT_SVM 1
389389

390390
#define KVM_STATE_NESTED_GUEST_MODE 0x00000001
391391
#define KVM_STATE_NESTED_RUN_PENDING 0x00000002
392392
#define KVM_STATE_NESTED_EVMCS 0x00000004
393393
#define KVM_STATE_NESTED_MTF_PENDING 0x00000008
394+
#define KVM_STATE_NESTED_GIF_SET 0x00000100
394395

395396
#define KVM_STATE_NESTED_SMM_GUEST_MODE 0x00000001
396397
#define KVM_STATE_NESTED_SMM_VMXON 0x00000002
397398

398399
#define KVM_STATE_NESTED_VMX_VMCS_SIZE 0x1000
399400

401+
#define KVM_STATE_NESTED_SVM_VMCB_SIZE 0x1000
402+
403+
#define KVM_STATE_VMX_PREEMPTION_TIMER_DEADLINE 0x00000001
404+
400405
struct kvm_vmx_nested_state_data {
401406
__u8 vmcs12[KVM_STATE_NESTED_VMX_VMCS_SIZE];
402407
__u8 shadow_vmcs12[KVM_STATE_NESTED_VMX_VMCS_SIZE];
403-
__u64 preemption_timer_deadline;
404408
};
405409

406410
struct kvm_vmx_nested_state_hdr {
411+
__u32 flags;
407412
__u64 vmxon_pa;
408413
__u64 vmcs12_pa;
414+
__u64 preemption_timer_deadline;
409415

410416
struct {
411417
__u16 flags;
412418
} smm;
413419
};
414420

421+
struct kvm_svm_nested_state_data {
422+
/* Save area only used if KVM_STATE_NESTED_RUN_PENDING. */
423+
__u8 vmcb12[KVM_STATE_NESTED_SVM_VMCB_SIZE];
424+
};
425+
426+
struct kvm_svm_nested_state_hdr {
427+
__u64 vmcb_pa;
428+
};
429+
415430
/* for KVM_CAP_NESTED_STATE */
416431
struct kvm_nested_state {
417432
__u16 flags;
@@ -420,6 +435,7 @@ struct kvm_nested_state {
420435

421436
union {
422437
struct kvm_vmx_nested_state_hdr vmx;
438+
struct kvm_svm_nested_state_hdr svm;
423439

424440
/* Pad the header to 128 bytes. */
425441
__u8 pad[120];
@@ -432,6 +448,7 @@ struct kvm_nested_state {
432448
*/
433449
union {
434450
struct kvm_vmx_nested_state_data vmx[0];
451+
struct kvm_svm_nested_state_data svm[0];
435452
} data;
436453
};
437454

‎tools/arch/x86/include/uapi/asm/vmx.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@
150150
{ EXIT_REASON_UMWAIT, "UMWAIT" }, \
151151
{ EXIT_REASON_TPAUSE, "TPAUSE" }
152152

153+
#define VMX_EXIT_REASON_FLAGS \
154+
{ VMX_EXIT_REASONS_FAILED_VMENTRY, "FAILED_VMENTRY" }
155+
153156
#define VMX_ABORT_SAVE_GUEST_MSR_FAIL 1
154157
#define VMX_ABORT_LOAD_HOST_PDPTE_FAIL 2
155158
#define VMX_ABORT_LOAD_HOST_MSR_FAIL 4

‎tools/include/uapi/linux/kvm.h‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,13 @@ struct kvm_s390_cmma_log {
188188
struct kvm_hyperv_exit {
189189
#define KVM_EXIT_HYPERV_SYNIC 1
190190
#define KVM_EXIT_HYPERV_HCALL 2
191+
#define KVM_EXIT_HYPERV_SYNDBG 3
191192
__u32 type;
193+
__u32 pad1;
192194
union {
193195
struct {
194196
__u32 msr;
197+
__u32 pad2;
195198
__u64 control;
196199
__u64 evt_page;
197200
__u64 msg_page;
@@ -201,6 +204,15 @@ struct kvm_hyperv_exit {
201204
__u64 result;
202205
__u64 params[2];
203206
} hcall;
207+
struct {
208+
__u32 msr;
209+
__u32 pad2;
210+
__u64 control;
211+
__u64 status;
212+
__u64 send_page;
213+
__u64 recv_page;
214+
__u64 pending_page;
215+
} syndbg;
204216
} u;
205217
};
206218

@@ -1017,6 +1029,8 @@ struct kvm_ppc_resize_hpt {
10171029
#define KVM_CAP_S390_VCPU_RESETS 179
10181030
#define KVM_CAP_S390_PROTECTED 180
10191031
#define KVM_CAP_PPC_SECURE_GUEST 181
1032+
#define KVM_CAP_HALT_POLL 182
1033+
#define KVM_CAP_ASYNC_PF_INT 183
10201034

10211035
#ifdef KVM_CAP_IRQ_ROUTING
10221036

0 commit comments

Comments
 (0)