From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33183) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZD1gl-0005uT-3f for qemu-devel@nongnu.org; Wed, 08 Jul 2015 22:35:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZD1gg-00052s-3F for qemu-devel@nongnu.org; Wed, 08 Jul 2015 22:35:51 -0400 Received: from mail-pd0-f172.google.com ([209.85.192.172]:33456) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZD1gf-00050t-Cp for qemu-devel@nongnu.org; Wed, 08 Jul 2015 22:35:45 -0400 Received: by pdbqm3 with SMTP id qm3so12541168pdb.0 for ; Wed, 08 Jul 2015 19:35:42 -0700 (PDT) References: <1436327021-14744-1-git-send-email-david@gibson.dropbear.id.au> <559CA2B4.3090303@ozlabs.ru> <20150708053708.GN17857@voom.redhat.com> <559CC5DB.2030407@ozlabs.ru> <20150708064518.GO17857@voom.redhat.com> <559CCB15.3070806@ozlabs.ru> <1436373336.20526.97.camel@redhat.com> From: Alexey Kardashevskiy Message-ID: <559DDDF4.2010005@ozlabs.ru> Date: Thu, 9 Jul 2015 12:35:32 +1000 MIME-Version: 1.0 In-Reply-To: <1436373336.20526.97.camel@redhat.com> Content-Type: text/plain; charset=koi8-r; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] target-ppc: Add POWER8E_v2.1 CPU model. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrea Bolognani , David Gibson Cc: lvivier@redhat.com, thuth@redhat.com, Michael Roth , qemu-devel@nongnu.org, agraf@suse.de, qemu-ppc@nongnu.org, Shivaprasad G Bhat , afaerber@suse.de 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