diff options
| -rw-r--r-- | Documentation/virtual/kvm/api.txt | 14 | ||||
| -rw-r--r-- | arch/arm64/kvm/reset.c | 5 | ||||
| -rw-r--r-- | include/uapi/linux/kvm.h | 2 |
3 files changed, 17 insertions, 4 deletions
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index 32afe7f5c35a..fac1887f25b5 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt | |||
| @@ -2763,13 +2763,19 @@ Possible features: | |||
| 2763 | 2763 | ||
| 2764 | - KVM_ARM_VCPU_PTRAUTH_ADDRESS: Enables Address Pointer authentication | 2764 | - KVM_ARM_VCPU_PTRAUTH_ADDRESS: Enables Address Pointer authentication |
| 2765 | for arm64 only. | 2765 | for arm64 only. |
| 2766 | Both KVM_ARM_VCPU_PTRAUTH_ADDRESS and KVM_ARM_VCPU_PTRAUTH_GENERIC | 2766 | Depends on KVM_CAP_ARM_PTRAUTH_ADDRESS. |
| 2767 | must be requested or neither must be requested. | 2767 | If KVM_CAP_ARM_PTRAUTH_ADDRESS and KVM_CAP_ARM_PTRAUTH_GENERIC are |
| 2768 | both present, then both KVM_ARM_VCPU_PTRAUTH_ADDRESS and | ||
| 2769 | KVM_ARM_VCPU_PTRAUTH_GENERIC must be requested or neither must be | ||
| 2770 | requested. | ||
| 2768 | 2771 | ||
| 2769 | - KVM_ARM_VCPU_PTRAUTH_GENERIC: Enables Generic Pointer authentication | 2772 | - KVM_ARM_VCPU_PTRAUTH_GENERIC: Enables Generic Pointer authentication |
| 2770 | for arm64 only. | 2773 | for arm64 only. |
| 2771 | Both KVM_ARM_VCPU_PTRAUTH_ADDRESS and KVM_ARM_VCPU_PTRAUTH_GENERIC | 2774 | Depends on KVM_CAP_ARM_PTRAUTH_GENERIC. |
| 2772 | must be requested or neither must be requested. | 2775 | If KVM_CAP_ARM_PTRAUTH_ADDRESS and KVM_CAP_ARM_PTRAUTH_GENERIC are |
| 2776 | both present, then both KVM_ARM_VCPU_PTRAUTH_ADDRESS and | ||
| 2777 | KVM_ARM_VCPU_PTRAUTH_GENERIC must be requested or neither must be | ||
| 2778 | requested. | ||
| 2773 | 2779 | ||
| 2774 | - KVM_ARM_VCPU_SVE: Enables SVE for the CPU (arm64 only). | 2780 | - KVM_ARM_VCPU_SVE: Enables SVE for the CPU (arm64 only). |
| 2775 | Depends on KVM_CAP_ARM_SVE. | 2781 | Depends on KVM_CAP_ARM_SVE. |
diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c index 028d0c604652..f0faf54f5857 100644 --- a/arch/arm64/kvm/reset.c +++ b/arch/arm64/kvm/reset.c | |||
| @@ -101,6 +101,11 @@ int kvm_arch_vm_ioctl_check_extension(struct kvm *kvm, long ext) | |||
| 101 | case KVM_CAP_ARM_SVE: | 101 | case KVM_CAP_ARM_SVE: |
| 102 | r = system_supports_sve(); | 102 | r = system_supports_sve(); |
| 103 | break; | 103 | break; |
| 104 | case KVM_CAP_ARM_PTRAUTH_ADDRESS: | ||
| 105 | case KVM_CAP_ARM_PTRAUTH_GENERIC: | ||
| 106 | r = has_vhe() && system_supports_address_auth() && | ||
| 107 | system_supports_generic_auth(); | ||
| 108 | break; | ||
| 104 | default: | 109 | default: |
| 105 | r = 0; | 110 | r = 0; |
| 106 | } | 111 | } |
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 1d564445b515..4dc34f8e29f6 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h | |||
| @@ -989,6 +989,8 @@ struct kvm_ppc_resize_hpt { | |||
| 989 | #define KVM_CAP_MANUAL_DIRTY_LOG_PROTECT 166 | 989 | #define KVM_CAP_MANUAL_DIRTY_LOG_PROTECT 166 |
| 990 | #define KVM_CAP_HYPERV_CPUID 167 | 990 | #define KVM_CAP_HYPERV_CPUID 167 |
| 991 | #define KVM_CAP_ARM_SVE 168 | 991 | #define KVM_CAP_ARM_SVE 168 |
| 992 | #define KVM_CAP_ARM_PTRAUTH_ADDRESS 169 | ||
| 993 | #define KVM_CAP_ARM_PTRAUTH_GENERIC 170 | ||
| 992 | 994 | ||
| 993 | #ifdef KVM_CAP_IRQ_ROUTING | 995 | #ifdef KVM_CAP_IRQ_ROUTING |
| 994 | 996 | ||
