qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* Re: [Qemu-devel] [PATCH] ppc/pnv: update skiboot to v6.4
       [not found] ` <20190718061628.GM8468@umbus.fritz.box>
@ 2019-07-18 13:03   ` Cédric Le Goater
  2019-07-22  8:32     ` David Gibson
  0 siblings, 1 reply; 3+ messages in thread
From: Cédric Le Goater @ 2019-07-18 13:03 UTC (permalink / raw)
  To: David Gibson, Joel Stanley; +Cc: qemu-ppc, qemu-devel

On 18/07/2019 08:16, David Gibson wrote:
> On Thu, Jul 18, 2019 at 03:12:17PM +0930, Joel Stanley wrote:
>> Currently we fail to boot a qemu powernv machine with a Power9
>> processor:
>>
>>  PLAT: Detected generic platform
>>  PLAT: Detected BMC platform generic
>>  CPU: All 1 processors called in...
>>  CHIPTOD: Unknown TOD type !
>>  CHIPTOD: Failed ChipTOD detection !
>>  Aborting!
>>
>> With v6.4 we can boot both a Power8 and Power9 powernv machine.
>>
>> Built from submodule with powerpc64le-linux-gnu-gcc (Debian 8.3.0-2).
>>
>> Signed-off-by: Joel Stanley <joel@jms.id.au>
> Applied to ppc-for-4.2, thanks.
> 
> If you could add both POWER8 and POWER9 smoke tests to
> boot-serial-test that would be even better.

There is one for POWER8 and adding an extra for POWER9 results
in a test conflict. So I came up with the patch below. Would that
be OK ?


C.

@@ -104,6 +104,7 @@ static testdef_t tests[] = {
       "-machine cap-cfpc=broken,cap-sbbc=broken,cap-ibs=broken",
       "Open Firmware" },
     { "ppc64", "powernv", "-cpu POWER8", "OPAL" },
+    { "ppc64", "powernv", "-cpu POWER9", "OPAL" },
     { "ppc64", "sam460ex", "-device e1000", "8086  100e" },
     { "i386", "isapc", "-cpu qemu32 -device sga", "SGABIOS" },
     { "i386", "pc", "-device sga", "SGABIOS" },
@@ -222,6 +223,17 @@ static void test_machine(const void *dat
     close(ser_fd);
 }
 
+static char* build_testname(testdef_t *t)
+{
+    char suffix[2] = "";
+
+    if (!strcmp(t->machine, "powernv")) {
+        sscanf(t->extra, "-cpu POWER%1s", suffix);
+    }
+
+    return g_strdup_printf("boot-serial/%s%s", t->machine, suffix);
+}
+
 int main(int argc, char *argv[])
 {
     const char *arch = qtest_get_arch();
@@ -231,7 +243,7 @@ int main(int argc, char *argv[])
 
     for (i = 0; tests[i].arch != NULL; i++) {
         if (strcmp(arch, tests[i].arch) == 0) {
-            char *name = g_strdup_printf("boot-serial/%s", tests[i].machine);
+            char *name = build_testname(&tests[i]);
             qtest_add_data_func(name, &tests[i], test_machine);
             g_free(name);
         }


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

* Re: [Qemu-devel] [PATCH] ppc/pnv: update skiboot to v6.4
  2019-07-18 13:03   ` [Qemu-devel] [PATCH] ppc/pnv: update skiboot to v6.4 Cédric Le Goater
@ 2019-07-22  8:32     ` David Gibson
  2019-07-22 18:24       ` Cédric Le Goater
  0 siblings, 1 reply; 3+ messages in thread
From: David Gibson @ 2019-07-22  8:32 UTC (permalink / raw)
  To: Cédric Le Goater; +Cc: qemu-ppc, Joel Stanley, qemu-devel

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

