summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/uapi/asm/kvm.h
diff options
context:
space:
mode:
authorChristoffer Dall <christoffer.dall@arm.com>2023-02-09 18:58:05 +0100
committerOliver Upton <oliver.upton@linux.dev>2023-02-11 10:16:11 +0100
commit89b0e7de3451a17f23bc1c39bc40eee1811f1669 (patch)
tree3e8653407c25c04c0b441919cf2d7703d63c9473 /arch/arm64/include/uapi/asm/kvm.h
parentKVM: arm64: Use the S2 MMU context to iterate over S2 table (diff)
downloadlinux-89b0e7de3451a17f23bc1c39bc40eee1811f1669.tar.xz
linux-89b0e7de3451a17f23bc1c39bc40eee1811f1669.zip
KVM: arm64: nv: Introduce nested virtualization VCPU feature
Introduce the feature bit and a primitive that checks if the feature is set behind a static key check based on the cpus_have_const_cap check. Checking vcpu_has_nv() on systems without nested virt enabled should have negligible overhead. We don't yet allow userspace to actually set this feature. Reviewed-by: Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Christoffer Dall <christoffer.dall@arm.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20230209175820.1939006-4-maz@kernel.org Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'arch/arm64/include/uapi/asm/kvm.h')
-rw-r--r--arch/arm64/include/uapi/asm/kvm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm64/include/uapi/asm/kvm.h b/arch/arm64/include/uapi/asm/kvm.h
index a7a857f1784d..f8129c624b07 100644
--- a/arch/arm64/include/uapi/asm/kvm.h
+++ b/arch/arm64/include/uapi/asm/kvm.h
@@ -109,6 +109,7 @@ struct kvm_regs {
#define KVM_ARM_VCPU_SVE 4 /* enable SVE for this CPU */
#define KVM_ARM_VCPU_PTRAUTH_ADDRESS 5 /* VCPU uses address authentication */
#define KVM_ARM_VCPU_PTRAUTH_GENERIC 6 /* VCPU uses generic authentication */
+#define KVM_ARM_VCPU_HAS_EL2 7 /* Support nested virtualization */
struct kvm_vcpu_init {
__u32 target;