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 extern bool __check_nv_sr_forward(struct kvm_vcpu *vcpu); 15 16 struct sys_reg_params; 17 struct sys_reg_desc; 18 19 void access_nested_id_reg(struct kvm_vcpu *v, struct sys_reg_params *p, 20 const struct sys_reg_desc *r); 21 22 #endif /* __ARM64_KVM_NESTED_H */ 23