1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ARM64_KVM_NESTED_H
3 #define __ARM64_KVM_NESTED_H
5 #include <asm/kvm_emulate.h>
6 #include <linux/kvm_host.h>
8 static inline bool vcpu_has_nv(const struct kvm_vcpu *vcpu)
10 return (!__is_defined(__KVM_NVHE_HYPERVISOR__) &&
11 cpus_have_final_cap(ARM64_HAS_NESTED_VIRT) &&
12 vcpu_has_feature(vcpu, KVM_ARM_VCPU_HAS_EL2));
15 extern bool __check_nv_sr_forward(struct kvm_vcpu *vcpu);
17 struct sys_reg_params;
20 void access_nested_id_reg(struct kvm_vcpu *v, struct sys_reg_params *p,
21 const struct sys_reg_desc *r);
23 #endif /* __ARM64_KVM_NESTED_H */