dd53f6102c30 ("Merge tag 'kvmarm-for-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD") 59c5c58c5b93 ("Merge tag 'kvm-ppc-next-5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD") d7547c55cbe7 ("KVM: Introduce KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2") 6520ca64cde7 ("KVM: PPC: Book3S HV: XIVE: Add a mapping for the source ESB pages") 39e9af3de5ca ("KVM: PPC: Book3S HV: XIVE: Add a TIMA mapping") e4945b9da52b ("KVM: PPC: Book3S HV: XIVE: Add get/set accessors for the VP XIVE state") e6714bd1671d ("KVM: PPC: Book3S HV: XIVE: Add a control to dirty the XIVE EQ pages") 7b46b6169ab8 ("KVM: PPC: Book3S HV: XIVE: Add a control to sync the sources") 5ca806474859 ("KVM: PPC: Book3S HV: XIVE: Add a global reset control") 13ce3297c576 ("KVM: PPC: Book3S HV: XIVE: Add controls for the EQ configuration") e8676ce50e22 ("KVM: PPC: Book3S HV: XIVE: Add a control to configure a source") 4131f83c3d64 ("KVM: PPC: Book3S HV: XIVE: add a control to initialize a source") eacc56bb9de3 ("KVM: PPC: Book3S HV: XIVE: Introduce a new capability KVM_CAP_PPC_IRQ_XIVE") 90c73795afa2 ("KVM: PPC: Book3S HV: Add a new KVM device for the XIVE native exploitation mode") 4f45b90e1c03 ("KVM: s390: add deflate conversion facilty to cpu model") a243c16d18be ("KVM: arm64: Add capability to advertise ptrauth for guest") a22fa321d13b ("KVM: arm64: Add userspace flag to enable pointer authentication") 4bd774e57b29 ("KVM: arm64/sve: Simplify KVM_REG_ARM64_SVE_VLS array sizing") 8ae6efdde451 ("KVM: arm64/sve: Clean up UAPI register ID definitions") 173aec2d5a9f ("KVM: s390: add enhanced sort facilty to cpu model") 555f3d03e7fb ("KVM: arm64: Add a capability to advertise SVE support") 9033bba4b535 ("KVM: arm64/sve: Add pseudo-register for the guest's vector lengths") 7dd32a0d0103 ("KVM: arm/arm64: Add KVM_ARM_VCPU_FINALIZE ioctl") e1c9c98345b3 ("KVM: arm64/sve: Add SVE support to register access ioctl interface") 2b953ea34812 ("KVM: Allow 2048-bit register access via ioctl interface") None entails changes in tooling, the closest to that were some new arch specific ioctls, that are still not handled by the tools/perf/trace/beauty/ library, that needs to create per-arch tables to convert ioctl cmd->string (and back). From a quick look the arch specific kvm-stat.c files at: $ ls -1 tools/perf/arch/*/util/kvm-stat.c tools/perf/arch/powerpc/util/kvm-stat.c tools/perf/arch/s390/util/kvm-stat.c tools/perf/arch/x86/util/kvm-stat.c $ Are not affected. This silences these perf building warnings: 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/powerpc/include/uapi/asm/kvm.h' differs from latest version at 'arch/powerpc/include/uapi/asm/kvm.h' diff -u tools/arch/powerpc/include/uapi/asm/kvm.h arch/powerpc/include/uapi/asm/kvm.h Warning: Kernel ABI header at 'tools/arch/s390/include/uapi/asm/kvm.h' differs from latest version at 'arch/s390/include/uapi/asm/kvm.h' diff -u tools/arch/s390/include/uapi/asm/kvm.h arch/s390/include/uapi/asm/kvm.h Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm64/include/uapi/asm/kvm.h' diff -u tools/arch/arm64/include/uapi/asm/kvm.h arch/arm64/include/uapi/asm/kvm.h
Unified · Split
| @@ -35,6 +35,7 @@ · 34 unmodified lines | |||
| 35 | #include <linux/psci.h> | 35 | #include <linux/psci.h> |
| 36 | #include <linux/types.h> | 36 | #include <linux/types.h> |
| 37 | #include <asm/ptrace.h> | 37 | #include <asm/ptrace.h> |
| 38 | #include <asm/sve_context.h> | ||
| 38 | 39 | ||
| 39 | #define __KVM_HAVE_GUEST_DEBUG | 40 | #define __KVM_HAVE_GUEST_DEBUG |
| 40 | #define __KVM_HAVE_IRQ_LINE | 41 | #define __KVM_HAVE_IRQ_LINE |
| @@ -102,6 +103,9 @@ struct kvm_regs { · 61 unmodified lines | |||
| 102 | #define KVM_ARM_VCPU_EL1_32BIT 1 /* CPU running a 32bit VM */ | 103 | #define KVM_ARM_VCPU_EL1_32BIT 1 /* CPU running a 32bit VM */ |
| 103 | #define KVM_ARM_VCPU_PSCI_0_2 2 /* CPU uses PSCI v0.2 */ | 104 | #define KVM_ARM_VCPU_PSCI_0_2 2 /* CPU uses PSCI v0.2 */ |
| 104 | #define KVM_ARM_VCPU_PMU_V3 3 /* Support guest PMUv3 */ | 105 | #define KVM_ARM_VCPU_PMU_V3 3 /* Support guest PMUv3 */ |
| 106 | #define KVM_ARM_VCPU_SVE 4 /* enable SVE for this CPU */ | ||
| 107 | #define KVM_ARM_VCPU_PTRAUTH_ADDRESS 5 /* VCPU uses address authentication */ | ||
| 108 | #define KVM_ARM_VCPU_PTRAUTH_GENERIC 6 /* VCPU uses generic authentication */ | ||
| 105 | 109 | ||
| 106 | struct kvm_vcpu_init { | 110 | struct kvm_vcpu_init { |
| 107 | __u32 target; | 111 | __u32 target; |
| @@ -226,6 +230,45 @@ struct kvm_vcpu_events { · 118 unmodified lines | |||
| 226 | KVM_REG_ARM_FW | ((r) & 0xffff)) | 230 | KVM_REG_ARM_FW | ((r) & 0xffff)) |
| 227 | #define KVM_REG_ARM_PSCI_VERSION KVM_REG_ARM_FW_REG(0) | 231 | #define KVM_REG_ARM_PSCI_VERSION KVM_REG_ARM_FW_REG(0) |
| 228 | 232 | ||
| 233 | /* SVE registers */ | ||
| 234 | #define KVM_REG_ARM64_SVE (0x15 << KVM_REG_ARM_COPROC_SHIFT) | ||
| 235 | |||
| 236 | /* Z- and P-regs occupy blocks at the following offsets within this range: */ | ||
| 237 | #define KVM_REG_ARM64_SVE_ZREG_BASE 0 | ||
| 238 | #define KVM_REG_ARM64_SVE_PREG_BASE 0x400 | ||
| 239 | #define KVM_REG_ARM64_SVE_FFR_BASE 0x600 | ||
| 240 | |||
| 241 | #define KVM_ARM64_SVE_NUM_ZREGS __SVE_NUM_ZREGS | ||
| 242 | #define KVM_ARM64_SVE_NUM_PREGS __SVE_NUM_PREGS | ||
| 243 | |||
| 244 | #define KVM_ARM64_SVE_MAX_SLICES 32 | ||
| 245 | |||
| 246 | #define KVM_REG_ARM64_SVE_ZREG(n, i) \ | ||
| 247 | (KVM_REG_ARM64 | KVM_REG_ARM64_SVE | KVM_REG_ARM64_SVE_ZREG_BASE | \ | ||
| 248 | KVM_REG_SIZE_U2048 | \ | ||
| 249 | (((n) & (KVM_ARM64_SVE_NUM_ZREGS - 1)) << 5) | \ | ||
| 250 | ((i) & (KVM_ARM64_SVE_MAX_SLICES - 1))) | ||
| 251 | |||
| 252 | #define KVM_REG_ARM64_SVE_PREG(n, i) \ | ||
| 253 | (KVM_REG_ARM64 | KVM_REG_ARM64_SVE | KVM_REG_ARM64_SVE_PREG_BASE | \ | ||
| 254 | KVM_REG_SIZE_U256 | \ | ||
| 255 | (((n) & (KVM_ARM64_SVE_NUM_PREGS - 1)) << 5) | \ | ||
| 256 | ((i) & (KVM_ARM64_SVE_MAX_SLICES - 1))) | ||
| 257 | |||
| 258 | #define KVM_REG_ARM64_SVE_FFR(i) \ | ||
| 259 | (KVM_REG_ARM64 | KVM_REG_ARM64_SVE | KVM_REG_ARM64_SVE_FFR_BASE | \ | ||
| 260 | KVM_REG_SIZE_U256 | \ | ||
| 261 | ((i) & (KVM_ARM64_SVE_MAX_SLICES - 1))) | ||
| 262 | |||
| 263 | #define KVM_ARM64_SVE_VQ_MIN __SVE_VQ_MIN | ||
| 264 | #define KVM_ARM64_SVE_VQ_MAX __SVE_VQ_MAX | ||
| 265 | |||
| 266 | /* Vector lengths pseudo-register: */ | ||
| 267 | #define KVM_REG_ARM64_SVE_VLS (KVM_REG_ARM64 | KVM_REG_ARM64_SVE | \ | ||
| 268 | KVM_REG_SIZE_U512 | 0xffff) | ||
| 269 | #define KVM_ARM64_SVE_VLS_WORDS \ | ||
| 270 | ((KVM_ARM64_SVE_VQ_MAX - KVM_ARM64_SVE_VQ_MIN) / 64 + 1) | ||
| 271 | |||
| 229 | /* Device Control API: ARM VGIC */ | 272 | /* Device Control API: ARM VGIC */ |
| 230 | #define KVM_DEV_ARM_VGIC_GRP_ADDR 0 | 273 | #define KVM_DEV_ARM_VGIC_GRP_ADDR 0 |
| 231 | #define KVM_DEV_ARM_VGIC_GRP_DIST_REGS 1 | 274 | #define KVM_DEV_ARM_VGIC_GRP_DIST_REGS 1 |
| @@ -482,6 +482,8 @@ struct kvm_ppc_cpu_char { · 481 unmodified lines | |||
| 482 | #define KVM_REG_PPC_ICP_PPRI_SHIFT 16 /* pending irq priority */ | 482 | #define KVM_REG_PPC_ICP_PPRI_SHIFT 16 /* pending irq priority */ |
| 483 | #define KVM_REG_PPC_ICP_PPRI_MASK 0xff | 483 | #define KVM_REG_PPC_ICP_PPRI_MASK 0xff |
| 484 | 484 | ||
| 485 | #define KVM_REG_PPC_VP_STATE (KVM_REG_PPC | KVM_REG_SIZE_U128 | 0x8d) | ||
| 486 | |||
| 485 | /* Device control API: PPC-specific devices */ | 487 | /* Device control API: PPC-specific devices */ |
| 486 | #define KVM_DEV_MPIC_GRP_MISC 1 | 488 | #define KVM_DEV_MPIC_GRP_MISC 1 |
| 487 | #define KVM_DEV_MPIC_BASE_ADDR 0 /* 64-bit */ | 489 | #define KVM_DEV_MPIC_BASE_ADDR 0 /* 64-bit */ |
| @@ -677,4 +679,48 @@ struct kvm_ppc_cpu_char { · 189 unmodified lines | |||
| 677 | #define KVM_XICS_PRESENTED (1ULL << 43) | 679 | #define KVM_XICS_PRESENTED (1ULL << 43) |
| 678 | #define KVM_XICS_QUEUED (1ULL << 44) | 680 | #define KVM_XICS_QUEUED (1ULL << 44) |
| 679 | 681 | ||
| 682 | /* POWER9 XIVE Native Interrupt Controller */ | ||
| 683 | #define KVM_DEV_XIVE_GRP_CTRL 1 | ||
| 684 | #define KVM_DEV_XIVE_RESET 1 | ||
| 685 | #define KVM_DEV_XIVE_EQ_SYNC 2 | ||
| 686 | #define KVM_DEV_XIVE_GRP_SOURCE 2 /* 64-bit source identifier */ | ||
| 687 | #define KVM_DEV_XIVE_GRP_SOURCE_CONFIG 3 /* 64-bit source identifier */ | ||
| 688 | #define KVM_DEV_XIVE_GRP_EQ_CONFIG 4 /* 64-bit EQ identifier */ | ||
| 689 | #define KVM_DEV_XIVE_GRP_SOURCE_SYNC 5 /* 64-bit source identifier */ | ||
| 690 | |||
| 691 | /* Layout of 64-bit XIVE source attribute values */ | ||
| 692 | #define KVM_XIVE_LEVEL_SENSITIVE (1ULL << 0) | ||
| 693 | #define KVM_XIVE_LEVEL_ASSERTED (1ULL << 1) | ||
| 694 | |||
| 695 | /* Layout of 64-bit XIVE source configuration attribute values */ | ||
| 696 | #define KVM_XIVE_SOURCE_PRIORITY_SHIFT 0 | ||
| 697 | #define KVM_XIVE_SOURCE_PRIORITY_MASK 0x7 | ||
| 698 | #define KVM_XIVE_SOURCE_SERVER_SHIFT 3 | ||
| 699 | #define KVM_XIVE_SOURCE_SERVER_MASK 0xfffffff8ULL | ||
| 700 | #define KVM_XIVE_SOURCE_MASKED_SHIFT 32 | ||
| 701 | #define KVM_XIVE_SOURCE_MASKED_MASK 0x100000000ULL | ||
| 702 | #define KVM_XIVE_SOURCE_EISN_SHIFT 33 | ||
| 703 | #define KVM_XIVE_SOURCE_EISN_MASK 0xfffffffe00000000ULL | ||
| 704 | |||
| 705 | /* Layout of 64-bit EQ identifier */ | ||
| 706 | #define KVM_XIVE_EQ_PRIORITY_SHIFT 0 | ||
| 707 | #define KVM_XIVE_EQ_PRIORITY_MASK 0x7 | ||
| 708 | #define KVM_XIVE_EQ_SERVER_SHIFT 3 | ||
| 709 | #define KVM_XIVE_EQ_SERVER_MASK 0xfffffff8ULL | ||
| 710 | |||
| 711 | /* Layout of EQ configuration values (64 bytes) */ | ||
| 712 | struct kvm_ppc_xive_eq { | ||
| 713 | __u32 flags; | ||
| 714 | __u32 qshift; | ||
| 715 | __u64 qaddr; | ||
| 716 | __u32 qtoggle; | ||
| 717 | __u32 qindex; | ||
| 718 | __u8 pad[40]; | ||
| 719 | }; | ||
| 720 | |||
| 721 | #define KVM_XIVE_EQ_ALWAYS_NOTIFY 0x00000001 | ||
| 722 | |||
| 723 | #define KVM_XIVE_TIMA_PAGE_OFFSET 0 | ||
| 724 | #define KVM_XIVE_ESB_PAGE_OFFSET 4 | ||
| 725 | |||
| 680 | #endif /* __LINUX_KVM_POWERPC_H */ | 726 | #endif /* __LINUX_KVM_POWERPC_H */ |
| @@ -153,7 +153,9 @@ struct kvm_s390_vm_cpu_subfunc { · 152 unmodified lines | |||
| 153 | __u8 ppno[16]; /* with MSA5 */ | 153 | __u8 ppno[16]; /* with MSA5 */ |
| 154 | __u8 kma[16]; /* with MSA8 */ | 154 | __u8 kma[16]; /* with MSA8 */ |
| 155 | __u8 kdsa[16]; /* with MSA9 */ | 155 | __u8 kdsa[16]; /* with MSA9 */ |
| 156 | __u8 reserved[1792]; | 156 | __u8 sortl[32]; /* with STFLE.150 */ |
| 157 | __u8 dfltcc[32]; /* with STFLE.151 */ | ||
| 158 | __u8 reserved[1728]; | ||
| 157 | }; | 159 | }; |
| 158 | 160 | ||
| 159 | /* kvm attributes for crypto */ | 161 | /* kvm attributes for crypto */ |
| @@ -986,8 +986,13 @@ struct kvm_ppc_resize_hpt { · 985 unmodified lines | |||
| 986 | #define KVM_CAP_HYPERV_ENLIGHTENED_VMCS 163 | 986 | #define KVM_CAP_HYPERV_ENLIGHTENED_VMCS 163 |
| 987 | #define KVM_CAP_EXCEPTION_PAYLOAD 164 | 987 | #define KVM_CAP_EXCEPTION_PAYLOAD 164 |
| 988 | #define KVM_CAP_ARM_VM_IPA_SIZE 165 | 988 | #define KVM_CAP_ARM_VM_IPA_SIZE 165 |
| 989 | #define KVM_CAP_MANUAL_DIRTY_LOG_PROTECT 166 | 989 | #define KVM_CAP_MANUAL_DIRTY_LOG_PROTECT 166 /* Obsolete */ |
| 990 | #define KVM_CAP_HYPERV_CPUID 167 | 990 | #define KVM_CAP_HYPERV_CPUID 167 |
| 991 | #define KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 168 | ||
| 992 | #define KVM_CAP_PPC_IRQ_XIVE 169 | ||
| 993 | #define KVM_CAP_ARM_SVE 170 | ||
| 994 | #define KVM_CAP_ARM_PTRAUTH_ADDRESS 171 | ||
| 995 | #define KVM_CAP_ARM_PTRAUTH_GENERIC 172 | ||
| 991 | 996 | ||
| 992 | #ifdef KVM_CAP_IRQ_ROUTING | 997 | #ifdef KVM_CAP_IRQ_ROUTING |
| 993 | 998 | ||
| @@ -1145,6 +1150,7 @@ struct kvm_dirty_tlb { · 151 unmodified lines | |||
| 1145 | #define KVM_REG_SIZE_U256 0x0050000000000000ULL | 1150 | #define KVM_REG_SIZE_U256 0x0050000000000000ULL |
| 1146 | #define KVM_REG_SIZE_U512 0x0060000000000000ULL | 1151 | #define KVM_REG_SIZE_U512 0x0060000000000000ULL |
| 1147 | #define KVM_REG_SIZE_U1024 0x0070000000000000ULL | 1152 | #define KVM_REG_SIZE_U1024 0x0070000000000000ULL |
| 1153 | #define KVM_REG_SIZE_U2048 0x0080000000000000ULL | ||
| 1148 | 1154 | ||
| 1149 | struct kvm_reg_list { | 1155 | struct kvm_reg_list { |
| 1150 | __u64 n; /* number of regs */ | 1156 | __u64 n; /* number of regs */ |
| @@ -1211,6 +1217,8 @@ enum kvm_device_type { · 60 unmodified lines | |||
| 1211 | #define KVM_DEV_TYPE_ARM_VGIC_V3 KVM_DEV_TYPE_ARM_VGIC_V3 | 1217 | #define KVM_DEV_TYPE_ARM_VGIC_V3 KVM_DEV_TYPE_ARM_VGIC_V3 |
| 1212 | KVM_DEV_TYPE_ARM_VGIC_ITS, | 1218 | KVM_DEV_TYPE_ARM_VGIC_ITS, |
| 1213 | #define KVM_DEV_TYPE_ARM_VGIC_ITS KVM_DEV_TYPE_ARM_VGIC_ITS | 1219 | #define KVM_DEV_TYPE_ARM_VGIC_ITS KVM_DEV_TYPE_ARM_VGIC_ITS |
| 1220 | KVM_DEV_TYPE_XIVE, | ||
| 1221 | #define KVM_DEV_TYPE_XIVE KVM_DEV_TYPE_XIVE | ||
| 1214 | KVM_DEV_TYPE_MAX, | 1222 | KVM_DEV_TYPE_MAX, |
| 1215 | }; | 1223 | }; |
| 1216 | 1224 | ||
| @@ -1434,12 +1442,15 @@ struct kvm_enc_region { · 217 unmodified lines | |||
| 1434 | #define KVM_GET_NESTED_STATE _IOWR(KVMIO, 0xbe, struct kvm_nested_state) | 1442 | #define KVM_GET_NESTED_STATE _IOWR(KVMIO, 0xbe, struct kvm_nested_state) |
| 1435 | #define KVM_SET_NESTED_STATE _IOW(KVMIO, 0xbf, struct kvm_nested_state) | 1443 | #define KVM_SET_NESTED_STATE _IOW(KVMIO, 0xbf, struct kvm_nested_state) |
| 1436 | 1444 | ||
| 1437 | /* Available with KVM_CAP_MANUAL_DIRTY_LOG_PROTECT */ | 1445 | /* Available with KVM_CAP_MANUAL_DIRTY_LOG_PROTECT_2 */ |
| 1438 | #define KVM_CLEAR_DIRTY_LOG _IOWR(KVMIO, 0xc0, struct kvm_clear_dirty_log) | 1446 | #define KVM_CLEAR_DIRTY_LOG _IOWR(KVMIO, 0xc0, struct kvm_clear_dirty_log) |
| 1439 | 1447 | ||
| 1440 | /* Available with KVM_CAP_HYPERV_CPUID */ | 1448 | /* Available with KVM_CAP_HYPERV_CPUID */ |
| 1441 | #define KVM_GET_SUPPORTED_HV_CPUID _IOWR(KVMIO, 0xc1, struct kvm_cpuid2) | 1449 | #define KVM_GET_SUPPORTED_HV_CPUID _IOWR(KVMIO, 0xc1, struct kvm_cpuid2) |
| 1442 | 1450 | ||
| 1451 | /* Available with KVM_CAP_ARM_SVE */ | ||
| 1452 | #define KVM_ARM_VCPU_FINALIZE _IOW(KVMIO, 0xc2, int) | ||
| 1453 | |||
| 1443 | /* Secure Encrypted Virtualization command */ | 1454 | /* Secure Encrypted Virtualization command */ |
| 1444 | enum sev_cmd_id { | 1455 | enum sev_cmd_id { |
| 1445 | /* Guest initialization commands */ | 1456 | /* Guest initialization commands */ |