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: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
This commit is contained in:
Marc Zyngier 2016-01-28 13:44:07 +00:00
parent 1f364c8c48
commit 13720a56ed
9 changed files with 8 additions and 20 deletions

View file

@ -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)

View file

@ -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)
{ {

View file

@ -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)
{ {

View file

@ -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) { }

View file

@ -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)

View file

@ -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)
{ {

View file

@ -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)

View file

@ -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)