Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3132774pxb; Mon, 9 Nov 2020 03:34:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJz7AzmJODl4dOmnCvH6FXnt5RRWZkGFjhwyIo+N4QulRoep0RjcmrzYDTVdYXiRdoihc9vN X-Received: by 2002:a17:906:7247:: with SMTP id n7mr14306792ejk.174.1604921695314; Mon, 09 Nov 2020 03:34:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604921695; cv=none; d=google.com; s=arc-20160816; b=CKT6m2YP5ln5IbCf2ynqYmxrFWybFUrKmKCoTIlfS8Ib+jCYYDPLWcUgUt4OL+eniq ls8rzEZ1KEyuT0md1HzsI6ZmiFDrb1ldNZcQuWhdCdTzQ3H7rlWSYAJ8dZQhxoCrsQLb H5sgeV2P5oQCMwVNeqckyD3TLcq3PP0a+sJSUxHWp+FRLhhbNSRWzS7CZDonOx24doA+ fOnMCdXRStnorDGzBuCmc/UfTXfgJ5X2ywqA0eNSthjlDenAPuzN7H56Co6s+jmFM3gj s33/xumDN7sbIR2Gz00YDwkCwGDBwE9r7KauzhTuV6Bez3yxkC5Dnregdehp0AwyAhH2 6hrw== 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=PeIzATuK4HaCEpAoHr0Z1pMl+lKl5fFRYxsg6dRwaTg=; b=s8f8U9v140GCU4vVpRX+8KXctr5TBG2Lyag1Gt0xV3gsI3kuJICKfuVsxu3wn4PxaE UZpXc8JV05hONzHanEaJNzug22X6QsfT3/1Iyzd02XZNgiSBhTVOJsMSEQNFnr+QV+9N WwP2u+1yluGXoAynpVvqje5/SAxSYpO5SnnAypBDPjjwtZEHNbcXmGQlJhvTuHVYZIHv UVUhUhiod6Saa3oRUCxR+FfkguYp2vySJulql7jdWx5kGhY1snoFCMgyww9QeEud87/h I/1xqSGHHtTbpEmdvxCOKXazGyoProlcuHHDTqtpgNaMy2ITFqK40iw4vWsDe/k8SVWh viyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=SyD0mWa9; 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 v5si9576076edi.14.2020.11.09.03.34.32; Mon, 09 Nov 2020 03:34:55 -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=SyD0mWa9; 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 S1729493AbgKILcx (ORCPT + 99 others); Mon, 9 Nov 2020 06:32:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729503AbgKILcv (ORCPT ); Mon, 9 Nov 2020 06:32:51 -0500 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64C35C0613CF for ; Mon, 9 Nov 2020 03:32:49 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id k2so4914403wrx.2 for ; Mon, 09 Nov 2020 03:32:49 -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=PeIzATuK4HaCEpAoHr0Z1pMl+lKl5fFRYxsg6dRwaTg=; b=SyD0mWa9i62nLyko7w4nkaHf7ozC+fygqfk86ETWkYyEDKiqrC9sxoXRkEb78sAa+g Q5YHHsufBgveiqRwJnVc4h75bxL7UirJVCgfACmmk0/wxzMgmhus7q9dfTf0+EGBYFih ++c2OLt6eafuSBAZr5rEkl04qlFEuqoGjl0BaealKzOslfViDNTgJRy8l072hl5Z0vO+ ZGhIiRZTpow3BtUcNFeME9o4ZmiMYklE4DW8x0BxuytqkKsy03j1NMCFN2b/JlvlVLNk 5dM23D18JCx33KIKpyB1zW/c1d+CJflcKJmxYjdoLt3i7qiM+VACIHVoFWUqGPEIf2RW eIeQ== 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=PeIzATuK4HaCEpAoHr0Z1pMl+lKl5fFRYxsg6dRwaTg=; b=d7r1v9BfKaMRUHlTX11bCnOJGCrcu29PhxYQZFEnIFnoCp3p2MU5WuUw+UUORQGeyo e1GmDFXIykkPh1OT8CKM64Is5VXdtVsF5LemSMkienrEudL8FGQ6b5gKmhIk0NY673Wb BovmeOi7v6REwikV/60gxfhVp+GQtCbJ8wkJVPRcJJmmVnt7OLoXSdmyeL+M/StetH0E qaNjrel6jWX1fyWPrcix7fJsCr8q4WQyKwJsc8pPpyICtKTdnDDg+pkKNlXCCdKUABLy EJbknohsAkxGzkZCmArAfrMCby+H9KInbfKY29rgVr/2IP5W2RaLEexJcFRBW7tUvqPN y/tg== X-Gm-Message-State: AOAM533m0tj+Wgb0utL/1XkHqzidMobgI5WZAKMDvut44eFij1tSp7Rw kRibJUG0JCyt05KpdSdQBEnZwg== X-Received: by 2002:a5d:530c:: with SMTP id e12mr11343267wrv.355.1604921567943; Mon, 09 Nov 2020 03:32:47 -0800 (PST) Received: from localhost ([2a01:4b00:8523:2d03:209d:10b7:c480:3e1f]) by smtp.gmail.com with ESMTPSA id o10sm12514211wma.47.2020.11.09.03.32.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Nov 2020 03:32:47 -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 v1 04/24] kvm: arm64: Initialize MAIR_EL2 using a constant Date: Mon, 9 Nov 2020 11:32:13 +0000 Message-Id: <20201109113233.9012-5-dbrazdil@google.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201109113233.9012-1-dbrazdil@google.com> References: <20201109113233.9012-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_EL1_SET. Initialize MAIR_EL2 to the MAIR_EL1_SET constant 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..96e70f976ff5 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_EL1_SET msr mair_el2, x0 isb -- 2.29.2.222.g5d2a92d10f8-goog