All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] [v3] target-ppc: Enhance CPU nodes of device tree to be PAPR compliant.
@ 2013-08-14 11:20 Jacques Mony
  0 siblings, 0 replies; 7+ messages in thread
From: Jacques Mony @ 2013-08-14 11:20 UTC (permalink / raw)
  To: 'Andreas Färber', 'Paul Mackerras'
  Cc: 'Alexey Kardashevisky', 'Thomas Huth',
	'QEMU', 'qemu-ppc', 'Anthony Liguori',
	'Prerna Saxena'

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

True. From AIX on POWER7+, only seeing POWER7 in here.





-----Original Message-----
From: Andreas Färber [afaerber@suse.de<mailto:afaerber@suse.de>]
Sent: Wednesday, August 14, 2013 07:05 AM Eastern Standard Time
To: Paul Mackerras
Cc: Alexey Kardashevisky; Thomas Huth; QEMU; qemu-ppc; Anthony Liguori; Prerna Saxena
Subject: Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/2] [v3] target-ppc: Enhance CPU nodes of device tree to be PAPR compliant.


Am 14.08.2013 12:18, schrieb Alexander Graf:
> So the POWER7 fw_name field would just contain "PowerPC,POWER7" and the device tree creation code merely appends the @%d piece.

Speaking of POWER7, Paul said that POWER7+ would look like
PowerPC,POWER7+@0 but my POWER5+ is
/proc/device-tree/cpus/PowerPC,POWER5@0
without the plus.

Could you double-check the name please?

A preview of my patch with "POWER7+" is here:
https://github.com/afaerber/qemu-cpu/commits/spapr

Thanks,
Andreas

--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg


[-- Attachment #2: Type: text/html, Size: 1964 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] [v3] target-ppc: Enhance CPU nodes of device tree to be PAPR compliant.
  2013-08-14 10:18             ` Alexander Graf
  2013-08-14 10:31               ` Andreas Färber
@ 2013-08-14 11:04               ` Andreas Färber
  1 sibling, 0 replies; 7+ messages in thread
From: Andreas Färber @ 2013-08-14 11:04 UTC (permalink / raw)
  To: Paul Mackerras
  Cc: Alexey Kardashevisky, Thomas Huth, QEMU, Alexander Graf,
	qemu-ppc, Anthony Liguori, Prerna Saxena

Am 14.08.2013 12:18, schrieb Alexander Graf:
> So the POWER7 fw_name field would just contain "PowerPC,POWER7" and the device tree creation code merely appends the @%d piece.

Speaking of POWER7, Paul said that POWER7+ would look like
PowerPC,POWER7+@0 but my POWER5+ is
/proc/device-tree/cpus/PowerPC,POWER5@0
without the plus.

Could you double-check the name please?

A preview of my patch with "POWER7+" is here:
https://github.com/afaerber/qemu-cpu/commits/spapr

Thanks,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] [v3] target-ppc: Enhance CPU nodes of device tree to be PAPR compliant.
  2013-08-14 10:18             ` Alexander Graf
@ 2013-08-14 10:31               ` Andreas Färber
  2013-08-14 11:04               ` Andreas Färber
  1 sibling, 0 replies; 7+ messages in thread
From: Andreas Färber @ 2013-08-14 10:31 UTC (permalink / raw)
  To: Alexander Graf
  Cc: Alexey Kardashevisky, Thomas Huth, QEMU, qemu-ppc,
	Anthony Liguori, Prerna Saxena

Am 14.08.2013 12:18, schrieb Alexander Graf:
> 
> On 12.08.2013, at 23:22, Benjamin Herrenschmidt wrote:
> 
>> On Mon, 2013-08-12 at 21:17 +0200, Thomas Huth wrote:
>>> Am Mon, 12 Aug 2013 16:03:24 +1000
>>> schrieb Benjamin Herrenschmidt <benh@kernel.crashing.org>:
>>>
>>>> On Mon, 2013-08-12 at 10:07 +0530, Prerna Saxena wrote:
>>>>
>>>> .../...
>>>>
>>>>> I dont know what context lead to this observation.
>>>>> However, PAPR mentions the following nomenclature guideline:
>>>>>
>>>>> "The value of this property shall be of the form: “PowerPC,<name>”,
>>>>> where <name> is the name of the processor chip which may be displayed to
>>>>> the user. <name> shall not contain underscores."
>>>>
>>>> This actually comes from the original Open Firmware binding for PowerPC
>>>> processors, which PAPR inherits largely from. Thus this naming scheme
>>>> should apply to all PowerPC processors when a device-tree is involved.
>>>
>>> Well, I think it should be used when an Open Firmware environment is
>>> used. When you boot via ePAPR device tree, the name should be "cpu"
>>> instead, according to the ePAPR specification.
>>
>> Yeah well ... this is a gratuituous change in ePAPR, I don't think it
>> matters really what the name is anyway. I'd suggest sticking to the
>> original OF binding.
> 
> Can't we just include the PowerPC, bit as part of the fw_name field in the class? I don't think we have any CPUs that can be used both in ePAPR and sPAPR environments. So the POWER7 fw_name field would just contain "PowerPC,POWER7" and the device tree creation code merely appends the @%d piece.

That's exactly what my patch series does, just be patient. :)

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] [v3] target-ppc: Enhance CPU nodes of device tree to be PAPR compliant.
  2013-08-12 21:22           ` Benjamin Herrenschmidt
@ 2013-08-14 10:18             ` Alexander Graf
  2013-08-14 10:31               ` Andreas Färber
  2013-08-14 11:04               ` Andreas Färber
  0 siblings, 2 replies; 7+ messages in thread
