summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/kvm_cpufeature.h
blob: 3d245f96a9fee3325ff8c1b37f5930f97b2bd554 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) 2020 - Google LLC
 * Author: Quentin Perret <qperret@google.com>
 */

#ifndef __ARM64_KVM_CPUFEATURE_H__
#define __ARM64_KVM_CPUFEATURE_H__

#include <asm/cpufeature.h>

#include <linux/build_bug.h>

#if defined(__KVM_NVHE_HYPERVISOR__)
#define DECLARE_KVM_HYP_CPU_FTR_REG(name) extern struct arm64_ftr_reg name
#define DEFINE_KVM_HYP_CPU_FTR_REG(name) struct arm64_ftr_reg name
#else
#define DECLARE_KVM_HYP_CPU_FTR_REG(name) extern struct arm64_ftr_reg kvm_nvhe_sym(name)
#define DEFINE_KVM_HYP_CPU_FTR_REG(name) BUILD_BUG()
#endif

#endif