[libvirt] [PATCH] cpu_ppc64: Add support for host-model on POWER9

David Gibson david at gibson.dropbear.id.au
Mon Jun 12 09:32:28 UTC 2017


On Mon, Jun 12, 2017 at 05:06:27PM +0800, Andrea Bolognani wrote:
> On Thu, 2017-06-08 at 18:40 +0200, Andrea Bolognani wrote:
> > Yeah, I've been looking at downstream. I'll try again with
> > upstream and file bugs as needed.
> 
> Okay, I've tried again with upstream QEMU master (with your
> CPU compatibility patches applied on top), here are the
> results for both POWER8 and POWER9.

Note that this is for POWER9 DD1 - different results are expected for
POWER9 DD2, when it actually gets out of the fab.

> <nothing>
> =========
> 
>   * POWER8 (architected)
>   * POWER9 (raw)

As expected.

> 
> -cpu POWER8
> ===========
> 
>   * POWER8 (architected)
>   * qemu-system-ppc64: Register sync failed...
>     If you're using kvm-hv.ko, only "-cpu host" is possible
>     kvm_init_vcpu failed: Invalid argument

As expected.

> 
> -cpu POWER9
> ===========
> 
>   * qemu-system-ppc64: Register sync failed...
>     If you're using kvm-hv.ko, only "-cpu host" is possible
>     kvm_init_vcpu failed: Invalid argument

As expected.

>   * qemu-system-ppc64: Register sync failed...
>     If you're using kvm-hv.ko, only "-cpu host" is possible
>     kvm_init_vcpu failed: Invalid argument

Huh.. that's a bit weird.

> 
> -cpu host
> =========
> 
>   * POWER8 (architected)
>   * POWER9 (raw)

As expected (no parameters defaults to this).

> 
> -cpu host,compat=power8
> =======================
> 
>   * POWER8 (architected)
>   * Unexpected error in ppc_set_compat() at target/ppc/compat.c:135:
>     qemu-system-ppc64: Compatibility PVR 0x0f000004 not valid for CPU
>     Aborted

Expected for DD1.

> 
> -cpu host,compat=power9
> =======================
> 
>   * Unexpected error in ppc_set_compat() at target/ppc/compat.c:135:
>     qemu-system-ppc64: Compatibility PVR 0x0f000005 not valid for CPU
>     Aborted

Expected.

>   * Unexpected error in ppc_set_compat() at target/ppc/compat.c:135:
>     qemu-system-ppc64: Compatibility PVR 0x0f000005 not valid for CPU
>     Aborted

Expected for DD1.

> AIUI, the fact that POWER9 is using raw mode rather than
> architected mode for all cases where the guest actually
> manages to boot is because compatibility modes are not enabled
> for early silicon; this is consistent with QEMU refusing to
> use the compatibility modes when explicitly asked to do so.

Right.  The compatibility modes are "disabled" in qemu, not in the
silicon for DD1.  The compatibility control registers are still there
in DD1, and will have some effect.  It's just that turning on compat
mode won't make the DD1 bugs go away, so we're still not architecture
compliant.  Hence, we don't advertise them.

> However, the fact that '-cpu POWER9' can't be used on the
> POWER9 machine seems like a genuine bug. Even on POWER8, the
> error message is pretty misleading.

Yes, that does look like a bug.

> Last but not least, using an unsupported compatibility mode
> results in QEMU abort()ing, which seems a bit excessive for
> a very reasonable guest configuration error.

Ah, yes.  Probably just an &error_abort where we should have an
&error_fatal.

> Do you want me to go ahead and file bugs for the last two
> items?

Sure, sonuds good.

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170612/c98b28ef/attachment-0001.sig>


More information about the libvir-list mailing list