From: Alexander Graf @ 2013-08-14 10:18 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: Alexey Kardashevisky, Thomas Huth, QEMU, qemu-ppc,
	Anthony Liguori, Prerna Saxena, Andreas Färber


On 12.08.2013, at 23:22, Benjamin Herrenschmidt wrote:

> On Mon, 2013-08-12 at 21:17 +0200, Thomas Huth wrote:
>> Am Mon, 12 Aug 2013 16:03:24 +1000
>> schrieb Benjamin Herrenschmidt <benh@kernel.crashing.org>:
>> 
>>> On Mon, 2013-08-12 at 10:07 +0530, Prerna Saxena wrote:
>>> 
>>> .../...
>>> 
>>>> I dont know what context lead to this observation.
>>>> However, PAPR mentions the following nomenclature guideline:
>>>> 
>>>> "The value of this property shall be of the form: “PowerPC,<name>”,
>>>> where <name> is the name of the processor chip which may be displayed to
>>>> the user. <name> shall not contain underscores."
>>> 
>>> This actually comes from the original Open Firmware binding for PowerPC
>>> processors, which PAPR inherits largely from. Thus this naming scheme
>>> should apply to all PowerPC processors when a device-tree is involved.
>> 
>> Well, I think it should be used when an Open Firmware environment is
>> used. When you boot via ePAPR device tree, the name should be "cpu"
>> instead, according to the ePAPR specification.
> 
> Yeah well ... this is a gratuituous change in ePAPR, I don't think it
> matters really what the name is anyway. I'd suggest sticking to the
> original OF binding.

Can't we just include the PowerPC, bit as part of the fw_name field in the class? I don't think we have any CPUs that can be used both in ePAPR and sPAPR environments. So the POWER7 fw_name field would just contain "PowerPC,POWER7" and the device tree creation code merely appends the @%d piece.


Alex

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] [v3] target-ppc: Enhance CPU nodes of device tree to be PAPR compliant.
  2013-08-12 19:17         ` Thomas Huth
@ 2013-08-12 21:22           ` Benjamin Herrenschmidt
  2013-08-14 10:18             ` Alexander Graf
  0 siblings, 1 reply; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2013-08-12 21:22 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Alexey Kardashevisky, QEMU, qemu-ppc, Anthony Liguori,
	Prerna Saxena, Andreas Färber

On Mon, 2013-08-12 at 21:17 +0200, Thomas Huth wrote:
> Am Mon, 12 Aug 2013 16:03:24 +1000
> schrieb Benjamin Herrenschmidt <benh@kernel.crashing.org>:
> 
> > On Mon, 2013-08-12 at 10:07 +0530, Prerna Saxena wrote:
> > 
> >  .../...
> > 
> > > I dont know what context lead to this observation.
> > > However, PAPR mentions the following nomenclature guideline:
> > > 
> > > "The value of this property shall be of the form: “PowerPC,<name>”,
> > > where <name> is the name of the processor chip which may be displayed to
> > > the user. <name> shall not contain underscores."
> > 
> > This actually comes from the original Open Firmware binding for PowerPC
> > processors, which PAPR inherits largely from. Thus this naming scheme
> > should apply to all PowerPC processors when a device-tree is involved.
> 
> Well, I think it should be used when an Open Firmware environment is
> used. When you boot via ePAPR device tree, the name should be "cpu"
> instead, according to the ePAPR specification.

Yeah well ... this is a gratuituous change in ePAPR, I don't think it
matters really what the name is anyway. I'd suggest sticking to the
original OF binding.

Ben.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] [v3] target-ppc: Enhance CPU nodes of device tree to be PAPR compliant.
  2013-08-12  6:03       ` [Qemu-devel] [Qemu-ppc] " Benjamin Herrenschmidt
@ 2013-08-12 19:17         ` Thomas Huth
  2013-08-12 21:22           ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Huth @ 2013-08-12 19:17 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: Alexey Kardashevisky, QEMU, qemu-ppc, Anthony Liguori,
	Prerna Saxena, Andreas Färber

Am Mon, 12 Aug 2013 16:03:24 +1000
schrieb Benjamin Herrenschmidt <benh@kernel.crashing.org>:

> On Mon, 2013-08-12 at 10:07 +0530, Prerna Saxena wrote:
> 
>  .../...
> 
> > I dont know what context lead to this observation.
> > However, PAPR mentions the following nomenclature guideline:
> > 
> > "The value of this property shall be of the form: “PowerPC,<name>”,
> > where <name> is the name of the processor chip which may be displayed to
> > the user. <name> shall not contain underscores."
> 
> This actually comes from the original Open Firmware binding for PowerPC
> processors, which PAPR inherits largely from. Thus this naming scheme
> should apply to all PowerPC processors when a device-tree is involved.

Well, I think it should be used when an Open Firmware environment is
used. When you boot via ePAPR device tree, the name should be "cpu"
instead, according to the ePAPR specification.

 Thomas

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] [v3] target-ppc: Enhance CPU nodes of device tree to be PAPR compliant.
  2013-08-12  4:37     ` Prerna Saxena
