Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2339398pxk; Mon, 14 Sep 2020 10:37:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7tjAbLBLxd3VREEIpRQbdvmNCdomgxYLLTK4MdW2mm/nakqhLU8hA3Ylsk6+HFddR/Ebz X-Received: by 2002:a17:906:ce3b:: with SMTP id sd27mr15863794ejb.433.1600105049716; Mon, 14 Sep 2020 10:37:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600105049; cv=none; d=google.com; s=arc-20160816; b=S/qv35DbmXwNtyTas4yK/x9PQN0k11Aou8BQX5c8O1K94GSWAB/w+CizPDyYYclwwN 3VERhzlLwFpBRyqjELIiDbAlS6eJE8Mkg89QH7j6a1wIGczBTphNpYj4cUShrxrbfHCt mNK287hJ6BDJNbFLuSpiI7/ItkJp697HqHzX7fi2QF7nmCk1NwEnojxTSivPYoJuWvSt lFtC5XzkPaCztGuFDQb842f6ZM06cGPn1l03E9/g/8Mb++h9yx3jW+saQEpl+6pJlGqX B3PTsiP6+ZFssFcMYF7AOXlF9qDEABDkblKe021pqGR2XJQAtnxQ9cRsyIeVpX1ylhh4 NcgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=giQoIm7ww9o7WbiRNjhgzGzCrffBGGule76BQnYzoVI=; b=zGIKYUwbbSebMUPG41yPppZhAhoTEE4XXoQsVvPffDpv9/RNXCP4peuJaAcPnEvcDD P7n2NsOedrbJlN4RISJkYAVVlCh9Fvu2nQ9uMwjLcrmsNLXJ+BoLrh4znRGi1M0K6WBP SpTIx5Z7uSdeXTbp5FrsPSKi+avjkhyUBTXemrQO9rJclehkB+TYOrZldva28HM4xAV1 Tzj9u2rZhmwUjZ+Q4TRwKqfnXytgmqzHCzirzIN+RiziS3gAgs2HRn8TdmnNb5V9UFuf PdmDe6gHdgqYTces0MIKMfWg4XSo1+Y4EvuABIYp+NM4HMmlCRzr4cP24J8TPgd2L1hd ZNyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="uI/iQaAn"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v6si7571892edt.456.2020.09.14.10.37.06; Mon, 14 Sep 2020 10:37:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="uI/iQaAn"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726162AbgINReX (ORCPT + 99 others); Mon, 14 Sep 2020 13:34:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725987AbgINR2J (ORCPT ); Mon, 14 Sep 2020 13:28:09 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2415C061797 for ; Mon, 14 Sep 2020 10:28:06 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id w2so821226wmi.1 for ; Mon, 14 Sep 2020 10:28:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=giQoIm7ww9o7WbiRNjhgzGzCrffBGGule76BQnYzoVI=; b=uI/iQaAnhz3Rb1rxk2fe04dFKCupBX6ghPL7T1uUwqbl92dUULrnTdyKTCk5O3kQ5A JRjuhoIY2N1UVpWIl9QtCEy/iGMZnNG41xPQCXLPEJpOF2Tpd6sp0KALC2AD8lgXTu2j bUhIOKUvEicaIOZsb2+fYEOfBzUZ1nKGsTGcJ7O25/87/uOAalz5qnul5IPGNfg+fEqg xwQ/11H9wYnyUwG7mCMtj8+Uj1pYNYZXNe9fanGcdlFzOTGFDaPukkC2wT/8/DrREZR2 5cSu5T12OjmTPxWAQR/2dka541vyP0ossBIVmncwMUbW/+IU+sD/AgHfEeqZLjuhn9/c PkEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=giQoIm7ww9o7WbiRNjhgzGzCrffBGGule76BQnYzoVI=; b=bM0E+I75cE5qM8iNtD4LhYUF0DVIdL8KYganqNVtv1X+o4vMEXwt+iJrQe5OY6YnKc T57sRbnpC5hlj9eTtso/Jx7ONHuhtyIbbISo4BbMNvqG7CDpzy+0lfKn3FqFUvDl4nP1 BqXF+zKJbtfi/Q6zvfbhKM0ScA12T6WSEMg4KRnlF57dOYDFm3+SVuQ6hwb0C9kl2dbE pBWwl4Lb4+t6oRxQkDFQLqMDcFhZtzoD3xAcUC4MF9gEOneMCBNeFRglC8PprAwpW5US ELfdXZlw7wZkXJB9zALaN7b2UmNJNnigsyVejiNz8sJp0Vf9UZaORE9GYnw16KWEkCtJ r3uQ== X-Gm-Message-State: AOAM533MYsAJiX/Izkq+XFd4mdTVkqDxSJITXbcafu8bVQPYOh/y+uk+ 7bNlpTpMbyZ4CSbFT9WXbtDGyQ== X-Received: by 2002:a1c:f608:: with SMTP id w8mr432260wmc.161.1600104485530; Mon, 14 Sep 2020 10:28:05 -0700 (PDT) Received: from localhost (49.222.77.34.bc.googleusercontent.com. [34.77.222.49]) by smtp.gmail.com with ESMTPSA id o9sm21315846wrw.58.2020.09.14.10.28.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Sep 2020 10:28:04 -0700 (PDT) From: George-Aurelian Popescu To: maz@kernel.org, catalin.marinas@arm.com, will@kernel.org, masahiroy@kernel.org, michal.lkml@markovi.net Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, clang-built-linux@googlegroups.com, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, natechancellor@gmail.com, ndesaulniers@google.com, dbrazdil@google.com, broonie@kernel.org, maskray@google.com, ascull@google.com, keescook@chromium.org, akpm@linux-foundation.org, dvyukov@google.com, elver@google.com, tglx@linutronix.de, arnd@arndb.de, George Popescu Subject: [PATCH 02/14] KVM: arm64: Define a macro for storing a value inside a per_cpu variable Date: Mon, 14 Sep 2020 17:27:38 +0000 Message-Id: <20200914172750.852684-3-georgepope@google.com> X-Mailer: git-send-email 2.28.0.618.gf4bc123cb7-goog In-Reply-To: <20200914172750.852684-1-georgepope@google.com> References: <20200914172750.852684-1-georgepope@google.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: George Popescu 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 --- 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