Skip to content

Commit 8277581

Browse files
committed
tools headers: Sync the various kvm.h header copies
For powerpc, s390, x86 and the main uapi linux/kvm.h header, none of them entail changes in tooling. Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-avn7iy8f4tcm2y40sbsdk31m@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 685626d commit 8277581

File tree

4 files changed

+24
-6
lines changed
  • tools
    • arch
      • powerpc/include/uapi/asm
      • s390/include/uapi/asm
      • x86/include/uapi/asm
    • include/uapi/linux

4 files changed

+24
-6
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,7 @@ struct kvm_ppc_cpu_char {
634634

635635
#define KVM_REG_PPC_DEC_EXPIRY (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xbe)
636636
#define KVM_REG_PPC_ONLINE (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0xbf)
637+
#define KVM_REG_PPC_PTCR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xc0)
637638

638639
/* Transactional Memory checkpointed state:
639640
* This is all GPRs, all VSX regs and a subset of SPRs

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ struct kvm_s390_vm_cpu_subfunc {
160160
#define KVM_S390_VM_CRYPTO_ENABLE_DEA_KW 1
161161
#define KVM_S390_VM_CRYPTO_DISABLE_AES_KW 2
162162
#define KVM_S390_VM_CRYPTO_DISABLE_DEA_KW 3
163+
#define KVM_S390_VM_CRYPTO_ENABLE_APIE 4
164+
#define KVM_S390_VM_CRYPTO_DISABLE_APIE 5
163165

164166
/* kvm attributes for migration mode */
165167
#define KVM_S390_VM_MIGRATION_STOP 0

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,7 @@ struct kvm_vcpu_events {
300300
__u8 injected;
301301
__u8 nr;
302302
__u8 has_error_code;
303-
union {
304-
__u8 pad;
305-
__u8 pending;
306-
};
303+
__u8 pending;
307304
__u32 error_code;
308305
} exception;
309306
struct {
@@ -387,6 +384,7 @@ struct kvm_sync_regs {
387384

388385
#define KVM_STATE_NESTED_GUEST_MODE 0x00000001
389386
#define KVM_STATE_NESTED_RUN_PENDING 0x00000002
387+
#define KVM_STATE_NESTED_EVMCS 0x00000004
390388

391389
#define KVM_STATE_NESTED_SMM_GUEST_MODE 0x00000001
392390
#define KVM_STATE_NESTED_SMM_VMXON 0x00000002

tools/include/uapi/linux/kvm.h

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,13 +420,19 @@ struct kvm_run {
420420
struct kvm_coalesced_mmio_zone {
421421
__u64 addr;
422422
__u32 size;
423-
__u32 pad;
423+
union {
424+
__u32 pad;
425+
__u32 pio;
426+
};
424427
};
425428

426429
struct kvm_coalesced_mmio {
427430
__u64 phys_addr;
428431
__u32 len;
429-
__u32 pad;
432+
union {
433+
__u32 pad;
434+
__u32 pio;
435+
};
430436
__u8 data[8];
431437
};
432438

@@ -751,6 +757,15 @@ struct kvm_ppc_resize_hpt {
751757

752758
#define KVM_S390_SIE_PAGE_OFFSET 1
753759

760+
/*
761+
* On arm64, machine type can be used to request the physical
762+
* address size for the VM. Bits[7-0] are reserved for the guest
763+
* PA size shift (i.e, log2(PA_Size)). For backward compatibility,
764+
* value 0 implies the default IPA size, 40bits.
765+
*/
766+
#define KVM_VM_TYPE_ARM_IPA_SIZE_MASK 0xffULL
767+
#define KVM_VM_TYPE_ARM_IPA_SIZE(x) \
768+
((x) & KVM_VM_TYPE_ARM_IPA_SIZE_MASK)
754769
/*
755770
* ioctls for /dev/kvm fds:
756771
*/
@@ -958,6 +973,8 @@ struct kvm_ppc_resize_hpt {
958973
#define KVM_CAP_HYPERV_SEND_IPI 161
959974
#define KVM_CAP_COALESCED_PIO 162
960975
#define KVM_CAP_HYPERV_ENLIGHTENED_VMCS 163
976+
#define KVM_CAP_EXCEPTION_PAYLOAD 164
977+
#define KVM_CAP_ARM_VM_IPA_SIZE 165
961978

962979
#ifdef KVM_CAP_IRQ_ROUTING
963980

0 commit comments

Comments
 (0)