Re: A minor question about endianness setting in hyp-sub.S

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[Added Victor on CC, as he's our BE guy these days... ;-)]

Hi Li,

On 30/06/14 04:10, john.liuli wrote:
> Hi All,
> 
> I'm really confused by the endianness setting in hyp-sub.S as below:
> 
> #ifdef CONFIG_CPU_BIG_ENDIAN
>          orr     r7, #(1 << 9)           @ HSCTLR.EE
> #endif
> 
> Is this line try to set HSCTLR.EE if kernel enabled 
> CONFIG_CPU_BIG_ENDIAN? If so, HSCTLR.EE is defined as bit[25]
> referring to DDI0606C(P1590). Can you explain the details?

This looks like a bug, really. It only works because when building a BE
kernel, we force the endianness of the kernel with a "setend be" as the
first instruction (see arch/arm/kernel/head.S).

KVM then copies the SCTLR.EE bit into HSCTLR.EE, and it may happen to
work, but we're just lucky...

> BTW: another relevant definition can be found in include/asm/kvm_arm.h 
> as blow which makes sense:
> 
> #define HSCTLR_EE	(1 << 25)

Yes, that's the correct value.

Can you please submit a patch for this?

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm




[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux