Hi PMM, On 5 February 2015 at 17:18, Peter Maydell <peter.maydell@xxxxxxxxxx> wrote: > On 5 February 2015 at 11:43, Peter Maydell <peter.maydell@xxxxxxxxxx> wrote: >> On 5 February 2015 at 09:59, Pranavkumar Sawargaonkar >> <pranavkumar@xxxxxxxxxx> wrote: >>> + >>> + /* In 32bit guest endianess is determined by looking at CPSR's E bit */ >>> + if (!is_a64(env)) { >>> + return (env->pstate & CPSR_E) ? 1 : 0; >> >> This is wrong, because if we're not 32-bit then the CPSR >> isn't in env->pstate but in env->cpsr_uncached. (I'm guessing >> you didn't test 32-bit guests.) > > Actually thinking about it your code would have worked for the > common 32-bit guest case, since if we fall through to looking > at SCTLR then (assuming the guest is at EL1 which it will be when > it's messing with the virtio device) we'll end up checking the > 32-bit SCTLR EE bit, which will be the same as the current > guest endianness for any sane guest kernel. So I apologise > for suggesting you didn't test that case. Actually I have not not tested patch with 32bit guests. Thanks for pulling the patches and 32bit guest case fix. Thanks, Pranav > > -- PMM _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm