From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753499AbbDHNC2 (ORCPT ); Wed, 8 Apr 2015 09:02:28 -0400 Received: from foss.arm.com ([217.140.101.70]:50434 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753128AbbDHNC1 (ORCPT ); Wed, 8 Apr 2015 09:02:27 -0400 Date: Wed, 8 Apr 2015 14:02:21 +0100 From: Mark Rutland To: AKASHI Takahiro Cc: Catalin Marinas , Will Deacon , Marc Zyngier , "christoffer.dall@linaro.org" , "geoff@infradead.org" , "broonie@kernel.org" , "david.griego@linaro.org" , "freddy77@gmail.com" , "kexec@lists.infradead.org" , "linux-arm-kernel@lists.infradead.org" , "linaro-kernel@lists.linaro.org" , "linux-kernel@vger.kernel.org" Subject: Re: [v3 1/5] arm64: kvm: add a cpu tear-down function Message-ID: <20150408130221.GA5977@leverpostej> References: <1427953216-11737-1-git-send-email-takahiro.akashi@linaro.org> <1427953216-11737-2-git-send-email-takahiro.akashi@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1427953216-11737-2-git-send-email-takahiro.akashi@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + /* We're now in idmap, disable MMU */ > +1: mrs x0, sctlr_el2 > + and x1, x0, #SCTLR_EL2_EE > + orr x0, x0, x1 // preserve endianness of EL2 > + ldr x1, =SCTLR_EL2_FLAGS > + eor x1, x1, xzr > + bic x0, x0, x1 // Clear SCTL_M and etc > + msr sctlr_el2, x0 > + isb This can instead be: 1: mrs x0, sctlr_el2 ldr x1, =SCTLR_EL2_FLAGS bic x0, x0, x1 msr sctlr_el2, x0 isb As SCTLR_EL2_FLAGS doesn't contain the EE bit. Mark.