All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Andrea Bolognani <abologna@redhat.com>,
	David Gibson <david@gibson.dropbear.id.au>
Cc: lvivier@redhat.com, thuth@redhat.com,
	Michael Roth <mdroth@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org, agraf@suse.de, qemu-ppc@nongnu.org,
	Shivaprasad G Bhat <sbhat@linux.vnet.ibm.com>,
	afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH] target-ppc: Add POWER8E_v2.1 CPU model.
Date: Thu, 9 Jul 2015 12:35:32 +1000	[thread overview]
Message-ID: <559DDDF4.2010005@ozlabs.ru> (raw)
In-Reply-To: <1436373336.20526.97.camel@redhat.com>

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	other threads:[~2015-07-09  2:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-08  3:43 [Qemu-devel] [PATCH] target-ppc: Add POWER8E_v2.1 CPU model David Gibson
2015-07-08  4:10 ` Alexey Kardashevskiy
2015-07-08  5:37   ` David Gibson
2015-07-08  6:40     ` Alexey Kardashevskiy
2015-07-08  6:45       ` David Gibson
2015-07-08  7:02         ` Alexey Kardashevskiy
2015-07-08 16:35           ` Andrea Bolognani
2015-07-09  2:35             ` Alexey Kardashevskiy [this message]
2015-07-09 10:03               ` Andrea Bolognani
2015-07-10  5:19                 ` Alexey Kardashevskiy
2015-07-10  9:19                   ` Andrea Bolognani
2015-07-13  3:11                     ` Alexey Kardashevskiy

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=559DDDF4.2010005@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --cc=abologna@redhat.com \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=david@gibson.dropbear.id.au \
    --cc=lvivier@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=sbhat@linux.vnet.ibm.com \
    --cc=thuth@redhat.com \
    /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 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.