From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai2xx-0002mi-Ro for qemu-devel@nongnu.org; Mon, 21 Mar 2016 12:46:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ai2xs-0006Pj-5H for qemu-devel@nongnu.org; Mon, 21 Mar 2016 12:46:05 -0400 Received: from e06smtp06.uk.ibm.com ([195.75.94.102]:34568) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ai2xr-0006OG-Ls for qemu-devel@nongnu.org; Mon, 21 Mar 2016 12:45:59 -0400 Received: from localhost by e06smtp06.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 21 Mar 2016 16:45:56 -0000 Date: Mon, 21 Mar 2016 17:45:48 +0100 From: Greg Kurz Message-ID: <20160321174548.0e533f09@bahia.huguette.org> In-Reply-To: <56F01EC9.4050202@redhat.com> References: <1458568928-3055-1-git-send-email-clg@fr.ibm.com> <1458568928-3055-2-git-send-email-clg@fr.ibm.com> <56F01EC9.4050202@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Qemu-ppc] [RFC PATCH 1/2] target-ppc: migrate interrupt vectors address for spapr VM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: =?UTF-8?B?Q8OpZHJpYw==?= Le Goater , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson On Mon, 21 Mar 2016 17:18:17 +0100 Thomas Huth wrote: > On 21.03.2016 15:02, C=C3=A9dric Le Goater wrote: > > This address is changed by the linux kernel using the H_SET_MODE hcall > > and needs to be migrated in order to restart a spapr VM running in > > TCG. Other platforms should not be affected. > >=20 > > Signed-off-by: C=C3=A9dric Le Goater > > --- > > target-ppc/machine.c | 3 +++ > > 1 file changed, 3 insertions(+) > >=20 > > diff --git a/target-ppc/machine.c b/target-ppc/machine.c > > index 692121e98319..a418d463db83 100644 > > --- a/target-ppc/machine.c > > +++ b/target-ppc/machine.c > > @@ -553,6 +553,9 @@ const VMStateDescription vmstate_ppc_cpu =3D { > > VMSTATE_UINTTL(env.hflags_nmsr, PowerPCCPU), > > /* FIXME: access_type? */ > > =20 > > + /* Effective Address of interrupt vectors */ > > + VMSTATE_UINTTL(env.excp_prefix, PowerPCCPU), > > + > > /* Sanity checking */ > > VMSTATE_UINTTL_EQUAL(env.msr_mask, PowerPCCPU), > > VMSTATE_UINT64_EQUAL(env.insns_flags, PowerPCCPU), =20 >=20 > I'm really no expert with all this migration stuff, but don't you have > to bump the version_id when you add new fields to the vmstate? Yes... > ... and/or use VMSTATE_UINTTL_V() so that migration from older versions ... and also yes. > of QEMU to the current one also still works with KVM? For example, is it > still possible to migrate from QEMU 2.5 to QEMU 2.6 in KVM if you only > use VMSTATE_UINTTL without the _V suffix? >=20 No we really want to use the _V version here: it indicates that starting wi= th this version (v6), cpu objects stream env.excp_prefix. > Thomas >=20 >=20 -- Greg