summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/kvm_nested.h
blob: 249b03fc2ccee86d9534b872f9201ec558a24d40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __ARM64_KVM_NESTED_H
#define __ARM64_KVM_NESTED_H

#include <asm/kvm_emulate.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) &&
		vcpu_has_feature(vcpu, KVM_ARM_VCPU_HAS_EL2));
}

extern bool __check_nv_sr_forward(struct kvm_vcpu *vcpu);

int kvm_init_nv_sysregs(struct kvm *kvm);

#endif /* __ARM64_KVM_NESTED_H */