Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3423032pxb; Mon, 16 Nov 2020 14:25:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJwA6WhyEbAcHSuiCFiH/sZ9xo1GNHAJ75xeYT2VgVJlxw1Smz7zikT26z2upD/pf7PdXL51 X-Received: by 2002:a05:6402:1750:: with SMTP id v16mr17676318edx.241.1605565540010; Mon, 16 Nov 2020 14:25:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605565540; cv=none; d=google.com; s=arc-20160816; b=X3LEaMLzfeExpTpG29SzVwDsbqmB4HoYt2vKSRHD2BeoEdQbwbBuVnV1OB0cpQ62dB pYN+cFQLG80LIcKRbCZ4eqzY4eHzJN0sz4Z7EdneR7MJANOq7TzC/qXOL/2cdNHDjxTz XawKCIfX+W7uqNivM+UrqCWByvybx6e8nMV4jkOfb+ZZdnN3qnyC5cLM8mF35q3Vl0Tm +9xLKSBK3PTCs1H68hBmhGQHcU16/U+UdLGxPO3+7349pLm2LtTMKWDGmsiP2CX+Bjbd oNnNYK8nA2FtBSsLIC09DyMW345mx1LfCczMieZC2JbKhsrS/6pizZSCe5S3vdrhFXOy HzTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Bjd/L/G2RRJSREzHJQoP1g0vINVfsyI8Fcne4wQjdig=; b=BStciKsbCPXGiVXmfmDlsaNKYwsg1Zve4rmN51n71LJlJd9UjyrEgo89VjfbjqdYaf A7ZTKOS+cmjNqCYsNflYxje/kLn8i89L15tpLUZqRE9LSjLNABSg+1OSkmj/n/yCB21I ACBngfDDbQ4+gqnN122bHiaJWsJTHbGvMGe26dOFP+duQFx3NcTbThRmRHzYH5uqUHXK TDpgEAsYrjDNMN8BFfG2fkIOLXqYwb0RbLCcNIxDJKcB0eB1VHzk22ts8D6/KujWUwdz FdpFg0LbkSQimQEI3/Wp7huVxnLVUHvpihVC0EAmeTGEsJpdJDYHdrBeezR+RWLjVGCq GZsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=qwqZWyct; 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 gs9si5953300ejc.622.2020.11.16.14.25.16; Mon, 16 Nov 2020 14:25:39 -0800 (PST) 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=qwqZWyct; 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 S2387465AbgKPUng (ORCPT + 99 others); Mon, 16 Nov 2020 15:43:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387453AbgKPUnf (ORCPT ); Mon, 16 Nov 2020 15:43:35 -0500 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 145C0C0613D3 for ; Mon, 16 Nov 2020 12:43:35 -0800 (PST) Received: by mail-wr1-x441.google.com with SMTP id r17so20305278wrw.1 for ; Mon, 16 Nov 2020 12:43:35 -0800 (PST) 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=Bjd/L/G2RRJSREzHJQoP1g0vINVfsyI8Fcne4wQjdig=; b=qwqZWyct9mC77pKffhl9ewXjtbvEoGrUi8si2A11bZr9k90fjqy4CvCiKnuLULg9Xc xZsD/v5Iix62RPRCibgZ+tZiv+SAPkZFT0DU1jVhNoCjsPpbzg0xEMZviOo1l2H2yUz8 I+smY239ch51NxRdHId1zlz51cgAXoskrOxAl+34LkMpkUhax7TjrBGvoGaS7j5SHTuP rP+KPKvuViyoxyq+uLMMCi3W/Y9+hT5n3I6Es+ziNVR8puNxmjHXTNM4abQR2ONs8n4Q vKE4B6ftz/SWim21pNTXO6NEZmCl9EybGnnBehU1aiXeOinjaFvoX7K4ExASkiniuJ5E K2QQ== 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=Bjd/L/G2RRJSREzHJQoP1g0vINVfsyI8Fcne4wQjdig=; b=SFbf4AtJ9Q/lzvl3HWVt/jjbyp2LtQI58yokXhESbEl3F6kTR4LLYbbk51rqV39cNk jk5Qsie9pdSzAkrrOiZxSNqBC0UX968EGlH1b+w0MfAXYkFQ4WK8OQ1B4g0oCguHM8dw BOINhB48aYZhbTi+yyU1OuitVBfBbZ7Wmvyr55KQWUc7EBZStNNivaLRxwuv0le3nvfg zaYuRCHr/etvWH5NRs/arTh8mJ1UInLFGjO/WCPf2B5THeWwqp04SFVr2WWiJftoeayU z9ZU5O6sjlpyn3PC4Z0pftFfhDwnZLnhOBOosiGCu/6MMQxH8NZ7YMQML3p1of0Xcvz3 7OIw== X-Gm-Message-State: AOAM53271tFT4IydHdpOkUr2cvUW24QqLWLW3BLG7kckHQ7OagpQMxop HO5CrIV2Hwceim4zVQrE+p2k2g== X-Received: by 2002:adf:f183:: with SMTP id h3mr21954131wro.239.1605559413646; Mon, 16 Nov 2020 12:43:33 -0800 (PST) Received: from localhost ([2a01:4b00:8523:2d03:bc40:bd71:373a:1b33]) by smtp.gmail.com with ESMTPSA id a18sm530393wmm.22.2020.11.16.12.43.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Nov 2020 12:43:32 -0800 (PST) From: David Brazdil To: kvmarm@lists.cs.columbia.edu Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , Catalin Marinas , Will Deacon , Dennis Zhou , Tejun Heo , Christoph Lameter , Mark Rutland , Lorenzo Pieralisi , Quentin Perret , Andrew Scull , Andrew Walbran , kernel-team@android.com, David Brazdil Subject: [PATCH v2 05/24] kvm: arm64: Initialize MAIR_EL2 using a constant Date: Mon, 16 Nov 2020 20:42:59 +0000 Message-Id: <20201116204318.63987-6-dbrazdil@google.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201116204318.63987-1-dbrazdil@google.com> References: <20201116204318.63987-1-dbrazdil@google.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org MAIR_EL2 is currently initialized to the value of MAIR_EL1, which itself is set to a constant MAIR_ELx_SET. Initialize MAIR_EL2 to MAIR_ELx_SET directly in preparation of allowing KVM to start CPU cores itself and not initializing itself before ERETing to EL1. In that case, MAIR_EL2 will be initialized before MAIR_EL1. Signed-off-by: David Brazdil --- arch/arm64/kvm/hyp/nvhe/hyp-init.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/hyp/nvhe/hyp-init.S b/arch/arm64/kvm/hyp/nvhe/hyp-init.S index b11a9d7db677..17b58dbc3a2f 100644 --- a/arch/arm64/kvm/hyp/nvhe/hyp-init.S +++ b/arch/arm64/kvm/hyp/nvhe/hyp-init.S @@ -111,7 +111,7 @@ alternative_else_nop_endif msr tcr_el2, x0 - mrs x0, mair_el1 + mov_q x0, MAIR_ELx_SET msr mair_el2, x0 isb -- 2.29.2.299.gdc1121823c-goog