qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] target-ppc: Add POWER8E_v2.1 CPU model.


From: Alexey Kardashevskiy
Subject: Re: [Qemu-devel] [PATCH] target-ppc: Add POWER8E_v2.1 CPU model.
Date: Thu, 9 Jul 2015 12:35:32 +1000
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1

On 07/09/2015 02:35 AM, Andrea Bolognani wrote:
On Wed, 2015-07-08 at 17:02 +1000, Alexey Kardashevskiy wrote:

I think it's because libvirt likes to specify a specific CPU -
and if
it gets the new PVR from the host, qemu won't understand it.

A specific CPU in this case is "POWER8", I added this
specifically for
libvirt (to allow migration between all versions of POWER8), it
should not
use versioned CPUs and it does not in powerkvm.

Does "all versions of POWER8" include things like POWER8E, POWER8NVL
and "POWER8 DD1", as one of the variations is known in the kernel
source? Can we safely migrate guests eg. from a POWER8 v1.0 host to
a POWER8E v2.1 host?

Yes. afaik the only difference between POWER8 and POWER8E is how many cores are packed into an actual chip.


Uh.. won't that make qemu attempt to set a specific PVR, though -
which will fail with recent KVM if it's not *exactly* the same as
the
host PVR.

The "POWER8" CPU class is created dynamically (like the "host" CPU
class)
and has the actual host PVR so setting it to KVM cannot fail.

When TCG, the class is not registered and alias is used instead.

Can you please point out where the dynamical creation happens for the
POWER8 class? I haven't been able to locate it, but then again I'm
all but familiar with QEMU's source :)


kvm_ppc_register_host_cpu_type(), last chunk:

/* Register generic family CPU class for a family */
pvr_pcc = ppc_cpu_get_family_class(pvr_pcc);
dc = DEVICE_CLASS(pvr_pcc);
type_info.parent = object_class_get_name(OBJECT_CLASS(pvr_pcc));
type_info.name = g_strdup_printf("%s-"TYPE_POWERPC_CPU, dc->desc);
type_register(&type_info);


 From libvirt's point of view, it would be nice to be able to identify
as "POWER8" anything that looks like it, by matching the host's PVR
agains a numer of known PVRs (with relative bitmask). Ideally, if the
host can be identified as POWER8, that's the only CPU model libvirt
should advertise...

I have a very little idea about libvirt here. QEMU considers everything with 0x004dxxxx and 0x004bxxxx as POWER8 (ppc_pvr_match_power8() helper) and supports migration between these.

I am adding Shiva to the coversation, he might enlighen us how this is solved by powerkvm's libvirt.


--
Alexey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]