Skip to content

Commit 88e5205

Browse files
committed
tools headers UAPI: Sync kvm headers with the kernel sources
To pick the changes in: 4af663c ("KVM: SEV: Allow per-guest configuration of GHCB protocol version") 4f5defa ("KVM: SEV: introduce KVM_SEV_INIT2 operation") 26c44aa ("KVM: SEV: define VM types for SEV and SEV-ES") ac5c480 ("KVM: SEV: publish supported VMSA features") 651d61b ("KVM: PPC: Fix documentation for ppc mmu caps") 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 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 Cc: Adrian Hunter <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Joel Stanley <[email protected]> Cc: Michael Ellerman <[email protected]> Cc: Michael Roth <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paolo Bonzini <[email protected]> Link: https://lore.kernel.org/lkml/ZlYxAdHjyAkvGtMW@x1 Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent ac4b069 commit 88e5205

File tree

2 files changed

+22
-4
lines changed
  • tools
    • arch/x86/include/uapi/asm
    • include/uapi/linux

2 files changed

+22
-4
lines changed

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

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,13 @@ struct kvm_sync_regs {
457457

458458
#define KVM_STATE_VMX_PREEMPTION_TIMER_DEADLINE 0x00000001
459459

460-
/* attributes for system fd (group 0) */
461-
#define KVM_X86_XCOMP_GUEST_SUPP 0
460+
/* vendor-independent attributes for system fd (group 0) */
461+
#define KVM_X86_GRP_SYSTEM 0
462+
# define KVM_X86_XCOMP_GUEST_SUPP 0
463+
464+
/* vendor-specific groups and attributes for system fd */
465+
#define KVM_X86_GRP_SEV 1
466+
# define KVM_X86_SEV_VMSA_FEATURES 0
462467

463468
struct kvm_vmx_nested_state_data {
464469
__u8 vmcs12[KVM_STATE_NESTED_VMX_VMCS_SIZE];
@@ -689,6 +694,9 @@ enum sev_cmd_id {
689694
/* Guest Migration Extension */
690695
KVM_SEV_SEND_CANCEL,
691696

697+
/* Second time is the charm; improved versions of the above ioctls. */
698+
KVM_SEV_INIT2,
699+
692700
KVM_SEV_NR_MAX,
693701
};
694702

@@ -700,6 +708,14 @@ struct kvm_sev_cmd {
700708
__u32 sev_fd;
701709
};
702710

711+
struct kvm_sev_init {
712+
__u64 vmsa_features;
713+
__u32 flags;
714+
__u16 ghcb_version;
715+
__u16 pad1;
716+
__u32 pad2[8];
717+
};
718+
703719
struct kvm_sev_launch_start {
704720
__u32 handle;
705721
__u32 policy;
@@ -856,5 +872,7 @@ struct kvm_hyperv_eventfd {
856872

857873
#define KVM_X86_DEFAULT_VM 0
858874
#define KVM_X86_SW_PROTECTED_VM 1
875+
#define KVM_X86_SEV_VM 2
876+
#define KVM_X86_SEV_ES_VM 3
859877

860878
#endif /* _ASM_X86_KVM_H */

tools/include/uapi/linux/kvm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,9 +1221,9 @@ struct kvm_vfio_spapr_tce {
12211221
/* Available with KVM_CAP_SPAPR_RESIZE_HPT */
12221222
#define KVM_PPC_RESIZE_HPT_PREPARE _IOR(KVMIO, 0xad, struct kvm_ppc_resize_hpt)
12231223
#define KVM_PPC_RESIZE_HPT_COMMIT _IOR(KVMIO, 0xae, struct kvm_ppc_resize_hpt)
1224-
/* Available with KVM_CAP_PPC_RADIX_MMU or KVM_CAP_PPC_MMU_HASH_V3 */
1224+
/* Available with KVM_CAP_PPC_MMU_RADIX or KVM_CAP_PPC_MMU_HASH_V3 */
12251225
#define KVM_PPC_CONFIGURE_V3_MMU _IOW(KVMIO, 0xaf, struct kvm_ppc_mmuv3_cfg)
1226-
/* Available with KVM_CAP_PPC_RADIX_MMU */
1226+
/* Available with KVM_CAP_PPC_MMU_RADIX */
12271227
#define KVM_PPC_GET_RMMU_INFO _IOW(KVMIO, 0xb0, struct kvm_ppc_rmmu_info)
12281228
/* Available with KVM_CAP_PPC_GET_CPU_CHAR */
12291229
#define KVM_PPC_GET_CPU_CHAR _IOR(KVMIO, 0xb1, struct kvm_ppc_cpu_char)

0 commit comments

Comments
 (0)