KVM: arm64: nv: Add kvm_has_pauth() helper
authorMarc Zyngier <maz@kernel.org>
Fri, 19 Apr 2024 10:29:31 +0000 (11:29 +0100)
committerMarc Zyngier <maz@kernel.org>
Sat, 20 Apr 2024 11:42:51 +0000 (12:42 +0100)
commit719f5206a8fd8336d23ccda6fe2a3287fbfb4c92
tree09cbde41fcccd0498c600a0cf01e3b4795e138bd
parent15db034733e4df3ca8ab4bf0a593a8a9b4860541
KVM: arm64: nv: Add kvm_has_pauth() helper

Pointer Authentication comes in many flavors, and a faithful emulation
relies on correctly handling the flavour implemented by the HW.

For this, provide a new kvm_has_pauth() that checks whether we
expose to the guest a particular level of support. This checks
across all 3 possible authentication algorithms (Q5, Q3 and IMPDEF).

Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20240419102935.1935571-12-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_host.h