From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Subject: Re: [PATCH v4 15/32] arm64: KVM: hypervisor initialization code Date: Tue, 21 May 2013 15:49:08 +0100 Message-ID: <519B8964.3050802@arm.com> References: <1368540840-26750-1-git-send-email-marc.zyngier@arm.com> <1368540840-26750-16-git-send-email-marc.zyngier@arm.com> <20130521144005.GG27002@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: 8BIT Cc: "linux-arm-kernel@lists.infradead.org" , "kvmarm@lists.cs.columbia.edu" , "kvm@vger.kernel.org" , Will Deacon , "pbonzini@redhat.com" , "gleb@redhat.com" To: Catalin Marinas Return-path: Received: from service87.mimecast.com ([91.220.42.44]:35859 "EHLO service87.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753537Ab3EUOtM convert rfc822-to-8bit (ORCPT ); Tue, 21 May 2013 10:49:12 -0400 In-Reply-To: <20130521144005.GG27002@arm.com> Sender: kvm-owner@vger.kernel.org List-ID: On 21/05/13 15:40, Catalin Marinas wrote: > On Tue, May 14, 2013 at 03:13:43PM +0100, Marc Zyngier wrote: >> --- /dev/null >> +++ b/arch/arm64/kvm/hyp-init.S > ... >> + .text >> + .pushsection .hyp.idmap.text, "ax" >> + >> + .align 11 >> + >> +__kvm_hyp_init: >> + .global __kvm_hyp_init >> + >> +ENTRY(__kvm_hyp_init_vector) > > Why do you need both __kvm_hyp_init and __kvm_hyp_init_vector? You could > drop the former. Actually, __kvm_hyp_init is refered to by the 32/64 shared code, so I can't get rid of it right now. I'll remove __kvm_hyp_init_vector for the time being, as it isn't used anywhere. >> +__do_hyp_init: >> + >> + msr ttbr0_el2, x0 >> + >> + mrs x4, tcr_el1 >> + ldr x5, =TCR_EL2_MASK >> + and x4, x4, x5 >> + ldr x5, =TCR_EL2_FLAGS >> + orr x4, x4, x5 >> + msr tcr_el2, x4 >> + >> + ldr x4, =VTCR_EL2_FLAGS >> + msr vtcr_el2, x4 >> + >> + mrs x4, mair_el1 >> + msr mair_el2, x4 >> + isb >> + >> + mov x4, #SCTLR_EL2_FLAGS >> + msr sctlr_el2, x4 >> + isb >> + >> + /* MMU is now enabled. Get ready for the trampoline dance */ >> + ldr x4, =TRAMPOLINE_VA >> + adr x5, target >> + bfi x4, x5, #0, #PAGE_SHIFT >> + br x4 >> + >> + nop > > What is this nop for? Nothing. I thought I had it removed already. Will get rid of it for good this time. Thanks, M. -- Jazz is not dead. It just smells funny...