From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g7KPF-0008MX-4P for qemu-devel@nongnu.org; Tue, 02 Oct 2018 09:08:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g7KPA-0001nn-GW for qemu-devel@nongnu.org; Tue, 02 Oct 2018 09:08:03 -0400 Received: from mail-oi1-x241.google.com ([2607:f8b0:4864:20::241]:37497) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g7KPA-0001ng-Bk for qemu-devel@nongnu.org; Tue, 02 Oct 2018 09:08:00 -0400 Received: by mail-oi1-x241.google.com with SMTP id e17-v6so1427676oib.4 for ; Tue, 02 Oct 2018 06:08:00 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Peter Maydell Date: Tue, 2 Oct 2018 14:07:38 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Subject: Re: [Qemu-devel] [RFC] [PATCH 0/3] qemu: arm: Migration between machines with different MIDR values List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: mjaggi@caviumnetworks.com Cc: "Jaggi, Manish" , "quintela@redhat.com" , "dgilbert@redhat.com" , "eric.auger@redhat.com" , "qemu-devel@nongnu.org" , "Nair, Jayachandran" , "Nowicki, Tomasz" On 27 September 2018 at 02:13, wrote: > From: Manish Jaggi > > QEMU on arm systems use -machine virt -cpu host option for a VM. > Migration thus is limited between machines with same cpu. > > This is a limitation if migration is desired between cpus which are of same > family and have only few diferences like bug fixes which have no effect on > VM operation. They just differ in say MIDR values. > > This patchset introduces a command line option -skipinvariant. Invariant > registers will be skipped from being restored from guests context on migrated > host. > > Mailing list discussion on this topic: > https://www.mail-archive.com/qemu-devel@nongnu.org/msg560043.html Hi; thanks for this patch. The issue I see with this patch is that the KVM/ARM QEMU approach to system registers so far has been "the kernel knows about these and it is in control". So we ask the kernel for the list of registers, and just save and restore those. That would suggest that if there are sysregs where it's OK in fact to ignore a difference between two constant register values, it should be the kernel doing the "actually, this mismatch is OK" behaviour... For instance, it's probably OK to ignore a MIDR_EL1 difference that just indicates a minor revision bump; but not to ignore one that indicates you just tried to migrate a Cortex-A53 over to a Cavium CPU. thanks -- PMM