From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WX0E1-0005WE-MI for qemu-devel@nongnu.org; Sun, 06 Apr 2014 23:28:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WX0Ds-0001ke-Ay for qemu-devel@nongnu.org; Sun, 06 Apr 2014 23:27:57 -0400 Received: from mail-pb0-f50.google.com ([209.85.160.50]:47060) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WX0Ds-0001kR-2P for qemu-devel@nongnu.org; Sun, 06 Apr 2014 23:27:48 -0400 Received: by mail-pb0-f50.google.com with SMTP id md12so6084937pbc.37 for ; Sun, 06 Apr 2014 20:27:47 -0700 (PDT) Message-ID: <53421B2E.2060301@ozlabs.ru> Date: Mon, 07 Apr 2014 13:27:42 +1000 From: Alexey Kardashevskiy MIME-Version: 1.0 References: <1395638892-24481-1-git-send-email-aik@ozlabs.ru> <533E4050.3030705@ozlabs.ru> <533EA582.4090206@suse.de> In-Reply-To: <533EA582.4090206@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH] target-ppc: enable migration within the same CPU family List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Bharata B Rao , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, =?UTF-8?B?QW5kcmVhcyBGw6Ry?= =?UTF-8?B?YmVy?= On 04/04/2014 11:28 PM, Alexander Graf wrote: > On 04/04/2014 07:17 AM, Alexey Kardashevskiy wrote: >> On 03/24/2014 04:28 PM, Alexey Kardashevskiy wrote: >>> Currently only migration fails if CPU version is different even a bit. >>> For example, migration from POWER7 v2.0 to POWER7 v2.1 fails because of >>> that. Since there is no difference between CPU versions which could >>> affect migration stream, we can safely enable it. >>> >>> This adds a helper to find the closest POWERPC family class (i.e. first >>> abstract class in hierarchy). >>> >>> This replaces VMSTATE_UINTTL_EQUAL statement with a custom handler which >>> checks if the source and destination CPUs belong to the same family and >>> fails if they are not. >>> >>> This adds a PVR reset to the default value as it will be overwritten >>> by VMSTATE_UINTTL_ARRAY(env.spr, PowerPCCPU, 1024). >>> >>> Since the actual migration format is not changed by this patch, >>> @version_id of vmstate_ppc_cpu does not have to be changed either. >>> >>> Signed-off-by: Bharata B Rao >>> Signed-off-by: Alexey Kardashevskiy >> >> Ping? > > Can't we just always allow migration to succeed? It's a problem of the tool > stack above if it allows migration to an incompatible host, no? This is not how libvirt works. It simply sends the source XML, reconstructs a guest on the destination side and then migrates. hoping that the migration will fail is something (which only QEMU has knowledge of) is incompatible. The new guest will start with "-cpu host" (as the source) but it will create diffrent CPU class and do different things. If we do not check PVR (and cpu_dt_id and chip_id - the latter is coming soon) and migrate power8->power7, we can easily get a broken guest. How would I fix this CPU parameters (i.e. PVR/cpu_dt_id) check in the existing libvirt? -- Alexey