tools headers UAPI: Sync linux/kvm.h with the kernel sources
PATCH 1/1 tools headers UAPI: Sync linux/kvm.h with the kernel sources
tldr; Just FYI, I'm carrying this on the perf tools tree.
Full explanation:
There used to be no copies, with tools/ code using kernel headers directly. From time to time tools/perf/ broke due to legitimate kernel hacking. At some point Linus complained about such direct usage. Then we adopted the current model.
See further details at:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/include/uapi/README
To pick the changes in:
f7ab71f178d56447 ("KVM: s390: Add explicit padding to struct kvm_s390_keyop") 0ee4ddc1647b8b3b ("KVM: s390: Storage key manipulation IOCTL") fa9893fadbc245e1 ("KVM: Introduce KVM_EXIT_SNP_REQ_CERTS for SNP certificate-fetching") f174a9ffcd48d78a ("KVM: arm64: Add exit to userspace on {LD,ST}64B* outside of memslots")
That just rebuilds perf, as these patches add just one new KVM ioctl, but for S390, that is not being considered by tools/perf/trace/beauty/kvm_ioctl.sh so far.
This addresses this perf build warning:
Warning: Kernel ABI header differences:
diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h
Please see tools/include/uapi/README for further details.
--- tools/include/uapi/linux/kvm.h | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-)
tools/include/uapi/linux/kvm.h +23 -1
@@ -135,6 +135,12 @@ struct kvm_xen_exit { } u; }; +struct kvm_exit_snp_req_certs { +__u64 gpa; +__u64 npages; +__u64 ret; +}; +#define KVM_S390_GET_SKEYS_NONE 1#define KVM_S390_SKEYS_MAX 1048576
@@ -180,6 +186,8 @@ struct kvm_xen_exit {#define KVM_EXIT_MEMORY_FAULT 39#define KVM_EXIT_TDX 40#define KVM_EXIT_ARM_SEA 41 +#define KVM_EXIT_ARM_LDST64B 42 +#define KVM_EXIT_SNP_REQ_CERTS 43/* For KVM_EXIT_INTERNAL_ERROR */ /* Emulate instruction failed. */
@@ -402,7 +410,7 @@ struct kvm_run { } eoi;/* KVM_EXIT_HYPERV */ struct kvm_hyperv_exit hyperv; -/* KVM_EXIT_ARM_NISV */ +/* KVM_EXIT_ARM_NISV / KVM_EXIT_ARM_LDST64B */ struct {__u64 esr_iss;__u64 fault_ipa;
@@ -482,6 +490,8 @@ struct kvm_run {__u64 gva;__u64 gpa; } arm_sea; +/* KVM_EXIT_SNP_REQ_CERTS */ +struct kvm_exit_snp_req_certs snp_req_certs;/* Fix the size of the union. */ char padding[256 ]; };
@@ -974,6 +984,7 @@ struct kvm_enable_cap {#define KVM_CAP_GUEST_MEMFD_FLAGS 244#define KVM_CAP_ARM_SEA_TO_USER 245#define KVM_CAP_S390_USER_OPEREXEC 246 +#define KVM_CAP_S390_KEYOP 247struct kvm_irq_routing_irqchip {__u32 irqchip;
@@ -1219,6 +1230,16 @@ struct kvm_vfio_spapr_tce {__s32 tablefd; }; +#define KVM_S390_KEYOP_ISKE 0x01 +#define KVM_S390_KEYOP_RRBE 0x02 +#define KVM_S390_KEYOP_SSKE 0x03 +struct kvm_s390_keyop { +__u64 guest_addr; +__u8 key; +__u8 operation; +__u8 pad[6 ]; +}; +/* * KVM_CREATE_VCPU receives as a parameter the vcpu slot, and returns * a vcpu fd.
@@ -1238,6 +1259,7 @@ struct kvm_vfio_spapr_tce {#define KVM_S390_UCAS_MAP _IOW(KVMIO, 0x50, struct kvm_s390_ucas_mapping)#define KVM_S390_UCAS_UNMAP _IOW(KVMIO, 0x51, struct kvm_s390_ucas_mapping)#define KVM_S390_VCPU_FAULT _IOW(KVMIO, 0x52, unsigned long) +#define KVM_S390_KEYOP _IOWR(KVMIO, 0x53, struct kvm_s390_keyop)/* Device model IOC */ #define KVM_CREATE_IRQCHIP _IO(KVMIO, 0x60)
Signature · 1 line
2.53.0