qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH v2 1/2] target/ppc: fix address translation bug for radix mmu


From: Cédric Le Goater
Subject: Re: [PATCH v2 1/2] target/ppc: fix address translation bug for radix mmus
Date: Tue, 15 Jun 2021 17:57:33 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1

On 6/15/21 4:57 PM, Bruno Piazera Larsen wrote:
> 
> On 15/06/2021 10:57, Cédric Le Goater wrote:
>> On 6/14/21 9:16 PM, Bruno Larsen (billionai) wrote:
>>> Based-on: <20210518201146.794854-1-richard.henderson@linaro.org>
>>>
>>> This commit attempts to fix the first bug mentioned by Richard Henderson in
>>> https://lists.nongnu.org/archive/html/qemu-devel/2021-05/msg06247.html
>>>
>>> To sumarize the bug here, when radix-style mmus are translating an
>>> address, they might need to call a second level of translation, with
>>> hypvervisor priviledges. However, the way it was being done up until
>>> this point meant that the second level translation had the same
>>> priviledges as the first level. This would only happen when a TCG guest
>>> was emulating KVM, which is why it hasn't been discovered yet.
>> What do you mean ? The QEMU PowerNV machine emulates baremetal and 
>> can run KVM pseries guests. 
> 
> Is the PowerNV using radix? 

Yes. Radix MMU is the default for Linux under POWER9 but it can also
use Hash.

> The bug only happens when guest1 (the emulated PowerNV, not it's guest), 

For PowerNV, "machine" would be more appropriate. We sometime refer to 
it as L0 and the sublevel guests as L1 and L2.

> and if so, we might need to reevaluate if the bug actually happens, 
> or if it's just a theoretical hiccup. And also change the commit message.

I think this would be a fix for the model. 

> Either way, if my explanation is a bit confusing, there are more details 
> on the link. I sort of just implemented the solutions suggested in that 
> e-mail chain.

It seems to makes sense. I just want to give it a try using an emulated 
QEMU PowerNV machine running a KVM pseries guest to see if it doesn't
break anything. Which would mean that the fix is incomplete. 

>> It has some issues under load but not related to memory translation. 
>> This patch is certainly improving the model and it is worth testing 
>> but this version does not apply on ppc-6.1.
>
> Ah, yes, it is based on a patch series made by Richard Henderson a 
> few weeks ago. Since we need that patch to be accepted to finally 
> support disable-tcg and I don't want to delay that by adding a 
> change that might change a lot of his remaining patches.

OK.

Thanks,

C.




reply via email to

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