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...

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to