As there is a number of features that we either can't support, or don't want to support right away with NV, let's add some basic filtering so that we don't advertize silly things to the EL2 guest. Whilst we are at it, advertize FEAT_TTL as well as FEAT_GTG, which the NV implementation will implement. Reviewed-by: Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20230209175820.1939006-18-maz@kernel.org Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
21 lines
535 B
C
21 lines
535 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __ARM64_KVM_NESTED_H
|
|
#define __ARM64_KVM_NESTED_H
|
|
|
|
#include <linux/kvm_host.h>
|
|
|
|
static inline bool vcpu_has_nv(const struct kvm_vcpu *vcpu)
|
|
{
|
|
return (!__is_defined(__KVM_NVHE_HYPERVISOR__) &&
|
|
cpus_have_final_cap(ARM64_HAS_NESTED_VIRT) &&
|
|
test_bit(KVM_ARM_VCPU_HAS_EL2, vcpu->arch.features));
|
|
}
|
|
|
|
struct sys_reg_params;
|
|
struct sys_reg_desc;
|
|
|
|
void access_nested_id_reg(struct kvm_vcpu *v, struct sys_reg_params *p,
|
|
const struct sys_reg_desc *r);
|
|
|
|
#endif /* __ARM64_KVM_NESTED_H */
|