qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Daniel Henrique Barboza <danielhb413@gmail.com>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
	clg@kaod.org, qemu-ppc@nongnu.org, Greg Kurz <groug@kaod.org>,
	qemu-devel@nongnu.org
Subject: Re: [PATCH 1/1] spapr.c: remove 'ibm,chip-id' from DT
Date: Fri, 12 Mar 2021 12:56:40 +1100	[thread overview]
Message-ID: <YErKWKtJ1x6oyXE/@yekko.fritz.box> (raw)
In-Reply-To: <0bbe42b0-a17c-550c-2e0c-fa8514db355b@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2436 bytes --]

On Thu, Mar 11, 2021 at 03:22:39PM -0300, Daniel Henrique Barboza wrote:
> 
> 
> On 3/11/21 1:29 PM, Greg Kurz wrote:
> > On Thu, 11 Mar 2021 12:15:57 -0300
> > Daniel Henrique Barboza <danielhb413@gmail.com> wrote:
> > 
> > > The attribute 'ibm,chip-id' does not exist in PAPR. This alone would be
> > > enough reason to remove it from the spapr DT, but before doing that,
> > > let's give a brief context on how and why it was introduced.
> > > 
> > > 'ibm,chip-id' was added in the spapr DT by commit 10582ff83279. This
> > > commit references kernel commit 256f2d4b463d ("powerpc: Use ibm, chip-id
> > > property to compute cpu_core_mask if available"). In this kernel commit,
> > > the 'ibm,chip-id' DT attribute is being used to calculate the
> > > cpu_core_mask in traverse_siblings_chip_id(). This function still need
> > > to consider 'ibm,chip-id' not being available as well to avoid breaking
> > > older guests.
> > > 
> > > Later on, kernel commit df52f6714071 ("powerpc/smp: Rework CPU topology
> > > construction") removed traverse_siblings_chip_id() and its callers,
> > > making the CPU topology calculation independent of the 'ibm,chip-id'
> > > attribute. Today, the kernel uses 'ibm,chip-id' for PowerNV related code
> > > only - the pseries kernel does not rely on it.
> > > 
> > 
> > Thanks for the archaeology ! So this means that the pseries kernel used
> > to rely on it up to kernel v4.14, right ?
> 
> 
> The pseries kernel up to 4.14 used to consider the existence of 'ibm,chip-id',
> but it also had an error path for its absence as well.
> 
> > 
> > > All that said, since it's not in PAPR and the pseries kernel does not
> > > rely on it, let's remove ibm,chip-id from the DT.
> > > 
> > 
> > Even if it isn't part of PAPR, this is something that we've been
> > exposing to guests with existing machine types and someone could
> > have found a use for it or still using a pre-4.14 kernel, e.g.
> > debian stretch still relies on 4.9.
> 
> I understand that it's generally not cool to change guest visible information.
> 
> If we want to be on the safe, I can send a v2 where this change if effective only
> on pseries-6.0.0 and newer.

Yes, we should do that.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2021-03-12  2:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11 15:15 [PATCH 1/1] spapr.c: remove 'ibm,chip-id' from DT Daniel Henrique Barboza
2021-03-11 15:42 ` Cédric Le Goater
2021-03-11 16:29 ` Greg Kurz
2021-03-11 18:22   ` Daniel Henrique Barboza
2021-03-12  1:56     ` David Gibson [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=YErKWKtJ1x6oyXE/@yekko.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=aik@ozlabs.ru \
    --cc=clg@kaod.org \
    --cc=danielhb413@gmail.com \
    --cc=groug@kaod.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).