On Thu, Jul 18, 2019 at 03:03:09PM +0200, Cédric Le Goater wrote:
> On 18/07/2019 08:16, David Gibson wrote:
> > On Thu, Jul 18, 2019 at 03:12:17PM +0930, Joel Stanley wrote:
> >> Currently we fail to boot a qemu powernv machine with a Power9
> >> processor:
> >>
> >>  PLAT: Detected generic platform
> >>  PLAT: Detected BMC platform generic
> >>  CPU: All 1 processors called in...
> >>  CHIPTOD: Unknown TOD type !
> >>  CHIPTOD: Failed ChipTOD detection !
> >>  Aborting!
> >>
> >> With v6.4 we can boot both a Power8 and Power9 powernv machine.
> >>
> >> Built from submodule with powerpc64le-linux-gnu-gcc (Debian 8.3.0-2).
> >>
> >> Signed-off-by: Joel Stanley <joel@jms.id.au>
> > Applied to ppc-for-4.2, thanks.
> > 
> > If you could add both POWER8 and POWER9 smoke tests to
> > boot-serial-test that would be even better.
> 
> There is one for POWER8 and adding an extra for POWER9 results
> in a test conflict. So I came up with the patch below. Would that
> be OK ?

Ugh.  This name mangling is pretty ugly.  It would be neater to extend
the table format to have cpu explicitly and base the test names on
that, rather than special casing powernv.

But...

It occurs to me the reason we're hitting this is that for the other
systems represented here, the exact cpu model is really just a
detail.  It's not for us, because the whole system is substantially
different for the two cpus.

Which says to me that tbe POWER8 and POWER9 systems should really be
different machine types, not lumped together in "powernv" which then
has a heap of conditionals on the cpu family.  If we do that, the
problem here goes away.

-- 
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 --]

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

* Re: [Qemu-devel] [PATCH] ppc/pnv: update skiboot to v6.4
  2019-07-22  8:32     ` David Gibson
@ 2019-07-22 18:24       ` Cédric Le Goater
  0 siblings, 0 replies; 3+ messages in thread
From: Cédric Le Goater @ 2019-07-22 18:24 UTC (permalink / raw)
  To: David Gibson; +Cc: qemu-ppc, Joel Stanley, qemu-devel

On 22/07/2019 10:32, David Gibson wrote:
> On Thu, Jul 18, 2019 at 03:03:09PM +0200, Cédric Le Goater wrote:
>> On 18/07/2019 08:16, David Gibson wrote:
>>> On Thu, Jul 18, 2019 at 03:12:17PM +0930, Joel Stanley wrote:
>>>> Currently we fail to boot a qemu powernv machine with a Power9
>>>> processor:
>>>>
>>>>  PLAT: Detected generic platform
>>>>  PLAT: Detected BMC platform generic
>>>>  CPU: All 1 processors called in...
>>>>  CHIPTOD: Unknown TOD type !
>>>>  CHIPTOD: Failed ChipTOD detection !
>>>>  Aborting!
>>>>
>>>> With v6.4 we can boot both a Power8 and Power9 powernv machine.
>>>>
>>>> Built from submodule with powerpc64le-linux-gnu-gcc (Debian 8.3.0-2).
>>>>
>>>> Signed-off-by: Joel Stanley <joel@jms.id.au>
>>> Applied to ppc-for-4.2, thanks.
>>>
>>> If you could add both POWER8 and POWER9 smoke tests to
>>> boot-serial-test that would be even better.
>>
>> There is one for POWER8 and adding an extra for POWER9 results
>> in a test conflict. So I came up with the patch below. Would that
>> be OK ?
> 
> Ugh.  This name mangling is pretty ugly.  It would be neater to extend
> the table format to have cpu explicitly and base the test names on
> that, rather than special casing powernv.
> 
> But...
> 
> It occurs to me the reason we're hitting this is that for the other
> systems represented here, the exact cpu model is really just a
> detail.  It's not for us, because the whole system is substantially
> different for the two cpus.
> 
> Which says to me that tbe POWER8 and POWER9 systems should really be
> different machine types, not lumped together in "powernv" which then
> has a heap of conditionals on the cpu family.  If we do that, the
> problem here goes away.


Yes. I just sent a patch for it.

Thanks,

C. 


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

end of thread, other threads:[~2019-07-22 18:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20190718054218.9581-1-joel@jms.id.au>
     [not found] ` <20190718061628.GM8468@umbus.fritz.box>
2019-07-18 13:03   ` [Qemu-devel] [PATCH] ppc/pnv: update skiboot to v6.4 Cédric Le Goater
2019-07-22  8:32     ` David Gibson
2019-07-22 18:24       ` Cédric Le Goater

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).