qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V3 2/2] target-arm: Guest cpu endianness determi


From: Pranavkumar Sawargaonkar
Subject: Re: [Qemu-devel] [PATCH V3 2/2] target-arm: Guest cpu endianness determination for virtio KVM ARM/ARM64
Date: Fri, 6 Feb 2015 22:13:03 +0530

Hi PMM,

On 5 February 2015 at 17:18, Peter Maydell <address@hidden> wrote:
> On 5 February 2015 at 11:43, Peter Maydell <address@hidden> wrote:
>> On 5 February 2015 at 09:59, Pranavkumar Sawargaonkar
>> <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]