[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200914172750.852684-3-georgepope@google.com>
Date: Mon, 14 Sep 2020 17:27:38 +0000
From: George-Aurelian Popescu <georgepope@...gle.com>
To: maz@...nel.org, catalin.marinas@....com, will@...nel.org,
masahiroy@...nel.org, michal.lkml@...kovi.net
Cc: linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.cs.columbia.edu,
linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org,
clang-built-linux@...glegroups.com, james.morse@....com,
julien.thierry.kdev@...il.com, suzuki.poulose@....com,
natechancellor@...il.com, ndesaulniers@...gle.com,
dbrazdil@...gle.com, broonie@...nel.org, maskray@...gle.com,
ascull@...gle.com, keescook@...omium.org,
akpm@...ux-foundation.org, dvyukov@...gle.com, elver@...gle.com,
tglx@...utronix.de, arnd@...db.de,
George Popescu <georgepope@...gle.com>
Subject: [PATCH 02/14] KVM: arm64: Define a macro for storing a value inside a per_cpu variable
From: George Popescu <georgepope@...gle.com>
Use the hyp_str_this_cpu assembly macro to store a value in a per_cpu
variable. This macro is designed to be used inside of the hyp code.
Signed-off-by: George Popescu <georgepope@...gle.com>
---
arch/arm64/include/asm/kvm_asm.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/include/asm/kvm_asm.h b/arch/arm64/include/asm/kvm_asm.h
index 6f98fbd0ac81..200bb8d0a720 100644
--- a/arch/arm64/include/asm/kvm_asm.h
+++ b/arch/arm64/include/asm/kvm_asm.h
@@ -211,6 +211,11 @@ extern char __smccc_workaround_1_smc[__SMCCC_WORKAROUND_1_SMC_SZ];
ldr \reg, [\reg, \tmp]
.endm
+.macro hyp_str_this_cpu sym, reg, tmp1, tmp2
+ hyp_adr_this_cpu \tmp1, \sym, \tmp2
+ str \reg, [\tmp1]
+.endm
+
.macro get_host_ctxt reg, tmp
hyp_adr_this_cpu \reg, kvm_host_data, \tmp
add \reg, \reg, #HOST_DATA_CONTEXT
--
2.28.0.618.gf4bc123cb7-goog
Powered by blists - more mailing lists