1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ARM64_KVM_NESTED_H
3 #define __ARM64_KVM_NESTED_H
4 
5 #include <linux/kvm_host.h>
6 
7 static inline bool vcpu_has_nv(const struct kvm_vcpu *vcpu)
8 {
9 	return (!__is_defined(__KVM_NVHE_HYPERVISOR__) &&
10 		cpus_have_final_cap(ARM64_HAS_NESTED_VIRT) &&
11 		test_bit(KVM_ARM_VCPU_HAS_EL2, vcpu->arch.features));
12 }
13 
14 struct sys_reg_params;
15 struct sys_reg_desc;
16 
17 void access_nested_id_reg(struct kvm_vcpu *v, struct sys_reg_params *p,
18 			  const struct sys_reg_desc *r);
19 
20 #endif /* __ARM64_KVM_NESTED_H */
21