[RFC PATCH part-1 1/5] pkvm: arm64: Move nvhe/spinlock.h to include/asm dir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Move nvhe/spinlock.h to include/asm dir, and rename to pkvm_spinlock.h.
This help to expose spinlock for pKVM, which is needed by the following
patch of moving pKVM page allocator to general dir.

Signed-off-by: Jason Chen CJ <jason.cj.chen@xxxxxxxxx>
---
 .../include/nvhe/spinlock.h => include/asm/pkvm_spinlock.h} | 6 +++---
 arch/arm64/kvm/hyp/include/nvhe/gfp.h                       | 2 +-
 arch/arm64/kvm/hyp/include/nvhe/mem_protect.h               | 2 +-
 arch/arm64/kvm/hyp/include/nvhe/mm.h                        | 2 +-
 arch/arm64/kvm/hyp/include/nvhe/pkvm.h                      | 2 +-
 arch/arm64/kvm/hyp/nvhe/mm.c                                | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/kvm/hyp/include/nvhe/spinlock.h b/arch/arm64/include/asm/pkvm_spinlock.h
similarity index 95%
rename from arch/arm64/kvm/hyp/include/nvhe/spinlock.h
rename to arch/arm64/include/asm/pkvm_spinlock.h
index 7c7ea8c55405..456417b40645 100644
--- a/arch/arm64/kvm/hyp/include/nvhe/spinlock.h
+++ b/arch/arm64/include/asm/pkvm_spinlock.h
@@ -10,8 +10,8 @@
  * Copyright (C) 2012 ARM Ltd.
  */
 
-#ifndef __ARM64_KVM_NVHE_SPINLOCK_H__
-#define __ARM64_KVM_NVHE_SPINLOCK_H__
+#ifndef __ARM64_ASM_PKVM_SPINLOCK_H__
+#define __ARM64_ASM_PKVM_SPINLOCK_H__
 
 #include <asm/alternative.h>
 #include <asm/lse.h>
@@ -122,4 +122,4 @@ static inline void hyp_assert_lock_held(hyp_spinlock_t *lock)
 static inline void hyp_assert_lock_held(hyp_spinlock_t *lock) { }
 #endif
 
-#endif /* __ARM64_KVM_NVHE_SPINLOCK_H__ */
+#endif /* __ARM64_ASM_PKVM_SPINLOCK_H__ */
diff --git a/arch/arm64/kvm/hyp/include/nvhe/gfp.h b/arch/arm64/kvm/hyp/include/nvhe/gfp.h
index 0a048dc06a7d..58e9f15b6a64 100644
--- a/arch/arm64/kvm/hyp/include/nvhe/gfp.h
+++ b/arch/arm64/kvm/hyp/include/nvhe/gfp.h
@@ -5,7 +5,7 @@
 #include <linux/list.h>
 
 #include <nvhe/memory.h>
-#include <nvhe/spinlock.h>
+#include <asm/pkvm_spinlock.h>
 
 #define HYP_NO_ORDER	USHRT_MAX
 
diff --git a/arch/arm64/kvm/hyp/include/nvhe/mem_protect.h b/arch/arm64/kvm/hyp/include/nvhe/mem_protect.h
index b7bdbe63deed..12b5db7a1ffe 100644
--- a/arch/arm64/kvm/hyp/include/nvhe/mem_protect.h
+++ b/arch/arm64/kvm/hyp/include/nvhe/mem_protect.h
@@ -12,7 +12,7 @@
 #include <asm/kvm_pgtable.h>
 #include <asm/virt.h>
 #include <nvhe/pkvm.h>
-#include <nvhe/spinlock.h>
+#include <asm/pkvm_spinlock.h>
 
 /*
  * SW bits 0-1 are reserved to track the memory ownership state of each page:
diff --git a/arch/arm64/kvm/hyp/include/nvhe/mm.h b/arch/arm64/kvm/hyp/include/nvhe/mm.h
index d5ec972b5c1e..1d50bb1da315 100644
--- a/arch/arm64/kvm/hyp/include/nvhe/mm.h
+++ b/arch/arm64/kvm/hyp/include/nvhe/mm.h
@@ -8,7 +8,7 @@
 #include <linux/types.h>
 
 #include <nvhe/memory.h>
-#include <nvhe/spinlock.h>
+#include <asm/pkvm_spinlock.h>
 
 extern struct kvm_pgtable pkvm_pgtable;
 extern hyp_spinlock_t pkvm_pgd_lock;
diff --git a/arch/arm64/kvm/hyp/include/nvhe/pkvm.h b/arch/arm64/kvm/hyp/include/nvhe/pkvm.h
index 82b3d62538a6..992d3492297b 100644
--- a/arch/arm64/kvm/hyp/include/nvhe/pkvm.h
+++ b/arch/arm64/kvm/hyp/include/nvhe/pkvm.h
@@ -10,7 +10,7 @@
 #include <asm/kvm_pkvm.h>
 
 #include <nvhe/gfp.h>
-#include <nvhe/spinlock.h>
+#include <asm/pkvm_spinlock.h>
 
 /*
  * Holds the relevant data for maintaining the vcpu state completely at hyp.
diff --git a/arch/arm64/kvm/hyp/nvhe/mm.c b/arch/arm64/kvm/hyp/nvhe/mm.c
index 318298eb3d6b..9f740e441bce 100644
--- a/arch/arm64/kvm/hyp/nvhe/mm.c
+++ b/arch/arm64/kvm/hyp/nvhe/mm.c
@@ -16,7 +16,7 @@
 #include <nvhe/memory.h>
 #include <nvhe/mem_protect.h>
 #include <nvhe/mm.h>
-#include <nvhe/spinlock.h>
+#include <asm/pkvm_spinlock.h>
 
 struct kvm_pgtable pkvm_pgtable;
 hyp_spinlock_t pkvm_pgd_lock;
-- 
2.25.1




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux