All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: Bruno Piazera Larsen <bruno.larsen@eldorado.org.br>,
	<qemu-devel@nongnu.org>
Cc: farosas@linux.ibm.com, richard.henderson@linaro.org,
	luis.pires@eldorado.org.br, Greg Kurz <groug@kaod.org>,
	lucas.araujo@eldorado.org.br, fernando.valle@eldorado.org.br,
	qemu-ppc@nongnu.org, matheus.ferst@eldorado.org.br,
	david@gibson.dropbear.id.au
Subject: Re: [PATCH v2 1/2] target/ppc: fix address translation bug for radix mmus
Date: Tue, 15 Jun 2021 17:57:33 +0200	[thread overview]
Message-ID: <5c706c36-36fb-650d-1721-d88c45c3476b@kaod.org> (raw)
In-Reply-To: <87ab59ec-012c-a708-869f-e4bd9b822f10@eldorado.org.br>


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	other threads:[~2021-06-15 16:10 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-14 19:16 [PATCH v2 1/2] target/ppc: fix address translation bug for radix mmus Bruno Larsen (billionai)
2021-06-14 19:16 ` [RFC PATCH v2 2/2] target/ppc: make gdb able to translate priviledged addresses Bruno Larsen (billionai)
2021-06-14 19:37   ` Philippe Mathieu-Daudé
2021-06-15  1:41     ` David Gibson
2021-06-15 12:12     ` Bruno Piazera Larsen
2021-06-14 21:25   ` Fabiano Rosas
2021-06-15 11:59     ` Bruno Piazera Larsen
2021-06-14 22:37   ` Richard Henderson
2021-06-15 11:32     ` Bruno Piazera Larsen
2021-06-15 20:00       ` Richard Henderson
2021-06-15 21:37         ` Fabiano Rosas
2021-06-16 12:07           ` Bruno Piazera Larsen
2021-06-16  6:18       ` David Gibson
2021-06-14 19:29 ` [PATCH v2 1/2] target/ppc: fix address translation bug for radix mmus Greg Kurz
2021-06-14 21:04 ` Fabiano Rosas
2021-06-15  1:18   ` David Gibson
2021-06-15  1:41 ` David Gibson
2021-06-15  3:20   ` Richard Henderson
2021-06-15 12:25     ` Bruno Piazera Larsen
2021-06-16  6:16       ` David Gibson
2021-06-15 13:57 ` Cédric Le Goater
2021-06-15 14:14   ` Philippe Mathieu-Daudé
2021-06-15 14:57   ` Bruno Piazera Larsen
2021-06-15 15:57     ` Cédric Le Goater [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5c706c36-36fb-650d-1721-d88c45c3476b@kaod.org \
    --to=clg@kaod.org \
    --cc=bruno.larsen@eldorado.org.br \
    --cc=david@gibson.dropbear.id.au \
    --cc=farosas@linux.ibm.com \
    --cc=fernando.valle@eldorado.org.br \
    --cc=groug@kaod.org \
    --cc=lucas.araujo@eldorado.org.br \
    --cc=luis.pires@eldorado.org.br \
    --cc=matheus.ferst@eldorado.org.br \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.