]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
tools headers UAPI: Sync linux/kvm.h with the kernel sources
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 4 Mar 2026 15:32:19 +0000 (12:32 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 4 Mar 2026 15:32:19 +0000 (12:32 -0300)
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.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Claudio Imbrenda <imbrenda@linux.ibm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Michael Roth <michael.roth@amd.com>
Cc: Sean Christopherson <seanjc@google.com>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/include/uapi/linux/kvm.h

index dddb781b0507dcfe44079118ec1948095e21de3d..65500f5db37992f9b3b4c3af26bc4b66f591f904 100644 (file)
@@ -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 247
 
 struct 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)