qemu-arm
[Top][All Lists]
Advanced

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

Re: Possible regression caused by "target/arm: Add ptw_idx to S1Translat


From: Jerome Forissier
Subject: Re: Possible regression caused by "target/arm: Add ptw_idx to S1Translate"
Date: Thu, 3 Nov 2022 14:21:42 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2

On 11/3/22 14:15, Jerome Forissier wrote:
> On 11/3/22 14:04, Jerome Forissier wrote:
>> Hi,
>>
>> I am troubleshooting a regression that seems related to commit
>> 48da29e485af ("target/arm: Add ptw_idx to S1Translate"), at least that's
>> what git bisect says.
>>
>> The following hunk looks weird to me:
>>
>> @@ -1263,7 +1260,18 @@ static bool get_phys_addr_lpae(CPUARMState *env, 
>> S1Translate *ptw,
>>          descaddr |= (address >> (stride * (4 - level))) & indexmask;
>>          descaddr &= ~7ULL;
>>          nstable = extract32(tableattrs, 4, 1);
>> -        ptw->in_secure = !nstable;
>> +        if (!nstable) {
>> +            /*
>> +             * Stage2_S -> Stage2 or Phys_S -> Phys_NS
>> +             * Assert that the non-secure idx are even, and relative order.
>> +             */
>> +            QEMU_BUILD_BUG_ON((ARMMMUIdx_Phys_NS & 1) != 0);
>> +            QEMU_BUILD_BUG_ON((ARMMMUIdx_Stage2 & 1) != 0);
>> +            QEMU_BUILD_BUG_ON(ARMMMUIdx_Phys_NS + 1 != ARMMMUIdx_Phys_S);
>> +            QEMU_BUILD_BUG_ON(ARMMMUIdx_Stage2 + 1 != ARMMMUIdx_Stage2_S);
>> +            ptw->in_ptw_idx &= ~1;
>> +            ptw->in_secure = false;
>> +        }
>>          descriptor = arm_ldq_ptw(env, ptw, descaddr, fi);
>>          if (fi->type != ARMFault_None) {
>>              goto do_fault;
>>
> 
> Nevermind, I just noticed that a fix for this was sent yesterday...
> https://lists.nongnu.org/archive/html/qemu-arm/2022-11/msg00047.html
> 
> master still doesn't work for me though.

Well, scratch that too. With the fix properly applied, all is good.

-- 
Jerome



reply via email to

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