All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: Peter Maydell <peter.maydell@linaro.org>,
	Alexey Kardashevskiy <aik@ozlabs.ru>
Cc: Daniel Henrique Barboza <danielhb413@gmail.com>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	David Gibson <david@gibson.dropbear.id.au>,
	Greg Kurz <groug@kaod.org>
Subject: Re: [PATCH qemu] spapr: Force 32bit when resetting a core
Date: Tue, 25 Jan 2022 11:38:00 +0100	[thread overview]
Message-ID: <369019d6-7d60-80c6-e6f5-0a171be510c2@kaod.org> (raw)
In-Reply-To: <423c655a-b87f-9d08-208a-2e73196adfbc@kaod.org>

On 1/19/22 12:05, Cédric Le Goater wrote:
> On 1/16/22 17:45, Peter Maydell wrote:
>> On Fri, 7 Jan 2022 at 07:29, Alexey Kardashevskiy <aik@ozlabs.ru> wrote:
>>>
>>> "PowerPC Processor binding to IEEE 1275" says in
>>> "8.2.1. Initial Register Values" that the initial state is defined as
>>> 32bit so do it for both SLOF and VOF.
>>>
>>> This should not cause behavioral change as SLOF switches to 64bit very
>>> early anyway. As nothing enforces LE anywhere, this drops it for VOF.
>>>
>>> The goal is to make VOF work with TCG as otherwise it barfs with
>>> qemu: fatal: TCG hflags mismatch (current:0x6c000004 rebuilt:0x6c000000)
>>
>> If you get this assert it means that something is changing
>> the CPU state and not calling the function to recalculate
>> the hflags (which are basically caching part of the CPU state).
>> So I don't know whether this patch is correct or not in updating
>> MSR bits, but in any case I think it is only masking the
>> missing-hflags-update that is causing the assertion...
> 
> 
> yes. Currently, spapr_vof_reset() is called from the pseries
> machine reset handler and modifies brutally the MSR without
> calling hreg_compute_hflags()to update the hflags. Hence
> the warning.
> 
> The proposal moves the MSR update under the pseries CPU reset
> handler: spapr_reset_vcpu() where it should be. spapr_reset_vcpu()
> also updates the LPCR register and calls hreg_compute_hflags()
> when done.
> 
> The question we all had was why it was set to 64bit initially
> by commit 8b9f2118ca40 which seems to be in contradiction with
> the PAPR specs saying the CPUs should start in 32bit mode.
> It is not clear but I didn't see any regression on pseries or
> on the macbook machine using 970 CPUs. I think we are fine.

With that said,

Reviewed-by: Cédric Le Goater <clg@kaod.org>

Thanks,

C.



      reply	other threads:[~2022-01-25 10:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-07  7:24 [PATCH qemu] spapr: Force 32bit when resetting a core Alexey Kardashevskiy
2022-01-07  7:45 ` Cédric Le Goater
2022-01-07 11:57 ` Greg Kurz
2022-01-07 12:19   ` David Gibson
2022-01-07 13:39     ` Greg Kurz
2022-01-10  2:52       ` Alexey Kardashevskiy
2022-01-10  3:10         ` David Gibson
2022-01-14 14:12         ` Cédric Le Goater
2022-01-15 14:21           ` Mark Cave-Ayland
2022-01-17 14:52             ` Cédric Le Goater
2022-01-18  8:30               ` Mark Cave-Ayland
2022-01-18  9:12                 ` Cédric Le Goater
2022-01-19 15:10                   ` Frédéric Bonnard
2022-01-15 21:48           ` BALATON Zoltan
2022-01-14 13:51       ` Cédric Le Goater
2022-01-16 16:45 ` Peter Maydell
2022-01-19  4:03   ` Alexey Kardashevskiy
2022-01-19 10:16     ` Peter Maydell
2022-01-19 11:05   ` Cédric Le Goater
2022-01-25 10:38     ` 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=369019d6-7d60-80c6-e6f5-0a171be510c2@kaod.org \
    --to=clg@kaod.org \
    --cc=aik@ozlabs.ru \
    --cc=danielhb413@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=groug@kaod.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.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.