Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BA82C2D0A3 for ; Mon, 16 Nov 2020 20:43:41 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 9E03C22245 for ; Mon, 16 Nov 2020 20:43:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="qwqZWyct" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9E03C22245 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 2E03B4C16F; Mon, 16 Nov 2020 15:43:40 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@google.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2KF5KU-ffjEk; Mon, 16 Nov 2020 15:43:39 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 9F8654C25C; Mon, 16 Nov 2020 15:43:37 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id D6C1B4C246 for ; Mon, 16 Nov 2020 15:43:35 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YjjaNo7NpyWQ for ; Mon, 16 Nov 2020 15:43:35 -0500 (EST) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id DB2614C24F for ; Mon, 16 Nov 2020 15:43:34 -0500 (EST) Received: by mail-wr1-f66.google.com with SMTP id p8so20291229wrx.5 for ; Mon, 16 Nov 2020 12:43:34 -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=gQPrfCmBaO9YgLVLl95ILxLVPzAafDFJsD+JAKyPBLvYTNV5+9kT93fkcel42n6AZQ jSXL4xFoMGimS9en5eIQHEPscgcPiPFxQwAzYHj8LsM55xMYM/vm6tIPq3mTrGjidN7o RYV8Mnjow6621+cZ+NiWZ1R16xiO0b3aIcVHIOXDo7QzJ0xpPq2RPXiVbQlGyH33vIlL ZwSbHzP4LK8Sj472aucBo3Kq/BLySY7z8cKsDcycrTOfXVQQz1J0a9PbPOpro00J12lI cxKxzFTKgdEpol64h1qsA5/9v7FcaAOLwUdFcUJamJ23HDjfkFaZ/Yssqnkqx4/kIx1p LC/g== X-Gm-Message-State: AOAM533OIyP53/f2wt4LwwOdbmTLXputibVtkBVXWraFZz3J+20+N/dM 27yXWM9sUQzbkeAyKFAKy6ZQ0wY2VGf2VVummYQ= X-Google-Smtp-Source: ABdhPJzhp5Qc3VCMl1XdepBsYRbo892rELQDUt+zy3yDaVQOCJPXpDk/FSGa+TxWc6mOuFFKMoZOug== 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 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 Cc: kernel-team@android.com, Lorenzo Pieralisi , Andrew Walbran , Marc Zyngier , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Catalin Marinas , Tejun Heo , Dennis Zhou , Christoph Lameter , Will Deacon X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu 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 _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm