Message ID | 20221110190259.26861-11-will@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3CFA4C433FE for <linux-arm-kernel@archiver.kernel.org>; Thu, 10 Nov 2022 19:09:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=A3Cjvv/BknjVWAItU+o5TgLyn9tSZr0V/0SEPmEihr4=; b=mYgP03jLeGobSL CWwnT4Eh9q8EfUs7jND+MSzvTkZ1bi4ngM4ZnnXHmfiTDMB8awuAoHQOXuqtZ/FT/UZoydgzah10R jL7Xoau35ujNmCiDGqvmk4cYsn/PWJRfSzs8DY85vcc7vXGB132hLFr4tb4epwJi66CCBd+x3KgdL rtZhP0m7diOhE6uZY9ItPDgdzakXZ1hVHRNQGtFxt0HE1VT8b8InguoRjSODXva02WVTOqoTjEx0s KC+mIr6/FNvDtwTiLwxEfBVUXmCCpA6VCOs5wLIUoWGzl0QtY2Jw0+tLXsfgLqt4WiFUvqPcEClYd yiSzYxbibx1OrTk91x1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1otCuM-008VaR-Rr; Thu, 10 Nov 2022 19:08:15 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1otCq4-008SHy-3Q for linux-arm-kernel@lists.infradead.org; Thu, 10 Nov 2022 19:03:49 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id AA401B8231E; Thu, 10 Nov 2022 19:03:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 293FEC43470; Thu, 10 Nov 2022 19:03:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668107025; bh=9k8/sPRwAUxVgNQjSTnI7ywjADt90l5tppp1aip6mdc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QTi/Hf84Vy+VWu9hpaGWuHkfvicFUfV9DsbCdu5qpupNkNWATg6oRl/6zDsLN6T6j CwiHaN5Eptw6sdukQ1p3sPa2KY+uADScJVA84oXqhptuBcBhZo/dvtLT1WmRo3oR7E FNf7RNFm/htN8j7KaiTkBfAFhVI6W73XhURKcwUp4mWzd6VGRknyb5NxeBNxaR8e5w sC7+gMpgAGAjf1L1mOeh3xleekEgulWcfCt4AtNOklHLoAzRnACzr2BdoA9F3v4Dvs EFR92jfxFdnCmVIpa+5pTucM9NZkeZTvzAGpUH5rdq2I+t04Z/Cv/gY72X4mT8Fn24 AvsYuBpD3tFVQ== From: Will Deacon <will@kernel.org> To: kvmarm@lists.linux.dev Cc: Will Deacon <will@kernel.org>, Sean Christopherson <seanjc@google.com>, Vincent Donnefort <vdonnefort@google.com>, Alexandru Elisei <alexandru.elisei@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= <philmd@linaro.org>, James Morse <james.morse@arm.com>, Chao Peng <chao.p.peng@linux.intel.com>, Quentin Perret <qperret@google.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Mark Rutland <mark.rutland@arm.com>, Fuad Tabba <tabba@google.com>, Oliver Upton <oliver.upton@linux.dev>, Marc Zyngier <maz@kernel.org>, kernel-team@android.com, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v6 10/26] KVM: arm64: Add hyp_spinlock_t static initializer Date: Thu, 10 Nov 2022 19:02:43 +0000 Message-Id: <20221110190259.26861-11-will@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20221110190259.26861-1-will@kernel.org> References: <20221110190259.26861-1-will@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221110_110348_320471_E3939B22 X-CRM114-Status: GOOD ( 12.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
KVM: arm64: Introduce pKVM hyp VM and vCPU state at EL2
|
expand
|
diff --git a/arch/arm64/kvm/hyp/include/nvhe/spinlock.h b/arch/arm64/kvm/hyp/include/nvhe/spinlock.h index 4652fd04bdbe..7c7ea8c55405 100644 --- a/arch/arm64/kvm/hyp/include/nvhe/spinlock.h +++ b/arch/arm64/kvm/hyp/include/nvhe/spinlock.h @@ -28,9 +28,17 @@ typedef union hyp_spinlock { }; } hyp_spinlock_t; +#define __HYP_SPIN_LOCK_INITIALIZER \ + { .__val = 0 } + +#define __HYP_SPIN_LOCK_UNLOCKED \ + ((hyp_spinlock_t) __HYP_SPIN_LOCK_INITIALIZER) + +#define DEFINE_HYP_SPINLOCK(x) hyp_spinlock_t x = __HYP_SPIN_LOCK_UNLOCKED + #define hyp_spin_lock_init(l) \ do { \ - *(l) = (hyp_spinlock_t){ .__val = 0 }; \ + *(l) = __HYP_SPIN_LOCK_UNLOCKED; \ } while (0) static inline void hyp_spin_lock(hyp_spinlock_t *lock)