@ 2013-08-12  6:03       ` Benjamin Herrenschmidt
  2013-08-12 19:17         ` Thomas Huth
  0 siblings, 1 reply; 7+ messages in thread
From: Benjamin Herrenschmidt @ 2013-08-12  6:03 UTC (permalink / raw)
  To: Prerna Saxena
  Cc: Alexey Kardashevisky, qemu-ppc, Andreas Färber,
	Anthony Liguori, QEMU

On Mon, 2013-08-12 at 10:07 +0530, Prerna Saxena wrote:

 .../...

> I dont know what context lead to this observation.
> However, PAPR mentions the following nomenclature guideline:
> 
> "The value of this property shall be of the form: “PowerPC,<name>”,
> where <name> is the name of the processor chip which may be displayed to
> the user. <name> shall not contain underscores."

This actually comes from the original Open Firmware binding for PowerPC
processors, which PAPR inherits largely from. Thus this naming scheme
should apply to all PowerPC processors when a device-tree is involved.

> I think this name guideline will hold good for all PAPR compliant
> processors.

Also PAPR is not a processor architecture, it's a platform and firmware
architecture, so "PAPR-compliant CPU" has little meaning :-)

Cheers,
Ben.

> > 
> >> @@ -1315,6 +1325,14 @@ static void ppc_spapr_init(QEMUMachineInitArgs *args)
> >>  
> >>          cpu_model = g_strndup(parent_name,
> >>              strlen(parent_name) - strlen("-" TYPE_POWERPC_CPU));
> >> +
> >> +        for (i = 0; ppc_cpu_aliases[i].model != NULL; i++) {
> >> +            if (strcmp(ppc_cpu_aliases[i].model, cpu_model) == 0) {
> >> +                g_free(cpu_model);
> >> +                cpu_model = g_strndup(ppc_cpu_aliases[i].alias,
> >> +                                strlen(ppc_cpu_aliases[i].alias));
> >> +            }
> >> +        }
> >>      }
> >>  
> >>      /* Prepare the device tree */
> > 
> > This is still fixing up the name in the wrong place: -cpu POWER7_v2.3
> > will not get fixed, only -cpu host or KVM's default.
> > 
> > The solution I had discussed with Alex is the following: When devices
> > need to expose their name to firmware in a special way, we have the
> > DeviceClass::fw_name field. All we have to do is assign it and use it
> > instead of cpu_model if non-NULL, just like we assign DeviceClass::desc.
> > The way to do it would be to extend the family of POWERPC_DEF* macros to
> > specify the additional field on the relevant CPU models.
> > 
> 
> Would this be the same use-case as reflected by: ppc_cpu_aliases.alias ?
> If so, do we really need a separate field to convey the same information ?
> 
> > Therefore my above question: Would it be sufficient to explicitly name
> > POWER7_v2.3 PowerPC,POWER7 etc. and to drop the upper-casing?
> > Or would we also need to name a CPU such as MPC8572E (random Freescale
> > CPU where I don't know the expected fw_name and that is unlikely to
> > occur/work in sPAPR) "PowerPC,MPC8572E" if someone specified it with
> > -cpu MPC8572E?
> > 
> 
> If this is not a PAPR-compliant CPU, I dont think the PAPR naming
> convention is of any good.
> I havent worked with non-PAPR cpus. Is the device tree for such CPUs
> generated by routines in hw/ppc/spapr.c ? Or do they have custom
> routines to generate appropriate device tree nodes ?
> 
> Regards,

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-08-14 11:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-14 11:20 [Qemu-devel] [Qemu-ppc] [PATCH 2/2] [v3] target-ppc: Enhance CPU nodes of device tree to be PAPR compliant Jacques Mony
  -- strict thread matches above, loose matches on Subject: below --
2013-08-08  7:21 [Qemu-devel] [PATCH 0/2] [v3] target-ppc: Enhance CPU nodes of SPAPR-generated device tree Prerna Saxena
2013-08-08  7:26 ` [Qemu-devel] [PATCH 2/2] [v3] target-ppc: Enhance CPU nodes of device tree to be PAPR compliant Prerna Saxena
2013-08-08 10:34   ` Andreas Färber
2013-08-12  4:37     ` Prerna Saxena
2013-08-12  6:03       ` [Qemu-devel] [Qemu-ppc] " Benjamin Herrenschmidt
2013-08-12 19:17         ` Thomas Huth
2013-08-12 21:22           ` Benjamin Herrenschmidt
2013-08-14 10:18             ` Alexander Graf
2013-08-14 10:31               ` Andreas Färber
2013-08-14 11:04               ` Andreas Färber

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.