[{"id":1766112,"web_url":"http://patchwork.ozlabs.org/comment/1766112/","msgid":"<20170911095059.101e0cfc@bahia.lan>","list_archive_url":null,"date":"2017-09-11T07:50:59","subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","submitter":{"id":69178,"url":"http://patchwork.ozlabs.org/api/people/69178/","name":"Greg Kurz","email":"groug@kaod.org"},"content":"On Sun, 10 Sep 2017 15:37:33 +0100\nMark Cave-Ayland <mark.cave-ayland@ilande.co.uk> wrote:\n\n> Commit a90db15 \"target-ppc: Convert ppc cpu savevm to VMStateDescription\"\n> appears to drop the internal CPU IRQ state from the migration stream. Whilst\n> testing migration on g3beige/mac99 machines, test images would randomly fail to\n> resume unless a key was pressed on the VGA console.\n> \n> Further investigation suggests that internal CPU IRQ state isn't being\n> preserved and so interrupts asserted at the time of migration are lost. Adding\n> the pending_interrupts and irq_input_state fields back into the migration\n> stream appears to fix the problem here during local tests.\n> \n> As part of this commit we bump the vmstate_ppc version from 5 to 6 to handle\n> the additional fields.\n> \n\nAnd so this unconditionally breaks backward migration... what about adding\na subsection for this ?\n\n> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>\n> ---\n>  target/ppc/machine.c |    6 +++++-\n>  1 file changed, 5 insertions(+), 1 deletion(-)\n> \n> diff --git a/target/ppc/machine.c b/target/ppc/machine.c\n> index e59049f..8fec1a4 100644\n> --- a/target/ppc/machine.c\n> +++ b/target/ppc/machine.c\n> @@ -647,7 +647,7 @@ static const VMStateDescription vmstate_compat = {\n>  \n>  const VMStateDescription vmstate_ppc_cpu = {\n>      .name = \"cpu\",\n> -    .version_id = 5,\n> +    .version_id = 6,\n>      .minimum_version_id = 5,\n>      .minimum_version_id_old = 4,\n>      .load_state_old = cpu_load_old,\n> @@ -678,6 +678,10 @@ const VMStateDescription vmstate_ppc_cpu = {\n>          VMSTATE_UINTTL(env.hflags_nmsr, PowerPCCPU),\n>          /* FIXME: access_type? */\n>  \n> +        /* Interrupt state */\n> +        VMSTATE_UINT32_V(env.pending_interrupts, PowerPCCPU, 6),\n> +        VMSTATE_UINT32_V(env.irq_input_state, PowerPCCPU, 6),\n> +\n>          /* Sanity checking */\n>          VMSTATE_UINTTL_TEST(mig_msr_mask, PowerPCCPU, cpu_pre_2_8_migration),\n>          VMSTATE_UINT64_TEST(mig_insns_flags, PowerPCCPU, cpu_pre_2_8_migration),","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrKrL4bYsz9s81\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 17:51:46 +1000 (AEST)","from localhost ([::1]:56009 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1drJVQ-0006zO-Ne\n\tfor incoming@patchwork.ozlabs.org; Mon, 11 Sep 2017 03:51:44 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:48133)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <groug@kaod.org>) id 1drJUz-0006xi-Qd\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 03:51:19 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <groug@kaod.org>) id 1drJUw-00019x-O4\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 03:51:17 -0400","from 7.mo1.mail-out.ovh.net ([87.98.158.110]:52287)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <groug@kaod.org>) id 1drJUw-00017v-HU\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 03:51:14 -0400","from player169.ha.ovh.net (b9.ovh.net [213.186.33.59])\n\tby mo1.mail-out.ovh.net (Postfix) with ESMTP id 59F84930E9\n\tfor <qemu-devel@nongnu.org>; Mon, 11 Sep 2017 09:51:10 +0200 (CEST)","from bahia.lan (gar31-1-82-66-74-139.fbx.proxad.net [82.66.74.139])\n\t(Authenticated sender: groug@kaod.org)\n\tby player169.ha.ovh.net (Postfix) with ESMTPSA id BA3A2580072;\n\tMon, 11 Sep 2017 09:51:00 +0200 (CEST)"],"Date":"Mon, 11 Sep 2017 09:50:59 +0200","From":"Greg Kurz <groug@kaod.org>","To":"Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>","Message-ID":"<20170911095059.101e0cfc@bahia.lan>","In-Reply-To":"<1505054255-2990-3-git-send-email-mark.cave-ayland@ilande.co.uk>","References":"<1505054255-2990-1-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<1505054255-2990-3-git-send-email-mark.cave-ayland@ilande.co.uk>","X-Mailer":"Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-redhat-linux-gnu)","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha1;\n\tboundary=\"Sig_/dvLeBt9=am+I5T=gEssXqqO\";\n\tprotocol=\"application/pgp-signature\"","X-Ovh-Tracer-Id":"4642366793019398425","X-VR-SPAMSTATE":"OK","X-VR-SPAMSCORE":"-100","X-VR-SPAMCAUSE":"gggruggvucftvghtrhhoucdtuddrfeelledrfeelgdekgecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"87.98.158.110","Subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"aik@ozlabs.ru, lvivier@redhat.com, qemu-ppc@nongnu.org,\n\tqemu-devel@nongnu.org, david@gibson.dropbear.id.au","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1766167,"web_url":"http://patchwork.ozlabs.org/comment/1766167/","msgid":"<20170911093032.GA2857@work-vm>","list_archive_url":null,"date":"2017-09-11T09:30:33","subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","submitter":{"id":48102,"url":"http://patchwork.ozlabs.org/api/people/48102/","name":"Dr. David Alan Gilbert","email":"dgilbert@redhat.com"},"content":"* Greg Kurz (groug@kaod.org) wrote:\n> On Sun, 10 Sep 2017 15:37:33 +0100\n> Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> wrote:\n> \n> > Commit a90db15 \"target-ppc: Convert ppc cpu savevm to VMStateDescription\"\n> > appears to drop the internal CPU IRQ state from the migration stream. Whilst\n> > testing migration on g3beige/mac99 machines, test images would randomly fail to\n> > resume unless a key was pressed on the VGA console.\n> > \n> > Further investigation suggests that internal CPU IRQ state isn't being\n> > preserved and so interrupts asserted at the time of migration are lost. Adding\n> > the pending_interrupts and irq_input_state fields back into the migration\n> > stream appears to fix the problem here during local tests.\n> > \n> > As part of this commit we bump the vmstate_ppc version from 5 to 6 to handle\n> > the additional fields.\n> > \n> \n> And so this unconditionally breaks backward migration... what about adding\n> a subsection for this ?\n\nand wiring it to a flag on the machine type so that older machine types\ndon't send it.\n\nDave\n\n> > Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>\n> > ---\n> >  target/ppc/machine.c |    6 +++++-\n> >  1 file changed, 5 insertions(+), 1 deletion(-)\n> > \n> > diff --git a/target/ppc/machine.c b/target/ppc/machine.c\n> > index e59049f..8fec1a4 100644\n> > --- a/target/ppc/machine.c\n> > +++ b/target/ppc/machine.c\n> > @@ -647,7 +647,7 @@ static const VMStateDescription vmstate_compat = {\n> >  \n> >  const VMStateDescription vmstate_ppc_cpu = {\n> >      .name = \"cpu\",\n> > -    .version_id = 5,\n> > +    .version_id = 6,\n> >      .minimum_version_id = 5,\n> >      .minimum_version_id_old = 4,\n> >      .load_state_old = cpu_load_old,\n> > @@ -678,6 +678,10 @@ const VMStateDescription vmstate_ppc_cpu = {\n> >          VMSTATE_UINTTL(env.hflags_nmsr, PowerPCCPU),\n> >          /* FIXME: access_type? */\n> >  \n> > +        /* Interrupt state */\n> > +        VMSTATE_UINT32_V(env.pending_interrupts, PowerPCCPU, 6),\n> > +        VMSTATE_UINT32_V(env.irq_input_state, PowerPCCPU, 6),\n> > +\n> >          /* Sanity checking */\n> >          VMSTATE_UINTTL_TEST(mig_msr_mask, PowerPCCPU, cpu_pre_2_8_migration),\n> >          VMSTATE_UINT64_TEST(mig_insns_flags, PowerPCCPU, cpu_pre_2_8_migration),\n> \n\n\n--\nDr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=dgilbert@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrN355WVcz9s7G\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 19:31:13 +1000 (AEST)","from localhost ([::1]:56327 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1drL3f-0004Ez-QC\n\tfor incoming@patchwork.ozlabs.org; Mon, 11 Sep 2017 05:31:11 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:45321)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <dgilbert@redhat.com>) id 1drL3E-0004El-AM\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 05:30:45 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <dgilbert@redhat.com>) id 1drL3A-0002nC-Aq\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 05:30:44 -0400","from mx1.redhat.com ([209.132.183.28]:58908)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <dgilbert@redhat.com>)\n\tid 1drL39-0002mL-SG; Mon, 11 Sep 2017 05:30:40 -0400","from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 117BB53371;\n\tMon, 11 Sep 2017 09:30:38 +0000 (UTC)","from work-vm (ovpn-117-187.ams2.redhat.com [10.36.117.187])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id 889B6649C8;\n\tMon, 11 Sep 2017 09:30:35 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 117BB53371","Date":"Mon, 11 Sep 2017 10:30:33 +0100","From":"\"Dr. David Alan Gilbert\" <dgilbert@redhat.com>","To":"Greg Kurz <groug@kaod.org>","Message-ID":"<20170911093032.GA2857@work-vm>","References":"<1505054255-2990-1-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<1505054255-2990-3-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<20170911095059.101e0cfc@bahia.lan>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170911095059.101e0cfc@bahia.lan>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.11","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.25]);\n\tMon, 11 Sep 2017 09:30:38 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"lvivier@redhat.com, aik@ozlabs.ru,\n\tMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,\n\tqemu-devel@nongnu.org, qemu-ppc@nongnu.org, david@gibson.dropbear.id.au","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1766219,"web_url":"http://patchwork.ozlabs.org/comment/1766219/","msgid":"<20170911104854.GB2784@umbus.fritz.box>","list_archive_url":null,"date":"2017-09-11T10:48:54","subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","submitter":{"id":47,"url":"http://patchwork.ozlabs.org/api/people/47/","name":"David Gibson","email":"david@gibson.dropbear.id.au"},"content":"On Mon, Sep 11, 2017 at 10:30:33AM +0100, Dr. David Alan Gilbert wrote:\n> * Greg Kurz (groug@kaod.org) wrote:\n> > On Sun, 10 Sep 2017 15:37:33 +0100\n> > Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> wrote:\n> > \n> > > Commit a90db15 \"target-ppc: Convert ppc cpu savevm to VMStateDescription\"\n> > > appears to drop the internal CPU IRQ state from the migration stream. Whilst\n> > > testing migration on g3beige/mac99 machines, test images would randomly fail to\n> > > resume unless a key was pressed on the VGA console.\n> > > \n> > > Further investigation suggests that internal CPU IRQ state isn't being\n> > > preserved and so interrupts asserted at the time of migration are lost. Adding\n> > > the pending_interrupts and irq_input_state fields back into the migration\n> > > stream appears to fix the problem here during local tests.\n> > > \n> > > As part of this commit we bump the vmstate_ppc version from 5 to 6 to handle\n> > > the additional fields.\n> > > \n> > \n> > And so this unconditionally breaks backward migration... what about adding\n> > a subsection for this ?\n> \n> and wiring it to a flag on the machine type so that older machine types\n> don't send it.\n\nRight, a subsection is certainly necessary to avoid breaking backwards\nmigration.\n\nBut apart from that I want to understand better exactly why this is\nnecessary.  What's the state that's being lost, and is it really not\nrecoverable from anywhere else.\n\nThe other thing that concerns me is how we're encoding the\ninformation.  These are essentially internal fields, not reflecting\nsomething with an architected encoding - adding those to the migration\nstream is often a bad idea - it inhibits our ability to rework\ninternal encodings.\n> \n> Dave\n> \n> > > Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>\n> > > ---\n> > >  target/ppc/machine.c |    6 +++++-\n> > >  1 file changed, 5 insertions(+), 1 deletion(-)\n> > > \n> > > diff --git a/target/ppc/machine.c b/target/ppc/machine.c\n> > > index e59049f..8fec1a4 100644\n> > > --- a/target/ppc/machine.c\n> > > +++ b/target/ppc/machine.c\n> > > @@ -647,7 +647,7 @@ static const VMStateDescription vmstate_compat = {\n> > >  \n> > >  const VMStateDescription vmstate_ppc_cpu = {\n> > >      .name = \"cpu\",\n> > > -    .version_id = 5,\n> > > +    .version_id = 6,\n> > >      .minimum_version_id = 5,\n> > >      .minimum_version_id_old = 4,\n> > >      .load_state_old = cpu_load_old,\n> > > @@ -678,6 +678,10 @@ const VMStateDescription vmstate_ppc_cpu = {\n> > >          VMSTATE_UINTTL(env.hflags_nmsr, PowerPCCPU),\n> > >          /* FIXME: access_type? */\n> > >  \n> > > +        /* Interrupt state */\n> > > +        VMSTATE_UINT32_V(env.pending_interrupts, PowerPCCPU, 6),\n> > > +        VMSTATE_UINT32_V(env.irq_input_state, PowerPCCPU, 6),\n> > > +\n> > >          /* Sanity checking */\n> > >          VMSTATE_UINTTL_TEST(mig_msr_mask, PowerPCCPU, cpu_pre_2_8_migration),\n> > >          VMSTATE_UINT64_TEST(mig_insns_flags, PowerPCCPU, cpu_pre_2_8_migration),\n> > \n> \n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=gibson.dropbear.id.au\n\theader.i=@gibson.dropbear.id.au header.b=\"fhWYB93e\"; \n\tdkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrPzx1nDTz9s83\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 20:58:37 +1000 (AEST)","from localhost ([::1]:56688 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1drMQF-0007qH-DK\n\tfor incoming@patchwork.ozlabs.org; Mon, 11 Sep 2017 06:58:35 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:39425)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1drMPT-0007oA-K4\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 06:57:49 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1drMPP-0002HP-O8\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 06:57:47 -0400","from ozlabs.org ([103.22.144.67]:47227)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <dgibson@ozlabs.org>)\n\tid 1drMPP-0002Ek-8V; Mon, 11 Sep 2017 06:57:43 -0400","by ozlabs.org (Postfix, from userid 1007)\n\tid 3xrPyq47qpz9s83; Mon, 11 Sep 2017 20:57:39 +1000 (AEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n\td=gibson.dropbear.id.au; s=201602; t=1505127459;\n\tbh=MmvGSLVOi3oXm17v+8GRXdszs3lqclkizpYiZJFKuvw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=fhWYB93eYoOyyabK0aDqVZpMLrdahhq50QvUEHMmT8mOKOiWFiRjniaUnf6Nefp1R\n\tBN9IFeDiRx6oDjZ+hpDPQ5wLS2kNyxFAJ77+fQSEcUQCjoE2pix9WU2TihdDNSPbDH\n\tF8P/1buYkEZjVhseocKsIUVqmgRkKAvd/fxmb9Ok=","Date":"Mon, 11 Sep 2017 20:48:54 +1000","From":"David Gibson <david@gibson.dropbear.id.au>","To":"\"Dr. David Alan Gilbert\" <dgilbert@redhat.com>","Message-ID":"<20170911104854.GB2784@umbus.fritz.box>","References":"<1505054255-2990-1-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<1505054255-2990-3-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<20170911095059.101e0cfc@bahia.lan> <20170911093032.GA2857@work-vm>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"9zSXsLTf0vkW971A\"","Content-Disposition":"inline","In-Reply-To":"<20170911093032.GA2857@work-vm>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"103.22.144.67","Subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"lvivier@redhat.com, aik@ozlabs.ru,\n\tMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,\n\tGreg Kurz <groug@kaod.org>, qemu-devel@nongnu.org, qemu-ppc@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1766387,"web_url":"http://patchwork.ozlabs.org/comment/1766387/","msgid":"<cc212d72-1eff-86ae-1e34-fdc1636015e5@ilande.co.uk>","list_archive_url":null,"date":"2017-09-11T16:46:12","subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","submitter":{"id":12451,"url":"http://patchwork.ozlabs.org/api/people/12451/","name":"Mark Cave-Ayland","email":"mark.cave-ayland@ilande.co.uk"},"content":"On 11/09/17 11:48, David Gibson wrote:\n\n> On Mon, Sep 11, 2017 at 10:30:33AM +0100, Dr. David Alan Gilbert wrote:\n>> * Greg Kurz (groug@kaod.org) wrote:\n>>> On Sun, 10 Sep 2017 15:37:33 +0100\n>>> Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> wrote:\n>>>\n>>>> Commit a90db15 \"target-ppc: Convert ppc cpu savevm to VMStateDescription\"\n>>>> appears to drop the internal CPU IRQ state from the migration stream. Whilst\n>>>> testing migration on g3beige/mac99 machines, test images would randomly fail to\n>>>> resume unless a key was pressed on the VGA console.\n>>>>\n>>>> Further investigation suggests that internal CPU IRQ state isn't being\n>>>> preserved and so interrupts asserted at the time of migration are lost. Adding\n>>>> the pending_interrupts and irq_input_state fields back into the migration\n>>>> stream appears to fix the problem here during local tests.\n>>>>\n>>>> As part of this commit we bump the vmstate_ppc version from 5 to 6 to handle\n>>>> the additional fields.\n>>>>\n>>>\n>>> And so this unconditionally breaks backward migration... what about adding\n>>> a subsection for this ?\n>>\n>> and wiring it to a flag on the machine type so that older machine types\n>> don't send it.\n> \n> Right, a subsection is certainly necessary to avoid breaking backwards\n> migration.\n\nThe suggestion of using the VMSTATE_*_V macros with an increased version\nnumber came from Alexey's original review of the patch many months ago\nwhich is why I did it that way.\n\nOut of curiosity though, what is the criteria for supporting backwards\nmigration? Obviously forward migration is supported as-is in this\nmanner, so what determines if a patch needs to be backwards compatible\nand how far?\n\n> But apart from that I want to understand better exactly why this is\n> necessary.  What's the state that's being lost, and is it really not\n> recoverable from anywhere else.\n\nThe test case I have is installing Darwin PPC 6.02 with qemu-system-ppc\nTCG and repeatedly pausing, executing \"savevm foo\", then quitting and\ncontinuing with \"-loadvm foo\" during the installation phase. About 1 in\n10 times the installer hangs after the loadvm until I press a key, at\nwhich point it carries on as normal.\n\nI then proceeded to going backwards through the git history until I\nfound out that it was the removal of the pending_interrupts,\nirq_input_state and access_type fields during the conversion to\nVMStateDescription commit a90db15 which seemed to cause the problem.\n\n> The other thing that concerns me is how we're encoding the\n> information.  These are essentially internal fields, not reflecting\n> something with an architected encoding - adding those to the migration\n> stream is often a bad idea - it inhibits our ability to rework\n> internal encodings.\n\nI'm not sure how this should be managed, however there was a similar\nissue with excp_prefix (which was also removed in a90db15) that was\nfixed in 2360b6e by calling a helper in cpu_post_load(). I can't easily\nsee how could work with env.pending_interrupts and env.irq_input_state\nthough.\n\n\nATB,\n\nMark.","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrYk31Txxz9s83\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 02:47:06 +1000 (AEST)","from localhost ([::1]:59021 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1drRrV-0006VE-4V\n\tfor incoming@patchwork.ozlabs.org; Mon, 11 Sep 2017 12:47:05 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:51742)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <mark.cave-ayland@ilande.co.uk>) id 1drRr6-0006Tp-7k\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 12:46:41 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <mark.cave-ayland@ilande.co.uk>) id 1drRr5-0000LG-7m\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 12:46:40 -0400","from chuckie.co.uk ([82.165.15.123]:38059\n\thelo=s16892447.onlinehome-server.info)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <mark.cave-ayland@ilande.co.uk>)\n\tid 1drRr0-0008WF-A2; Mon, 11 Sep 2017 12:46:34 -0400","from host109-151-159-252.range109-151.btcentralplus.com\n\t([109.151.159.252] helo=[192.168.1.65])\n\tby s16892447.onlinehome-server.info with esmtpsa\n\t(TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76)\n\t(envelope-from <mark.cave-ayland@ilande.co.uk>)\n\tid 1drRqs-0003ub-0e; Mon, 11 Sep 2017 17:46:27 +0100"],"To":"David Gibson <david@gibson.dropbear.id.au>,\n\t\"Dr. David Alan Gilbert\" <dgilbert@redhat.com>","References":"<1505054255-2990-1-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<1505054255-2990-3-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<20170911095059.101e0cfc@bahia.lan> <20170911093032.GA2857@work-vm>\n\t<20170911104854.GB2784@umbus.fritz.box>","From":"Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>","Message-ID":"<cc212d72-1eff-86ae-1e34-fdc1636015e5@ilande.co.uk>","Date":"Mon, 11 Sep 2017 17:46:12 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170911104854.GB2784@umbus.fritz.box>","Content-Type":"text/plain; charset=windows-1252","Content-Language":"en-US","Content-Transfer-Encoding":"8bit","X-SA-Exim-Connect-IP":"109.151.159.252","X-SA-Exim-Mail-From":"mark.cave-ayland@ilande.co.uk","X-SA-Exim-Version":"4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000)","X-SA-Exim-Scanned":"Yes (on s16892447.onlinehome-server.info)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 3.x [fuzzy]","X-Received-From":"82.165.15.123","Subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"lvivier@redhat.com, aik@ozlabs.ru, qemu-ppc@nongnu.org,\n\tGreg Kurz <groug@kaod.org>, qemu-devel@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1766413,"web_url":"http://patchwork.ozlabs.org/comment/1766413/","msgid":"<20170911171953.GE2150@work-vm>","list_archive_url":null,"date":"2017-09-11T17:19:54","subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","submitter":{"id":48102,"url":"http://patchwork.ozlabs.org/api/people/48102/","name":"Dr. David Alan Gilbert","email":"dgilbert@redhat.com"},"content":"* Mark Cave-Ayland (mark.cave-ayland@ilande.co.uk) wrote:\n> On 11/09/17 11:48, David Gibson wrote:\n> \n> > On Mon, Sep 11, 2017 at 10:30:33AM +0100, Dr. David Alan Gilbert wrote:\n> >> * Greg Kurz (groug@kaod.org) wrote:\n> >>> On Sun, 10 Sep 2017 15:37:33 +0100\n> >>> Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> wrote:\n> >>>\n> >>>> Commit a90db15 \"target-ppc: Convert ppc cpu savevm to VMStateDescription\"\n> >>>> appears to drop the internal CPU IRQ state from the migration stream. Whilst\n> >>>> testing migration on g3beige/mac99 machines, test images would randomly fail to\n> >>>> resume unless a key was pressed on the VGA console.\n> >>>>\n> >>>> Further investigation suggests that internal CPU IRQ state isn't being\n> >>>> preserved and so interrupts asserted at the time of migration are lost. Adding\n> >>>> the pending_interrupts and irq_input_state fields back into the migration\n> >>>> stream appears to fix the problem here during local tests.\n> >>>>\n> >>>> As part of this commit we bump the vmstate_ppc version from 5 to 6 to handle\n> >>>> the additional fields.\n> >>>>\n> >>>\n> >>> And so this unconditionally breaks backward migration... what about adding\n> >>> a subsection for this ?\n> >>\n> >> and wiring it to a flag on the machine type so that older machine types\n> >> don't send it.\n> > \n> > Right, a subsection is certainly necessary to avoid breaking backwards\n> > migration.\n> \n> The suggestion of using the VMSTATE_*_V macros with an increased version\n> number came from Alexey's original review of the patch many months ago\n> which is why I did it that way.\n> \n> Out of curiosity though, what is the criteria for supporting backwards\n> migration? Obviously forward migration is supported as-is in this\n> manner, so what determines if a patch needs to be backwards compatible\n> and how far?\n\nIt's a bit fuzzy.  Downstream we do backwards migration between various\nversions - and those versions are pretty arbitrarily chosen.\nGenerally I prefer if we don't break that upstream either, although\nit isn't tested much.\n\nIf it was in code that was specific to your g3beige I wouldn't mind;\nbut for ppc in general then if it breaks the server migration it'll\nbe a pain we'd have to then fix.  Best to keep it working upstream.\n\nBut it's fairly easy to put new fields in a subsection and tie it\nto a property;  that makes it easy to switch it on/off in machine\ntypes.\n\n> > But apart from that I want to understand better exactly why this is\n> > necessary.  What's the state that's being lost, and is it really not\n> > recoverable from anywhere else.\n> \n> The test case I have is installing Darwin PPC 6.02 with qemu-system-ppc\n> TCG and repeatedly pausing, executing \"savevm foo\", then quitting and\n> continuing with \"-loadvm foo\" during the installation phase. About 1 in\n> 10 times the installer hangs after the loadvm until I press a key, at\n> which point it carries on as normal.\n> \n> I then proceeded to going backwards through the git history until I\n> found out that it was the removal of the pending_interrupts,\n> irq_input_state and access_type fields during the conversion to\n> VMStateDescription commit a90db15 which seemed to cause the problem.\n> \n> > The other thing that concerns me is how we're encoding the\n> > information.  These are essentially internal fields, not reflecting\n> > something with an architected encoding - adding those to the migration\n> > stream is often a bad idea - it inhibits our ability to rework\n> > internal encodings.\n> \n> I'm not sure how this should be managed, however there was a similar\n> issue with excp_prefix (which was also removed in a90db15) that was\n> fixed in 2360b6e by calling a helper in cpu_post_load(). I can't easily\n> see how could work with env.pending_interrupts and env.irq_input_state\n> though.\n\nWithout knowing anything about this hardware... generally the migration\nstream should reflect the real state of the system rather than internal\nimplementation detail, that way if you change the implementation you\ndon't need to fudge the state.  Having said that, there's generally\nsome internal state that's perhaps not immediately obvious from specs\nuntil you try and implement it.\n\nDave\n\n> ATB,\n> \n> Mark.\n--\nDr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=dgilbert@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrZhC38rCz9s81\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 03:30:35 +1000 (AEST)","from localhost ([::1]:59362 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1drSXZ-0007gR-BU\n\tfor incoming@patchwork.ozlabs.org; Mon, 11 Sep 2017 13:30:33 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:37826)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <dgilbert@redhat.com>) id 1drSNR-0006Mz-ML\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 13:20:06 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <dgilbert@redhat.com>) id 1drSNM-0000Zt-Vi\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 13:20:05 -0400","from mx1.redhat.com ([209.132.183.28]:35158)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <dgilbert@redhat.com>)\n\tid 1drSNM-0000ZX-M3; Mon, 11 Sep 2017 13:20:00 -0400","from smtp.corp.redhat.com\n\t(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 7D1B1CBBA7;\n\tMon, 11 Sep 2017 17:19:59 +0000 (UTC)","from work-vm (ovpn-117-187.ams2.redhat.com [10.36.117.187])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id AE6B45C2E2;\n\tMon, 11 Sep 2017 17:19:56 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 7D1B1CBBA7","Date":"Mon, 11 Sep 2017 18:19:54 +0100","From":"\"Dr. David Alan Gilbert\" <dgilbert@redhat.com>","To":"Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>","Message-ID":"<20170911171953.GE2150@work-vm>","References":"<1505054255-2990-1-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<1505054255-2990-3-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<20170911095059.101e0cfc@bahia.lan> <20170911093032.GA2857@work-vm>\n\t<20170911104854.GB2784@umbus.fritz.box>\n\t<cc212d72-1eff-86ae-1e34-fdc1636015e5@ilande.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<cc212d72-1eff-86ae-1e34-fdc1636015e5@ilande.co.uk>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.12","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.25]);\n\tMon, 11 Sep 2017 17:19:59 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"lvivier@redhat.com, aik@ozlabs.ru, qemu-devel@nongnu.org,\n\tGreg Kurz <groug@kaod.org>, qemu-ppc@nongnu.org,\n\tDavid Gibson <david@gibson.dropbear.id.au>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1767221,"web_url":"http://patchwork.ozlabs.org/comment/1767221/","msgid":"<20170912162100.GD2225@work-vm>","list_archive_url":null,"date":"2017-09-12T16:21:01","subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","submitter":{"id":48102,"url":"http://patchwork.ozlabs.org/api/people/48102/","name":"Dr. David Alan Gilbert","email":"dgilbert@redhat.com"},"content":"* David Gibson (david@gibson.dropbear.id.au) wrote:\n> On Mon, Sep 11, 2017 at 10:30:33AM +0100, Dr. David Alan Gilbert wrote:\n> > * Greg Kurz (groug@kaod.org) wrote:\n> > > On Sun, 10 Sep 2017 15:37:33 +0100\n> > > Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> wrote:\n> > > \n> > > > Commit a90db15 \"target-ppc: Convert ppc cpu savevm to VMStateDescription\"\n> > > > appears to drop the internal CPU IRQ state from the migration stream. Whilst\n> > > > testing migration on g3beige/mac99 machines, test images would randomly fail to\n> > > > resume unless a key was pressed on the VGA console.\n> > > > \n> > > > Further investigation suggests that internal CPU IRQ state isn't being\n> > > > preserved and so interrupts asserted at the time of migration are lost. Adding\n> > > > the pending_interrupts and irq_input_state fields back into the migration\n> > > > stream appears to fix the problem here during local tests.\n> > > > \n> > > > As part of this commit we bump the vmstate_ppc version from 5 to 6 to handle\n> > > > the additional fields.\n> > > > \n> > > \n> > > And so this unconditionally breaks backward migration... what about adding\n> > > a subsection for this ?\n> > \n> > and wiring it to a flag on the machine type so that older machine types\n> > don't send it.\n> \n> Right, a subsection is certainly necessary to avoid breaking backwards\n> migration.\n> \n> But apart from that I want to understand better exactly why this is\n> necessary.  What's the state that's being lost, and is it really not\n> recoverable from anywhere else.\n> \n> The other thing that concerns me is how we're encoding the\n> information.  These are essentially internal fields, not reflecting\n> something with an architected encoding - adding those to the migration\n> stream is often a bad idea - it inhibits our ability to rework\n> internal encodings.\n\nYes, agreed, where possible the contents of the stream should reflect\n'real' state that's actually being modelled and be as independent of\nthe implementation as possible.\n\nDave\n\n> > \n> > Dave\n> > \n> > > > Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>\n> > > > ---\n> > > >  target/ppc/machine.c |    6 +++++-\n> > > >  1 file changed, 5 insertions(+), 1 deletion(-)\n> > > > \n> > > > diff --git a/target/ppc/machine.c b/target/ppc/machine.c\n> > > > index e59049f..8fec1a4 100644\n> > > > --- a/target/ppc/machine.c\n> > > > +++ b/target/ppc/machine.c\n> > > > @@ -647,7 +647,7 @@ static const VMStateDescription vmstate_compat = {\n> > > >  \n> > > >  const VMStateDescription vmstate_ppc_cpu = {\n> > > >      .name = \"cpu\",\n> > > > -    .version_id = 5,\n> > > > +    .version_id = 6,\n> > > >      .minimum_version_id = 5,\n> > > >      .minimum_version_id_old = 4,\n> > > >      .load_state_old = cpu_load_old,\n> > > > @@ -678,6 +678,10 @@ const VMStateDescription vmstate_ppc_cpu = {\n> > > >          VMSTATE_UINTTL(env.hflags_nmsr, PowerPCCPU),\n> > > >          /* FIXME: access_type? */\n> > > >  \n> > > > +        /* Interrupt state */\n> > > > +        VMSTATE_UINT32_V(env.pending_interrupts, PowerPCCPU, 6),\n> > > > +        VMSTATE_UINT32_V(env.irq_input_state, PowerPCCPU, 6),\n> > > > +\n> > > >          /* Sanity checking */\n> > > >          VMSTATE_UINTTL_TEST(mig_msr_mask, PowerPCCPU, cpu_pre_2_8_migration),\n> > > >          VMSTATE_UINT64_TEST(mig_insns_flags, PowerPCCPU, cpu_pre_2_8_migration),\n> > > \n> > \n> > \n> \n> -- \n> David Gibson\t\t\t| I'll have my music baroque, and my code\n> david AT gibson.dropbear.id.au\t| minimalist, thank you.  NOT _the_ _other_\n> \t\t\t\t| _way_ _around_!\n> http://www.ozlabs.org/~dgibson\n\n\n--\nDr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=dgilbert@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xs96B73MVz9s7f\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 02:21:37 +1000 (AEST)","from localhost ([::1]:36864 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1drnwL-0006nS-9k\n\tfor incoming@patchwork.ozlabs.org; Tue, 12 Sep 2017 12:21:33 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:35883)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <dgilbert@redhat.com>) id 1drnvy-0006m7-AP\n\tfor qemu-devel@nongnu.org; Tue, 12 Sep 2017 12:21:11 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <dgilbert@redhat.com>) id 1drnvv-0004he-KP\n\tfor qemu-devel@nongnu.org; Tue, 12 Sep 2017 12:21:10 -0400","from mx1.redhat.com ([209.132.183.28]:51252)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <dgilbert@redhat.com>)\n\tid 1drnvv-0004hS-At; Tue, 12 Sep 2017 12:21:07 -0400","from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id DED8F81E09;\n\tTue, 12 Sep 2017 16:21:05 +0000 (UTC)","from work-vm (ovpn-117-186.ams2.redhat.com [10.36.117.186])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id CA7125C323;\n\tTue, 12 Sep 2017 16:21:03 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com DED8F81E09","Date":"Tue, 12 Sep 2017 17:21:01 +0100","From":"\"Dr. David Alan Gilbert\" <dgilbert@redhat.com>","To":"David Gibson <david@gibson.dropbear.id.au>","Message-ID":"<20170912162100.GD2225@work-vm>","References":"<1505054255-2990-1-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<1505054255-2990-3-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<20170911095059.101e0cfc@bahia.lan> <20170911093032.GA2857@work-vm>\n\t<20170911104854.GB2784@umbus.fritz.box>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170911104854.GB2784@umbus.fritz.box>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.11","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.25]);\n\tTue, 12 Sep 2017 16:21:06 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"lvivier@redhat.com, aik@ozlabs.ru,\n\tMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,\n\tGreg Kurz <groug@kaod.org>, qemu-devel@nongnu.org, qemu-ppc@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1767238,"web_url":"http://patchwork.ozlabs.org/comment/1767238/","msgid":"<1bb6a27d-89a5-2e70-6976-74ab24430ec4@ilande.co.uk>","list_archive_url":null,"date":"2017-09-12T16:41:21","subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","submitter":{"id":12451,"url":"http://patchwork.ozlabs.org/api/people/12451/","name":"Mark Cave-Ayland","email":"mark.cave-ayland@ilande.co.uk"},"content":"On 12/09/17 17:21, Dr. David Alan Gilbert wrote:\n\n>> Right, a subsection is certainly necessary to avoid breaking backwards\n>> migration.\n>>\n>> But apart from that I want to understand better exactly why this is\n>> necessary.  What's the state that's being lost, and is it really not\n>> recoverable from anywhere else.\n>>\n>> The other thing that concerns me is how we're encoding the\n>> information.  These are essentially internal fields, not reflecting\n>> something with an architected encoding - adding those to the migration\n>> stream is often a bad idea - it inhibits our ability to rework\n>> internal encodings.\n> \n> Yes, agreed, where possible the contents of the stream should reflect\n> 'real' state that's actually being modelled and be as independent of\n> the implementation as possible.\n\nOh sure. However I should re-iterate that I'm not trying to add new\nfields into the migration stream, merely reinstate the ones that were\ndropped without warning in commit a90db15 by Alexey since without them\nTCG state doesn't restore correctly in my local tests.\n\nThe commit message mentions that prior to the conversion some CPU state\nwas missing but it doesn't mention anything about dropping existing\nfields as part of the conversion process so I suspect that this was an\naccidental side-effect.\n\nI can definitely look at re-implementing the patch using a subsection in\norder to preserve backwards compatibility though.\n\n\nATB,\n\nMark.","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xs9h33Mh4z9s3T\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 02:47:31 +1000 (AEST)","from localhost ([::1]:37328 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1droLR-0006BZ-Fk\n\tfor incoming@patchwork.ozlabs.org; Tue, 12 Sep 2017 12:47:29 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:53062)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <mark.cave-ayland@ilande.co.uk>) id 1droFp-00016u-Vz\n\tfor qemu-devel@nongnu.org; Tue, 12 Sep 2017 12:41:42 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <mark.cave-ayland@ilande.co.uk>) id 1droFp-0000TC-4x\n\tfor qemu-devel@nongnu.org; Tue, 12 Sep 2017 12:41:42 -0400","from chuckie.co.uk ([82.165.15.123]:43687\n\thelo=s16892447.onlinehome-server.info)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <mark.cave-ayland@ilande.co.uk>)\n\tid 1droFk-0000Pi-GU; Tue, 12 Sep 2017 12:41:36 -0400","from host109-151-159-252.range109-151.btcentralplus.com\n\t([109.151.159.252] helo=[192.168.1.65])\n\tby s16892447.onlinehome-server.info with esmtpsa\n\t(TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76)\n\t(envelope-from <mark.cave-ayland@ilande.co.uk>)\n\tid 1droFj-0001wz-Rx; Tue, 12 Sep 2017 17:41:37 +0100"],"To":"\"Dr. David Alan Gilbert\" <dgilbert@redhat.com>,\n\tDavid Gibson <david@gibson.dropbear.id.au>","References":"<1505054255-2990-1-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<1505054255-2990-3-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<20170911095059.101e0cfc@bahia.lan> <20170911093032.GA2857@work-vm>\n\t<20170911104854.GB2784@umbus.fritz.box>\n\t<20170912162100.GD2225@work-vm>","From":"Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>","Message-ID":"<1bb6a27d-89a5-2e70-6976-74ab24430ec4@ilande.co.uk>","Date":"Tue, 12 Sep 2017 17:41:21 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170912162100.GD2225@work-vm>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"8bit","X-SA-Exim-Connect-IP":"109.151.159.252","X-SA-Exim-Mail-From":"mark.cave-ayland@ilande.co.uk","X-SA-Exim-Version":"4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000)","X-SA-Exim-Scanned":"Yes (on s16892447.onlinehome-server.info)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 3.x [fuzzy]","X-Received-From":"82.165.15.123","Subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"lvivier@redhat.com, aik@ozlabs.ru, qemu-ppc@nongnu.org,\n\tGreg Kurz <groug@kaod.org>, qemu-devel@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1767244,"web_url":"http://patchwork.ozlabs.org/comment/1767244/","msgid":"<4f0cb74a-ae00-5921-291c-49c9acdb3e02@ilande.co.uk>","list_archive_url":null,"date":"2017-09-12T16:46:00","subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","submitter":{"id":12451,"url":"http://patchwork.ozlabs.org/api/people/12451/","name":"Mark Cave-Ayland","email":"mark.cave-ayland@ilande.co.uk"},"content":"On 12/09/17 17:41, Mark Cave-Ayland wrote:\n\n> The commit message mentions that prior to the conversion some CPU state\n> was missing but it doesn't mention anything about dropping existing\n> fields as part of the conversion process so I suspect that this was an\n> accidental side-effect.\n\nActually I've clicked send a little too early here since re-reading the\nlast paragraph of a90db15 I can see the inference here: \"Exactly what\nneeds to be saved in what configurations has been more carefully\nexamined, too\".\n\nAlexey - do you recall from your analysis why these fields were no\nlonger deemed necessary, and how your TCG tests were configured?\n\n\nATB,\n\nMark.","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xs9m66Fckz9s3T\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 02:51:02 +1000 (AEST)","from localhost ([::1]:37450 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1droOr-0001DR-0q\n\tfor incoming@patchwork.ozlabs.org; Tue, 12 Sep 2017 12:51:01 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:57457)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <mark.cave-ayland@ilande.co.uk>) id 1droKF-0005gd-BE\n\tfor qemu-devel@nongnu.org; Tue, 12 Sep 2017 12:46:16 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <mark.cave-ayland@ilande.co.uk>) id 1droKE-00043S-L8\n\tfor qemu-devel@nongnu.org; Tue, 12 Sep 2017 12:46:15 -0400","from chuckie.co.uk ([82.165.15.123]:43715\n\thelo=s16892447.onlinehome-server.info)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <mark.cave-ayland@ilande.co.uk>)\n\tid 1droKA-00040U-1v; Tue, 12 Sep 2017 12:46:10 -0400","from host109-151-159-252.range109-151.btcentralplus.com\n\t([109.151.159.252] helo=[192.168.1.65])\n\tby s16892447.onlinehome-server.info with esmtpsa\n\t(TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76)\n\t(envelope-from <mark.cave-ayland@ilande.co.uk>)\n\tid 1droKB-0001zE-3A; Tue, 12 Sep 2017 17:46:11 +0100"],"From":"Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>","To":"\"Dr. David Alan Gilbert\" <dgilbert@redhat.com>,\n\tDavid Gibson <david@gibson.dropbear.id.au>","References":"<1505054255-2990-1-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<1505054255-2990-3-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<20170911095059.101e0cfc@bahia.lan> <20170911093032.GA2857@work-vm>\n\t<20170911104854.GB2784@umbus.fritz.box>\n\t<20170912162100.GD2225@work-vm>\n\t<1bb6a27d-89a5-2e70-6976-74ab24430ec4@ilande.co.uk>","Message-ID":"<4f0cb74a-ae00-5921-291c-49c9acdb3e02@ilande.co.uk>","Date":"Tue, 12 Sep 2017 17:46:00 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<1bb6a27d-89a5-2e70-6976-74ab24430ec4@ilande.co.uk>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-SA-Exim-Connect-IP":"109.151.159.252","X-SA-Exim-Mail-From":"mark.cave-ayland@ilande.co.uk","X-SA-Exim-Version":"4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000)","X-SA-Exim-Scanned":"Yes (on s16892447.onlinehome-server.info)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 3.x [fuzzy]","X-Received-From":"82.165.15.123","Subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"lvivier@redhat.com, aik@ozlabs.ru, qemu-ppc@nongnu.org,\n\tGreg Kurz <groug@kaod.org>, qemu-devel@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1767459,"web_url":"http://patchwork.ozlabs.org/comment/1767459/","msgid":"<d7dd9adf-4727-aeb5-b8ad-ac8c22c2f4bf@ozlabs.ru>","list_archive_url":null,"date":"2017-09-13T02:23:13","subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","submitter":{"id":7621,"url":"http://patchwork.ozlabs.org/api/people/7621/","name":"Alexey Kardashevskiy","email":"aik@ozlabs.ru"},"content":"On 13/09/17 02:46, Mark Cave-Ayland wrote:\n> On 12/09/17 17:41, Mark Cave-Ayland wrote:\n> \n>> The commit message mentions that prior to the conversion some CPU state\n>> was missing but it doesn't mention anything about dropping existing\n>> fields as part of the conversion process so I suspect that this was an\n>> accidental side-effect.\n> \n> Actually I've clicked send a little too early here since re-reading the\n> last paragraph of a90db15 I can see the inference here: \"Exactly what\n> needs to be saved in what configurations has been more carefully\n> examined, too\".\n> \n> Alexey - do you recall from your analysis why these fields were no\n> longer deemed necessary, and how your TCG tests were configured?\n\nI most certainly did not do analysis (my bad. sorry) - I took the patch\nfrom David as he left the team, fixed to compile and pushed away. I am also\nvery suspicions we did not try migrating TCG or anything but pseries. My\nguest that things did not break (if they did not which I am not sure about,\nfor the TCG case) because the interrupt controller (XICS) or the\npseries-guest took care of resending an interrupt which does not seem to be\nthe case for mac99.","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ozlabs-ru.20150623.gappssmtp.com\n\theader.i=@ozlabs-ru.20150623.gappssmtp.com\n\theader.b=\"bB0oqpWx\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xsQTB61bnz9sNr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 12:23:58 +1000 (AEST)","from localhost ([::1]:39671 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1drxLI-0001zb-Ta\n\tfor incoming@patchwork.ozlabs.org; Tue, 12 Sep 2017 22:23:56 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:57211)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <aik@ozlabs.ru>) id 1drxKm-0001yH-RY\n\tfor qemu-devel@nongnu.org; Tue, 12 Sep 2017 22:23:26 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <aik@ozlabs.ru>) id 1drxKj-0000iu-FD\n\tfor qemu-devel@nongnu.org; Tue, 12 Sep 2017 22:23:24 -0400","from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]:38415)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <aik@ozlabs.ru>) id 1drxKj-0000gE-AU\n\tfor qemu-devel@nongnu.org; Tue, 12 Sep 2017 22:23:21 -0400","by mail-pg0-x243.google.com with SMTP id m30so2036013pgn.5\n\tfor <qemu-devel@nongnu.org>; Tue, 12 Sep 2017 19:23:20 -0700 (PDT)","from [10.61.2.175] ([122.99.82.10])\n\tby smtp.googlemail.com with ESMTPSA id\n\ts81sm25453300pfg.162.2017.09.12.19.23.15\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 12 Sep 2017 19:23:18 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ozlabs-ru.20150623.gappssmtp.com; s=20150623;\n\th=subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=XEBs0MpYYNLrSiyX5BY/8O5o36FyBHNa/1HwOsCvnhc=;\n\tb=bB0oqpWxcqJa+0HyYyYZaAlGX+CX4xq6nqqh1tIO1BKRGMuzB2zq2WyjsKQNicu7//\n\teS0r/7C9bcvoyi0B+Byj7hASfPIUoCZQ4qJ9y1XDDIZX2+p9nWxdTuhVggzP7vX9eW6A\n\tJIB37mtOpqsMGTULm/x8UIJcKXePs9CGcI6W1hXJ4RxmwTTwFDxSpoKGNxnNFF0tSqWV\n\tAOBlgNnfOgyMoC//DCkg8J2nNKkx8xkwis3O3UKp6dSgdPChZntjLyvt5+kG9r/wlil+\n\tMQyp8GSIUvinagorACm4qe5uRzw5zGYxaGLZLm8LVHI4XSyG1DoDZH2HQNByFFgqANFH\n\tb7xw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:cc:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=XEBs0MpYYNLrSiyX5BY/8O5o36FyBHNa/1HwOsCvnhc=;\n\tb=gMlQhk0BldgKjExj/zLOTSFOQvXEWwUuBXU6CKMKmHo90HWVghwgdtc0v8slZpq8+E\n\tTrUhVEOiA/TkZ7kS5oHphsrQp5XKCvuf0/w0dB76C+a1sd7u3Y2DQWg2t7G5vHEWDoTc\n\tQcMqwlmy+kHcpYPlBuuyXNq8vrXTeU8KoKPQL8kCMn9A7vumG1D92Jfugf0GRj6yjUeZ\n\tLF9Re2sz90DK0gGqIkajkYWdDRmfjafzGrCIdzuWgbMBtOO+kVfPlW8u9Hg9MdGWkvST\n\tKhyq9MJLnsa9DCLIrTaqiuMUQOHKkwzU4e2KpPM6i0zkTOP7lUhTZBg9QGWreJ821dmW\n\tJnwQ==","X-Gm-Message-State":"AHPjjUguo8MyMnnETzY28gOOq1BXakNLuF7rN9gcsg8EVq2i83vQyKqX\n\trPfmSiwARzRXG+Hv","X-Google-Smtp-Source":"AOwi7QDf+dsdZr8hIpxjKqJVJZeIiKr6NuROVhOBg7gsAqjYegPUCwbgmUdQ1C4OGp9CH0EbHupStA==","X-Received":"by 10.84.247.145 with SMTP id o17mr4159415pll.109.1505269399051; \n\tTue, 12 Sep 2017 19:23:19 -0700 (PDT)","To":"Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,\n\t\"Dr. David Alan Gilbert\" <dgilbert@redhat.com>,\n\tDavid Gibson <david@gibson.dropbear.id.au>","References":"<1505054255-2990-1-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<1505054255-2990-3-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<20170911095059.101e0cfc@bahia.lan> <20170911093032.GA2857@work-vm>\n\t<20170911104854.GB2784@umbus.fritz.box>\n\t<20170912162100.GD2225@work-vm>\n\t<1bb6a27d-89a5-2e70-6976-74ab24430ec4@ilande.co.uk>\n\t<4f0cb74a-ae00-5921-291c-49c9acdb3e02@ilande.co.uk>","From":"Alexey Kardashevskiy <aik@ozlabs.ru>","Message-ID":"<d7dd9adf-4727-aeb5-b8ad-ac8c22c2f4bf@ozlabs.ru>","Date":"Wed, 13 Sep 2017 12:23:13 +1000","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<4f0cb74a-ae00-5921-291c-49c9acdb3e02@ilande.co.uk>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-AU","Content-Transfer-Encoding":"7bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:400e:c05::243","Subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"lvivier@redhat.com, qemu-ppc@nongnu.org, Greg Kurz <groug@kaod.org>,\n\tqemu-devel@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1767593,"web_url":"http://patchwork.ozlabs.org/comment/1767593/","msgid":"<20170913060203.GG7550@umbus.fritz.box>","list_archive_url":null,"date":"2017-09-13T06:02:03","subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","submitter":{"id":47,"url":"http://patchwork.ozlabs.org/api/people/47/","name":"David Gibson","email":"david@gibson.dropbear.id.au"},"content":"On Wed, Sep 13, 2017 at 12:23:13PM +1000, Alexey Kardashevskiy wrote:\n> On 13/09/17 02:46, Mark Cave-Ayland wrote:\n> > On 12/09/17 17:41, Mark Cave-Ayland wrote:\n> > \n> >> The commit message mentions that prior to the conversion some CPU state\n> >> was missing but it doesn't mention anything about dropping existing\n> >> fields as part of the conversion process so I suspect that this was an\n> >> accidental side-effect.\n> > \n> > Actually I've clicked send a little too early here since re-reading the\n> > last paragraph of a90db15 I can see the inference here: \"Exactly what\n> > needs to be saved in what configurations has been more carefully\n> > examined, too\".\n> > \n> > Alexey - do you recall from your analysis why these fields were no\n> > longer deemed necessary, and how your TCG tests were configured?\n> \n> I most certainly did not do analysis (my bad. sorry) - I took the patch\n> from David as he left the team, fixed to compile and pushed away. I am also\n> very suspicions we did not try migrating TCG or anything but pseries. My\n> guest that things did not break (if they did not which I am not sure about,\n> for the TCG case) because the interrupt controller (XICS) or the\n> pseries-guest took care of resending an interrupt which does not seem to be\n> the case for mac99.\n\nRight, that's probably true.  The main point, though, is that these\nfields were dropped a *long* time ago, when migration was barely\nworking to begin with.  In particular I'm pretty sure most of the\nnon-pseries platforms were already pretty broken for migration\n(amongst other things).\n\nPolishing the mac platforms up to working again, including migration,\nis a reasonable goal.  But it can't be at the expense of pseries,\nwhich is already working, used in production, and much better tested\nthan mac99 or g3beige ever were.","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=gibson.dropbear.id.au\n\theader.i=@gibson.dropbear.id.au header.b=\"RKRIcfNL\"; \n\tdkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xsWcM39xmz9t2W\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 16:15:30 +1000 (AEST)","from localhost ([::1]:40330 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1ds0xL-0001sx-Ni\n\tfor incoming@patchwork.ozlabs.org; Wed, 13 Sep 2017 02:15:27 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:46349)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1ds0wv-0001sP-4s\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 02:15:02 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1ds0wt-0007GR-PN\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 02:15:01 -0400","from ozlabs.org ([2401:3900:2:1::2]:49301)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <dgibson@ozlabs.org>)\n\tid 1ds0wt-0007ET-D3; Wed, 13 Sep 2017 02:14:59 -0400","by ozlabs.org (Postfix, from userid 1007)\n\tid 3xsWbg2Gw3z9t1G; Wed, 13 Sep 2017 16:14:53 +1000 (AEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n\td=gibson.dropbear.id.au; s=201602; t=1505283295;\n\tbh=DlMS834hFJ9uTZrtN3bxy4gg5MLV/WuWOjaALc5bU1c=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=RKRIcfNLTYMGTGDLx51RQh0HGo2auhpZ9x3Ftg3r5Ff+BeKhbZm1UJx/8PFU5Yt4Z\n\tni+aC3g2ArF6ZRSpaX5RKNJVyfhL1MoeohteXIDC622gvnE9oP5Y+KfIOhXqr7EABZ\n\tBZqfga9cxP4CbyVMU7hbWC/Y7L/AcG4OSl9tcp20=","Date":"Wed, 13 Sep 2017 16:02:03 +1000","From":"David Gibson <david@gibson.dropbear.id.au>","To":"Alexey Kardashevskiy <aik@ozlabs.ru>","Message-ID":"<20170913060203.GG7550@umbus.fritz.box>","References":"<1505054255-2990-1-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<1505054255-2990-3-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<20170911095059.101e0cfc@bahia.lan> <20170911093032.GA2857@work-vm>\n\t<20170911104854.GB2784@umbus.fritz.box>\n\t<20170912162100.GD2225@work-vm>\n\t<1bb6a27d-89a5-2e70-6976-74ab24430ec4@ilande.co.uk>\n\t<4f0cb74a-ae00-5921-291c-49c9acdb3e02@ilande.co.uk>\n\t<d7dd9adf-4727-aeb5-b8ad-ac8c22c2f4bf@ozlabs.ru>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"sClP8c1IaQxyux9v\"","Content-Disposition":"inline","In-Reply-To":"<d7dd9adf-4727-aeb5-b8ad-ac8c22c2f4bf@ozlabs.ru>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2401:3900:2:1::2","Subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"lvivier@redhat.com, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,\n\tqemu-devel@nongnu.org, \"Dr. David Alan Gilbert\" <dgilbert@redhat.com>,\n\tGreg Kurz <groug@kaod.org>, qemu-ppc@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1767627,"web_url":"http://patchwork.ozlabs.org/comment/1767627/","msgid":"<20170913070338.GH7550@umbus.fritz.box>","list_archive_url":null,"date":"2017-09-13T07:03:38","subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","submitter":{"id":47,"url":"http://patchwork.ozlabs.org/api/people/47/","name":"David Gibson","email":"david@gibson.dropbear.id.au"},"content":"On Mon, Sep 11, 2017 at 06:19:54PM +0100, Dr. David Alan Gilbert wrote:\n> * Mark Cave-Ayland (mark.cave-ayland@ilande.co.uk) wrote:\n> > On 11/09/17 11:48, David Gibson wrote:\n> > \n> > > On Mon, Sep 11, 2017 at 10:30:33AM +0100, Dr. David Alan Gilbert wrote:\n> > >> * Greg Kurz (groug@kaod.org) wrote:\n> > >>> On Sun, 10 Sep 2017 15:37:33 +0100\n> > >>> Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> wrote:\n> > >>>\n> > >>>> Commit a90db15 \"target-ppc: Convert ppc cpu savevm to VMStateDescription\"\n> > >>>> appears to drop the internal CPU IRQ state from the migration stream. Whilst\n> > >>>> testing migration on g3beige/mac99 machines, test images would randomly fail to\n> > >>>> resume unless a key was pressed on the VGA console.\n> > >>>>\n> > >>>> Further investigation suggests that internal CPU IRQ state isn't being\n> > >>>> preserved and so interrupts asserted at the time of migration are lost. Adding\n> > >>>> the pending_interrupts and irq_input_state fields back into the migration\n> > >>>> stream appears to fix the problem here during local tests.\n> > >>>>\n> > >>>> As part of this commit we bump the vmstate_ppc version from 5 to 6 to handle\n> > >>>> the additional fields.\n> > >>>>\n> > >>>\n> > >>> And so this unconditionally breaks backward migration... what about adding\n> > >>> a subsection for this ?\n> > >>\n> > >> and wiring it to a flag on the machine type so that older machine types\n> > >> don't send it.\n> > > \n> > > Right, a subsection is certainly necessary to avoid breaking backwards\n> > > migration.\n> > \n> > The suggestion of using the VMSTATE_*_V macros with an increased version\n> > number came from Alexey's original review of the patch many months ago\n> > which is why I did it that way.\n> > \n> > Out of curiosity though, what is the criteria for supporting backwards\n> > migration? Obviously forward migration is supported as-is in this\n> > manner, so what determines if a patch needs to be backwards compatible\n> > and how far?\n> \n> It's a bit fuzzy.  Downstream we do backwards migration between various\n> versions - and those versions are pretty arbitrarily chosen.\n> Generally I prefer if we don't break that upstream either, although\n> it isn't tested much.\n\nRight.  In this case not breaking backwards migration upstream is\nessentially a favour to downstream, since unbreaking it downstream\nonce its broken upstream is a real PITA.\n\n> If it was in code that was specific to your g3beige I wouldn't mind;\n> but for ppc in general then if it breaks the server migration it'll\n> be a pain we'd have to then fix.  Best to keep it working upstream.\n\nRight.\n\n> But it's fairly easy to put new fields in a subsection and tie it\n> to a property;  that makes it easy to switch it on/off in machine\n> types.\n\nIn this case I'm not sure we even need a property - I think we could\nmigrate it only when it's non-zero.  That shold only break it in cases\nwhere actually it would already break.\n\n> > > But apart from that I want to understand better exactly why this is\n> > > necessary.  What's the state that's being lost, and is it really not\n> > > recoverable from anywhere else.\n> > \n> > The test case I have is installing Darwin PPC 6.02 with qemu-system-ppc\n> > TCG and repeatedly pausing, executing \"savevm foo\", then quitting and\n> > continuing with \"-loadvm foo\" during the installation phase. About 1 in\n> > 10 times the installer hangs after the loadvm until I press a key, at\n> > which point it carries on as normal.\n> > \n> > I then proceeded to going backwards through the git history until I\n> > found out that it was the removal of the pending_interrupts,\n> > irq_input_state and access_type fields during the conversion to\n> > VMStateDescription commit a90db15 which seemed to cause the problem.\n> > \n> > > The other thing that concerns me is how we're encoding the\n> > > information.  These are essentially internal fields, not reflecting\n> > > something with an architected encoding - adding those to the migration\n> > > stream is often a bad idea - it inhibits our ability to rework\n> > > internal encodings.\n> > \n> > I'm not sure how this should be managed, however there was a similar\n> > issue with excp_prefix (which was also removed in a90db15) that was\n> > fixed in 2360b6e by calling a helper in cpu_post_load(). I can't easily\n> > see how could work with env.pending_interrupts and env.irq_input_state\n> > though.\n> \n> Without knowing anything about this hardware... generally the migration\n> stream should reflect the real state of the system rather than internal\n> implementation detail, that way if you change the implementation you\n> don't need to fudge the state.  Having said that, there's generally\n> some internal state that's perhaps not immediately obvious from specs\n> until you try and implement it.\n\nRight.  I'm not really sure how to handle this yet.  The CPU irq\nnumbers are pretty much arbitrarily assigned, I don't think much\nthought has gone into them.  And if its going to become part of the\nmigration ABI, some thought needs to be put into it.","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=gibson.dropbear.id.au\n\theader.i=@gibson.dropbear.id.au header.b=\"AD/4ZIWZ\"; \n\tdkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xsYDy13qGz9sNw\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 17:28:49 +1000 (AEST)","from localhost ([::1]:40581 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1ds26I-0005cm-7c\n\tfor incoming@patchwork.ozlabs.org; Wed, 13 Sep 2017 03:28:46 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:57148)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1ds25f-0005c8-P4\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 03:28:09 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1ds25e-0001QN-Bu\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 03:28:07 -0400","from ozlabs.org ([2401:3900:2:1::2]:42911)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <dgibson@ozlabs.org>)\n\tid 1ds25d-0001OO-Gl; Wed, 13 Sep 2017 03:28:06 -0400","by ozlabs.org (Postfix, from userid 1007)\n\tid 3xsYD06nlbz9sPs; Wed, 13 Sep 2017 17:28:00 +1000 (AEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n\td=gibson.dropbear.id.au; s=201602; t=1505287680;\n\tbh=VUsiOHWdz1HcXJ9PPMZlS0OynVda0dzdT7S9KKEcJmU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=AD/4ZIWZc5BjkBZ7Rawj32+Rya4cLxnid9YXu/PPyAsCl2rZRpDBTYddTewIiileM\n\tOYIl+QHKtjSgWyjpNuVlxpmW2SXyCIU50aL1h1dywoeX5W4ytPSRiBu+Zdi/hcG6Wo\n\t96bt/s8C3tKoRrmv6ORaRzfkr4blmp51GdM8SoFo=","Date":"Wed, 13 Sep 2017 17:03:38 +1000","From":"David Gibson <david@gibson.dropbear.id.au>","To":"\"Dr. David Alan Gilbert\" <dgilbert@redhat.com>","Message-ID":"<20170913070338.GH7550@umbus.fritz.box>","References":"<1505054255-2990-1-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<1505054255-2990-3-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<20170911095059.101e0cfc@bahia.lan> <20170911093032.GA2857@work-vm>\n\t<20170911104854.GB2784@umbus.fritz.box>\n\t<cc212d72-1eff-86ae-1e34-fdc1636015e5@ilande.co.uk>\n\t<20170911171953.GE2150@work-vm>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"uAgJxtfIS94j9H4T\"","Content-Disposition":"inline","In-Reply-To":"<20170911171953.GE2150@work-vm>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2401:3900:2:1::2","Subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"lvivier@redhat.com, aik@ozlabs.ru,\n\tMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,\n\tGreg Kurz <groug@kaod.org>, qemu-devel@nongnu.org, qemu-ppc@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1768017,"web_url":"http://patchwork.ozlabs.org/comment/1768017/","msgid":"<760c3889-8561-9bce-e565-ccbcb9eb8cf5@ilande.co.uk>","list_archive_url":null,"date":"2017-09-13T16:44:54","subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","submitter":{"id":12451,"url":"http://patchwork.ozlabs.org/api/people/12451/","name":"Mark Cave-Ayland","email":"mark.cave-ayland@ilande.co.uk"},"content":"On 13/09/17 07:02, David Gibson wrote:\n\n>>> Alexey - do you recall from your analysis why these fields were no\n>>> longer deemed necessary, and how your TCG tests were configured?\n>>\n>> I most certainly did not do analysis (my bad. sorry) - I took the patch\n>> from David as he left the team, fixed to compile and pushed away. I am also\n>> very suspicions we did not try migrating TCG or anything but pseries. My\n>> guest that things did not break (if they did not which I am not sure about,\n>> for the TCG case) because the interrupt controller (XICS) or the\n>> pseries-guest took care of resending an interrupt which does not seem to be\n>> the case for mac99.\n> \n> Right, that's probably true.  The main point, though, is that these\n> fields were dropped a *long* time ago, when migration was barely\n> working to begin with.  In particular I'm pretty sure most of the\n> non-pseries platforms were already pretty broken for migration\n> (amongst other things).\n> \n> Polishing the mac platforms up to working again, including migration,\n> is a reasonable goal.  But it can't be at the expense of pseries,\n> which is already working, used in production, and much better tested\n> than mac99 or g3beige ever were.\n\nOh I completely agree since I'm well aware pseries likely has more users\nthan the Mac machines - my question was directed more about why we\nsupport backwards migration.\n\nI spent several hours yesterday poking my Darwin test case with trying\nthe different combinations of pending_interrupts, irq_input_state and\naccess_type and could easily provoke migration failures unless all 3 of\nthe fields were present so a practical test shows they are still\nrequired for TCG migration. I think ppc_set_irq()'s use of the interrupt\nfields in hw/ppc/ppc.c and the subsequent reference to pending\ninterrupts in target/ppc may explain why I see freezes/hangs until a key\nis pressed in many cases.\n\n\nATB,\n\nMark.","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xsnbW2hJwz9sNV\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Sep 2017 02:45:43 +1000 (AEST)","from localhost ([::1]:43614 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dsAnF-0007n4-HS\n\tfor incoming@patchwork.ozlabs.org; Wed, 13 Sep 2017 12:45:41 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:43970)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <mark.cave-ayland@ilande.co.uk>) id 1dsAms-0007lJ-DK\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 12:45:19 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <mark.cave-ayland@ilande.co.uk>) id 1dsAmr-0004h6-DU\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 12:45:18 -0400","from chuckie.co.uk ([82.165.15.123]:48939\n\thelo=s16892447.onlinehome-server.info)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <mark.cave-ayland@ilande.co.uk>)\n\tid 1dsAmm-0004Tf-Pw; Wed, 13 Sep 2017 12:45:12 -0400","from host109-151-159-252.range109-151.btcentralplus.com\n\t([109.151.159.252] helo=[192.168.1.65])\n\tby s16892447.onlinehome-server.info with esmtpsa\n\t(TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76)\n\t(envelope-from <mark.cave-ayland@ilande.co.uk>)\n\tid 1dsAmh-00082C-Ee; Wed, 13 Sep 2017 17:45:08 +0100"],"To":"David Gibson <david@gibson.dropbear.id.au>,\n\tAlexey Kardashevskiy <aik@ozlabs.ru>","References":"<1505054255-2990-1-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<1505054255-2990-3-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<20170911095059.101e0cfc@bahia.lan> <20170911093032.GA2857@work-vm>\n\t<20170911104854.GB2784@umbus.fritz.box>\n\t<20170912162100.GD2225@work-vm>\n\t<1bb6a27d-89a5-2e70-6976-74ab24430ec4@ilande.co.uk>\n\t<4f0cb74a-ae00-5921-291c-49c9acdb3e02@ilande.co.uk>\n\t<d7dd9adf-4727-aeb5-b8ad-ac8c22c2f4bf@ozlabs.ru>\n\t<20170913060203.GG7550@umbus.fritz.box>","From":"Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>","Message-ID":"<760c3889-8561-9bce-e565-ccbcb9eb8cf5@ilande.co.uk>","Date":"Wed, 13 Sep 2017 17:44:54 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170913060203.GG7550@umbus.fritz.box>","Content-Type":"text/plain; charset=windows-1252","Content-Language":"en-US","Content-Transfer-Encoding":"8bit","X-SA-Exim-Connect-IP":"109.151.159.252","X-SA-Exim-Mail-From":"mark.cave-ayland@ilande.co.uk","X-SA-Exim-Version":"4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000)","X-SA-Exim-Scanned":"Yes (on s16892447.onlinehome-server.info)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 3.x [fuzzy]","X-Received-From":"82.165.15.123","Subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"lvivier@redhat.com, Greg Kurz <groug@kaod.org>, qemu-ppc@nongnu.org,\n\tqemu-devel@nongnu.org, \"Dr. David Alan Gilbert\" <dgilbert@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1768041,"web_url":"http://patchwork.ozlabs.org/comment/1768041/","msgid":"<20170913191309.56bf8fa4@bahia.lan>","list_archive_url":null,"date":"2017-09-13T17:13:09","subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","submitter":{"id":69178,"url":"http://patchwork.ozlabs.org/api/people/69178/","name":"Greg Kurz","email":"groug@kaod.org"},"content":"On Wed, 13 Sep 2017 17:44:54 +0100\nMark Cave-Ayland <mark.cave-ayland@ilande.co.uk> wrote:\n\n> On 13/09/17 07:02, David Gibson wrote:\n> \n> >>> Alexey - do you recall from your analysis why these fields were no\n> >>> longer deemed necessary, and how your TCG tests were configured?  \n> >>\n> >> I most certainly did not do analysis (my bad. sorry) - I took the patch\n> >> from David as he left the team, fixed to compile and pushed away. I am also\n> >> very suspicions we did not try migrating TCG or anything but pseries. My\n> >> guest that things did not break (if they did not which I am not sure about,\n> >> for the TCG case) because the interrupt controller (XICS) or the\n> >> pseries-guest took care of resending an interrupt which does not seem to be\n> >> the case for mac99.  \n> > \n> > Right, that's probably true.  The main point, though, is that these\n> > fields were dropped a *long* time ago, when migration was barely\n> > working to begin with.  In particular I'm pretty sure most of the\n> > non-pseries platforms were already pretty broken for migration\n> > (amongst other things).\n> > \n> > Polishing the mac platforms up to working again, including migration,\n> > is a reasonable goal.  But it can't be at the expense of pseries,\n> > which is already working, used in production, and much better tested\n> > than mac99 or g3beige ever were.  \n> \n> Oh I completely agree since I'm well aware pseries likely has more users\n> than the Mac machines - my question was directed more about why we\n> support backwards migration.\n> \n\nDownstream support backward migration because end users/customers ask for it\nfor maximum flexibility when it comes to move workloads around different systems\nwith different QEMU versions. This is fairly usual in data centers with many\nsystems.\n\nAs others already said, breaking things upstream may turn downstream work\ninto a nightmare (and FWIW, most of the people working on ppc are also\ninvolved in downstream work).\n\nCheers,\n\n--\nGreg\n\n> I spent several hours yesterday poking my Darwin test case with trying\n> the different combinations of pending_interrupts, irq_input_state and\n> access_type and could easily provoke migration failures unless all 3 of\n> the fields were present so a practical test shows they are still\n> required for TCG migration. I think ppc_set_irq()'s use of the interrupt\n> fields in hw/ppc/ppc.c and the subsequent reference to pending\n> interrupts in target/ppc may explain why I see freezes/hangs until a key\n> is pressed in many cases.\n> \n> \n> ATB,\n> \n> Mark.","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xspDc72BGz9sNV\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Sep 2017 03:14:24 +1000 (AEST)","from localhost ([::1]:43741 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dsBF1-0000Wo-4f\n\tfor incoming@patchwork.ozlabs.org; Wed, 13 Sep 2017 13:14:23 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:60451)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <groug@kaod.org>) id 1dsBE7-0008Mg-8r\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 13:13:28 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <groug@kaod.org>) id 1dsBE2-0002d4-Rw\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 13:13:27 -0400","from 8.mo2.mail-out.ovh.net ([188.165.52.147]:38212)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <groug@kaod.org>) id 1dsBE2-0002bn-MY\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 13:13:22 -0400","from player770.ha.ovh.net (b6.ovh.net [213.186.33.56])\n\tby mo2.mail-out.ovh.net (Postfix) with ESMTP id 082E6AB885\n\tfor <qemu-devel@nongnu.org>; Wed, 13 Sep 2017 19:13:20 +0200 (CEST)","from bahia.lan (gar31-1-82-66-74-139.fbx.proxad.net [82.66.74.139])\n\t(Authenticated sender: groug@kaod.org)\n\tby player770.ha.ovh.net (Postfix) with ESMTPSA id ED1B13C0078;\n\tWed, 13 Sep 2017 19:13:10 +0200 (CEST)"],"Date":"Wed, 13 Sep 2017 19:13:09 +0200","From":"Greg Kurz <groug@kaod.org>","To":"Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>","Message-ID":"<20170913191309.56bf8fa4@bahia.lan>","In-Reply-To":"<760c3889-8561-9bce-e565-ccbcb9eb8cf5@ilande.co.uk>","References":"<1505054255-2990-1-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<1505054255-2990-3-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<20170911095059.101e0cfc@bahia.lan> <20170911093032.GA2857@work-vm>\n\t<20170911104854.GB2784@umbus.fritz.box>\n\t<20170912162100.GD2225@work-vm>\n\t<1bb6a27d-89a5-2e70-6976-74ab24430ec4@ilande.co.uk>\n\t<4f0cb74a-ae00-5921-291c-49c9acdb3e02@ilande.co.uk>\n\t<d7dd9adf-4727-aeb5-b8ad-ac8c22c2f4bf@ozlabs.ru>\n\t<20170913060203.GG7550@umbus.fritz.box>\n\t<760c3889-8561-9bce-e565-ccbcb9eb8cf5@ilande.co.uk>","X-Mailer":"Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-redhat-linux-gnu)","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha1;\n\tboundary=\"Sig_/r2DfEmTwgnTsuI+k8=Sllkv\";\n\tprotocol=\"application/pgp-signature\"","X-Ovh-Tracer-Id":"7435442988018211097","X-VR-SPAMSTATE":"OK","X-VR-SPAMSCORE":"-100","X-VR-SPAMCAUSE":"gggruggvucftvghtrhhoucdtuddrfeelledrgeeggdduudegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"188.165.52.147","Subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"lvivier@redhat.com, Alexey Kardashevskiy <aik@ozlabs.ru>,\n\tqemu-devel@nongnu.org, \"Dr. David Alan\n\tGilbert\" <dgilbert@redhat.com>, qemu-ppc@nongnu.org,\n\tDavid Gibson <david@gibson.dropbear.id.au>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1768327,"web_url":"http://patchwork.ozlabs.org/comment/1768327/","msgid":"<20170914033022.GI3972@umbus.fritz.box>","list_archive_url":null,"date":"2017-09-14T03:30:22","subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","submitter":{"id":47,"url":"http://patchwork.ozlabs.org/api/people/47/","name":"David Gibson","email":"david@gibson.dropbear.id.au"},"content":"On Wed, Sep 13, 2017 at 05:44:54PM +0100, Mark Cave-Ayland wrote:\n> On 13/09/17 07:02, David Gibson wrote:\n> \n> >>> Alexey - do you recall from your analysis why these fields were no\n> >>> longer deemed necessary, and how your TCG tests were configured?\n> >>\n> >> I most certainly did not do analysis (my bad. sorry) - I took the patch\n> >> from David as he left the team, fixed to compile and pushed away. I am also\n> >> very suspicions we did not try migrating TCG or anything but pseries. My\n> >> guest that things did not break (if they did not which I am not sure about,\n> >> for the TCG case) because the interrupt controller (XICS) or the\n> >> pseries-guest took care of resending an interrupt which does not seem to be\n> >> the case for mac99.\n> > \n> > Right, that's probably true.  The main point, though, is that these\n> > fields were dropped a *long* time ago, when migration was barely\n> > working to begin with.  In particular I'm pretty sure most of the\n> > non-pseries platforms were already pretty broken for migration\n> > (amongst other things).\n> > \n> > Polishing the mac platforms up to working again, including migration,\n> > is a reasonable goal.  But it can't be at the expense of pseries,\n> > which is already working, used in production, and much better tested\n> > than mac99 or g3beige ever were.\n> \n> Oh I completely agree since I'm well aware pseries likely has more users\n> than the Mac machines - my question was directed more about why we\n> support backwards migration.\n> \n> I spent several hours yesterday poking my Darwin test case with trying\n> the different combinations of pending_interrupts, irq_input_state and\n> access_type and could easily provoke migration failures unless all 3 of\n> the fields were present so a practical test shows they are still\n> required for TCG migration. I think ppc_set_irq()'s use of the interrupt\n> fields in hw/ppc/ppc.c and the subsequent reference to pending\n> interrupts in target/ppc may explain why I see freezes/hangs until a key\n> is pressed in many cases.\n\nOk, I think we need to consider (pending_interrupts and irq_input_state)\nseparately from access_type.  The first two are pretty closely related\nto each other, and I've got at least a rough idea of what the problems\nthere might be.  access_type I'm pretty sure has to be an unrelated\nproblem, and I've got much less of a handle on it.\n\nI suspect we could work around the problems with pending_interrupts\nand irq_input_state by having a post_load hook in the board level\ninterrupt controller to reassert its output irq line based on its\ncurrent state.  I believe the relevant irq inputs to the cpu are\neffectively level triggered, so I think that will be enough.\n\naccess_type I don't have any good ideas for yet.  We really need to\nwork out what the exact race is here that's causing its state to be\nlost harmfully.","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=gibson.dropbear.id.au\n\theader.i=@gibson.dropbear.id.au header.b=\"JVdJpjSN\"; \n\tdkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xt4Tr07dQz9sBZ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Sep 2017 13:56:46 +1000 (AEST)","from localhost ([::1]:45610 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dsLGe-00015p-NZ\n\tfor incoming@patchwork.ozlabs.org; Wed, 13 Sep 2017 23:56:44 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:37308)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1dsLG1-00014l-SI\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 23:56:07 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1dsLFz-0000xj-8B\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 23:56:05 -0400","from ozlabs.org ([103.22.144.67]:49377)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <dgibson@ozlabs.org>)\n\tid 1dsLFy-0000vG-HI; Wed, 13 Sep 2017 23:56:03 -0400","by ozlabs.org (Postfix, from userid 1007)\n\tid 3xt4Sv3nB9z9sPt; Thu, 14 Sep 2017 13:55:59 +1000 (AEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n\td=gibson.dropbear.id.au; s=201602; t=1505361359;\n\tbh=WX8c9RWXMNajmildQuoRpvRMtJx/NjYjju5bdtdKnRw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=JVdJpjSNEqCg4OHpDDz2uWbvNrJHoRbqVqbvv206KiD6em5Er6z/mRiFM7wMqgrxJ\n\tEDyFpendnznj9G/FFHz5kigbjaPGDNTxXFG2e0JdWFL+cxO9n9ZQ4ULmFTqz9zaMMR\n\t1FihqXDG5HKIy5TlAVtnVu0iJNkbnyzHbSxS3QB8=","Date":"Thu, 14 Sep 2017 13:30:22 +1000","From":"David Gibson <david@gibson.dropbear.id.au>","To":"Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>","Message-ID":"<20170914033022.GI3972@umbus.fritz.box>","References":"<1505054255-2990-3-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<20170911095059.101e0cfc@bahia.lan> <20170911093032.GA2857@work-vm>\n\t<20170911104854.GB2784@umbus.fritz.box>\n\t<20170912162100.GD2225@work-vm>\n\t<1bb6a27d-89a5-2e70-6976-74ab24430ec4@ilande.co.uk>\n\t<4f0cb74a-ae00-5921-291c-49c9acdb3e02@ilande.co.uk>\n\t<d7dd9adf-4727-aeb5-b8ad-ac8c22c2f4bf@ozlabs.ru>\n\t<20170913060203.GG7550@umbus.fritz.box>\n\t<760c3889-8561-9bce-e565-ccbcb9eb8cf5@ilande.co.uk>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"Q59ABw34pTSIagmi\"","Content-Disposition":"inline","In-Reply-To":"<760c3889-8561-9bce-e565-ccbcb9eb8cf5@ilande.co.uk>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"103.22.144.67","Subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"lvivier@redhat.com, Alexey Kardashevskiy <aik@ozlabs.ru>,\n\tGreg Kurz <groug@kaod.org>, qemu-devel@nongnu.org, qemu-ppc@nongnu.org,\n\t\"Dr. David Alan Gilbert\" <dgilbert@redhat.com>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1768329,"web_url":"http://patchwork.ozlabs.org/comment/1768329/","msgid":"<20170914034800.GJ3972@umbus.fritz.box>","list_archive_url":null,"date":"2017-09-14T03:48:00","subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","submitter":{"id":47,"url":"http://patchwork.ozlabs.org/api/people/47/","name":"David Gibson","email":"david@gibson.dropbear.id.au"},"content":"On Wed, Sep 13, 2017 at 07:13:09PM +0200, Greg Kurz wrote:\n> On Wed, 13 Sep 2017 17:44:54 +0100\n> Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> wrote:\n> \n> > On 13/09/17 07:02, David Gibson wrote:\n> > \n> > >>> Alexey - do you recall from your analysis why these fields were no\n> > >>> longer deemed necessary, and how your TCG tests were configured?  \n> > >>\n> > >> I most certainly did not do analysis (my bad. sorry) - I took the patch\n> > >> from David as he left the team, fixed to compile and pushed away. I am also\n> > >> very suspicions we did not try migrating TCG or anything but pseries. My\n> > >> guest that things did not break (if they did not which I am not sure about,\n> > >> for the TCG case) because the interrupt controller (XICS) or the\n> > >> pseries-guest took care of resending an interrupt which does not seem to be\n> > >> the case for mac99.  \n> > > \n> > > Right, that's probably true.  The main point, though, is that these\n> > > fields were dropped a *long* time ago, when migration was barely\n> > > working to begin with.  In particular I'm pretty sure most of the\n> > > non-pseries platforms were already pretty broken for migration\n> > > (amongst other things).\n> > > \n> > > Polishing the mac platforms up to working again, including migration,\n> > > is a reasonable goal.  But it can't be at the expense of pseries,\n> > > which is already working, used in production, and much better tested\n> > > than mac99 or g3beige ever were.  \n> > \n> > Oh I completely agree since I'm well aware pseries likely has more users\n> > than the Mac machines - my question was directed more about why we\n> > support backwards migration.\n> > \n> \n> Downstream support backward migration because end users/customers ask for it\n> for maximum flexibility when it comes to move workloads around different systems\n> with different QEMU versions. This is fairly usual in data centers with many\n> systems.\n\nOne specific case where this matters is if you want to update the qemu\nversion on an entire cluster of hosts.  Management layers like\noVirt/RHV allow you to do that without disrupting guests by migrating\nthem off each host, one by one, allowing you to remove it from the\ncluster, update and then reinsert after which guests may be migrated\nonto it again.\n\nBut that process could obviously take a fair while for a big cluster;\ndays or even weeks.   In the meantime you have a cluster with mixed\nqemu versions, and since oVirt/RHV/whatever will also migrate guests\naround the cluster to load balance, that means the possibility of a\nbackwards migration.\n\n> As others already said, breaking things upstream may turn downstream work\n> into a nightmare (and FWIW, most of the people working on ppc are also\n> involved in downstream work).\n\nRight.  And I even used to work as a RHV support tech too :).","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=gibson.dropbear.id.au\n\theader.i=@gibson.dropbear.id.au header.b=\"EEhYR3Nh\"; \n\tdkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xt4Tt3SK2z9sBZ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Sep 2017 13:56:50 +1000 (AEST)","from localhost ([::1]:45611 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dsLGi-00016F-Hl\n\tfor incoming@patchwork.ozlabs.org; Wed, 13 Sep 2017 23:56:48 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:37307)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1dsLG1-00014k-Rp\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 23:56:07 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1dsLFz-0000xp-9P\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 23:56:05 -0400","from ozlabs.org ([103.22.144.67]:51685)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <dgibson@ozlabs.org>)\n\tid 1dsLFy-0000vF-HW; Wed, 13 Sep 2017 23:56:03 -0400","by ozlabs.org (Postfix, from userid 1007)\n\tid 3xt4Sv4zdlz9t0F; Thu, 14 Sep 2017 13:55:59 +1000 (AEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n\td=gibson.dropbear.id.au; s=201602; t=1505361359;\n\tbh=or7pki9FiHL4qnotD4nnGNyFcH/fVsfYudy3Fua7rE8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=EEhYR3NhLfI9oF1LS6po0+xKXw8QbvsVfFE4GFfjjpIG8nYkrqpuMoJpRCsxKNs2F\n\tPJJ1zsOXXpK/RBhzLXBl7AuRnCaUT9evgbbrW87UangazJ2u2xgQs4QD3eFDkTxgD3\n\twrgCVaacTmG1QE6d6yWq4gcuRvvk4EwrB/IM20BY=","Date":"Thu, 14 Sep 2017 13:48:00 +1000","From":"David Gibson <david@gibson.dropbear.id.au>","To":"Greg Kurz <groug@kaod.org>","Message-ID":"<20170914034800.GJ3972@umbus.fritz.box>","References":"<20170911095059.101e0cfc@bahia.lan>\n\t<20170911093032.GA2857@work-vm>\n\t<20170911104854.GB2784@umbus.fritz.box>\n\t<20170912162100.GD2225@work-vm>\n\t<1bb6a27d-89a5-2e70-6976-74ab24430ec4@ilande.co.uk>\n\t<4f0cb74a-ae00-5921-291c-49c9acdb3e02@ilande.co.uk>\n\t<d7dd9adf-4727-aeb5-b8ad-ac8c22c2f4bf@ozlabs.ru>\n\t<20170913060203.GG7550@umbus.fritz.box>\n\t<760c3889-8561-9bce-e565-ccbcb9eb8cf5@ilande.co.uk>\n\t<20170913191309.56bf8fa4@bahia.lan>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"LQAwcd5tHl0Qlnzi\"","Content-Disposition":"inline","In-Reply-To":"<20170913191309.56bf8fa4@bahia.lan>","User-Agent":"Mutt/1.8.3 (2017-05-23)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"103.22.144.67","Subject":"Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/4] ppc: add CPU IRQ state to\n\tPPC VMStateDescription","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"lvivier@redhat.com, Alexey Kardashevskiy <aik@ozlabs.ru>,\n\tMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, qemu-devel@nongnu.org, \n\t\"Dr. David Alan Gilbert\" <dgilbert@redhat.com>, qemu-ppc@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]