summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kvm/hyp/nvhe/sysreg-sr.c
diff options
context:
space:
mode:
authorDavid Brazdil <dbrazdil@google.com>2020-06-25 14:14:19 +0100
committerMarc Zyngier <maz@kernel.org>2020-07-05 18:38:45 +0100
commitc50cb04303cb88c517715b078e3e010c024af1a5 (patch)
tree8b0ecfb937dbe66af0b99e884b6d7a1dbe3541c8 /arch/arm64/kvm/hyp/nvhe/sysreg-sr.c
parentc04dd455eb311d2d289c9d81d080eaf11a06cebf (diff)
downloadlinux-c50cb04303cb88c517715b078e3e010c024af1a5.tar.bz2
KVM: arm64: Remove __hyp_text macro, use build rules instead
With nVHE code now fully separated from the rest of the kernel, the effects of the __hyp_text macro (which had to be applied on all nVHE code) can be achieved with build rules instead. The macro used to: (a) move code to .hyp.text ELF section, now done by renaming .text using `objcopy`, and (b) `notrace` and `__noscs` would negate effects of CC_FLAGS_FTRACE and CC_FLAGS_SCS, respectivelly, now those flags are erased from KBUILD_CFLAGS (same way as in EFI stub). Note that by removing __hyp_text from code shared with VHE, all VHE code is now compiled into .text and without `notrace` and `__noscs`. Use of '.pushsection .hyp.text' removed from assembly files as this is now also covered by the build rules. For MAINTAINERS: if needed to re-run, uses of macro were removed with the following command. Formatting was fixed up manually. find arch/arm64/kvm/hyp -type f -name '*.c' -o -name '*.h' \ -exec sed -i 's/ __hyp_text//g' {} + Signed-off-by: David Brazdil <dbrazdil@google.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20200625131420.71444-15-dbrazdil@google.com
Diffstat (limited to 'arch/arm64/kvm/hyp/nvhe/sysreg-sr.c')
-rw-r--r--arch/arm64/kvm/hyp/nvhe/sysreg-sr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm64/kvm/hyp/nvhe/sysreg-sr.c b/arch/arm64/kvm/hyp/nvhe/sysreg-sr.c
index 710cf28ab1ec..88a25fc8fcd3 100644
--- a/arch/arm64/kvm/hyp/nvhe/sysreg-sr.c
+++ b/arch/arm64/kvm/hyp/nvhe/sysreg-sr.c
@@ -18,7 +18,7 @@
* Non-VHE: Both host and guest must save everything.
*/
-void __hyp_text __sysreg_save_state_nvhe(struct kvm_cpu_context *ctxt)
+void __sysreg_save_state_nvhe(struct kvm_cpu_context *ctxt)
{
__sysreg_save_el1_state(ctxt);
__sysreg_save_common_state(ctxt);
@@ -26,7 +26,7 @@ void __hyp_text __sysreg_save_state_nvhe(struct kvm_cpu_context *ctxt)
__sysreg_save_el2_return_state(ctxt);
}
-void __hyp_text __sysreg_restore_state_nvhe(struct kvm_cpu_context *ctxt)
+void __sysreg_restore_state_nvhe(struct kvm_cpu_context *ctxt)
{
__sysreg_restore_el1_state(ctxt);
__sysreg_restore_common_state(ctxt);
@@ -34,7 +34,7 @@ void __hyp_text __sysreg_restore_state_nvhe(struct kvm_cpu_context *ctxt)
__sysreg_restore_el2_return_state(ctxt);
}
-void __hyp_text __kvm_enable_ssbs(void)
+void __kvm_enable_ssbs(void)
{
u64 tmp;