Commit 13720a56 authored by Marc Zyngier's avatar Marc Zyngier

arm64: KVM: Move kvm/hyp/hyp.h to include/asm/kvm_hyp.h

In order to be able to move code outside of kvm/hyp, we need to make
the global hyp.h file accessible from a standard location.

include/asm/kvm_hyp.h seems good enough.
Acked-by: default avatarChristoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
parent 1f364c8c
...@@ -19,9 +19,7 @@ ...@@ -19,9 +19,7 @@
#include <linux/kvm_host.h> #include <linux/kvm_host.h>
#include <asm/kvm_asm.h> #include <asm/kvm_asm.h>
#include <asm/kvm_mmu.h> #include <asm/kvm_hyp.h>
#include "hyp.h"
#define read_debug(r,n) read_sysreg(r##n##_el1) #define read_debug(r,n) read_sysreg(r##n##_el1)
#define write_debug(v,r,n) write_sysreg(v, r##n##_el1) #define write_debug(v,r,n) write_sysreg(v, r##n##_el1)
......
...@@ -18,8 +18,7 @@ ...@@ -18,8 +18,7 @@
#include <linux/types.h> #include <linux/types.h>
#include <asm/kvm_arm.h> #include <asm/kvm_arm.h>
#include <asm/kvm_asm.h> #include <asm/kvm_asm.h>
#include <asm/kvm_hyp.h>
#include "hyp.h"
void __hyp_text __init_stage2_translation(void) void __hyp_text __init_stage2_translation(void)
{ {
......
...@@ -17,8 +17,7 @@ ...@@ -17,8 +17,7 @@
#include <linux/types.h> #include <linux/types.h>
#include <asm/kvm_asm.h> #include <asm/kvm_asm.h>
#include <asm/kvm_hyp.h>
#include "hyp.h"
static bool __hyp_text __fpsimd_enabled_nvhe(void) static bool __hyp_text __fpsimd_enabled_nvhe(void)
{ {
......
...@@ -19,9 +19,7 @@ ...@@ -19,9 +19,7 @@
#include <linux/kvm_host.h> #include <linux/kvm_host.h>
#include <asm/kvm_asm.h> #include <asm/kvm_asm.h>
#include <asm/kvm_mmu.h> #include <asm/kvm_hyp.h>
#include "hyp.h"
/* Yes, this does nothing, on purpose */ /* Yes, this does nothing, on purpose */
static void __hyp_text __sysreg_do_nothing(struct kvm_cpu_context *ctxt) { } static void __hyp_text __sysreg_do_nothing(struct kvm_cpu_context *ctxt) { }
......
...@@ -19,9 +19,7 @@ ...@@ -19,9 +19,7 @@
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/kvm_host.h> #include <linux/kvm_host.h>
#include <asm/kvm_mmu.h> #include <asm/kvm_hyp.h>
#include "hyp.h"
/* vcpu is already in the HYP VA space */ /* vcpu is already in the HYP VA space */
void __hyp_text __timer_save_state(struct kvm_vcpu *vcpu) void __hyp_text __timer_save_state(struct kvm_vcpu *vcpu)
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "hyp.h" #include <asm/kvm_hyp.h>
static void __hyp_text __tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa) static void __hyp_text __tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa)
{ {
......
...@@ -19,9 +19,7 @@ ...@@ -19,9 +19,7 @@
#include <linux/irqchip/arm-gic.h> #include <linux/irqchip/arm-gic.h>
#include <linux/kvm_host.h> #include <linux/kvm_host.h>
#include <asm/kvm_mmu.h> #include <asm/kvm_hyp.h>
#include "hyp.h"
/* vcpu is already in the HYP VA space */ /* vcpu is already in the HYP VA space */
void __hyp_text __vgic_v2_save_state(struct kvm_vcpu *vcpu) void __hyp_text __vgic_v2_save_state(struct kvm_vcpu *vcpu)
......
...@@ -19,9 +19,7 @@ ...@@ -19,9 +19,7 @@
#include <linux/irqchip/arm-gic-v3.h> #include <linux/irqchip/arm-gic-v3.h>
#include <linux/kvm_host.h> #include <linux/kvm_host.h>
#include <asm/kvm_mmu.h> #include <asm/kvm_hyp.h>
#include "hyp.h"
#define vtr_to_max_lr_idx(v) ((v) & 0xf) #define vtr_to_max_lr_idx(v) ((v) & 0xf)
#define vtr_to_nr_pri_bits(v) (((u32)(v) >> 29) + 1) #define vtr_to_nr_pri_bits(v) (((u32)(v) >> 29) + 1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment