[{"id":1766218,"web_url":"http://patchwork.ozlabs.org/comment/1766218/","msgid":"<20170911105729.GC2784@umbus.fritz.box>","list_archive_url":null,"date":"2017-09-11T10:57:29","subject":"Re: [Qemu-devel] [PATCH 3/4] ppc: add CPU access_type into the\n\tmigration stream","submitter":{"id":47,"url":"http://patchwork.ozlabs.org/api/people/47/","name":"David Gibson","email":"david@gibson.dropbear.id.au"},"content":"On Sun, Sep 10, 2017 at 03:37:34PM +0100, Mark Cave-Ayland wrote:\n> This is referenced in cpu_ppc_handle_mmu_fault() and so should be included\n> in the migration stream.\n\nThat is not, on its own, sufficient reason.\n\n> Note: the vmstate_ppc version number has already been bumped by the previous\n> patch in this series.\n> \n> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>\n\nAs with 2/4 it breaks backwards migration.\n\nBut more, I really disklike the idea of migrating this.  It's internal\nstate for one, and it's also essentially transitory state.  Can we\navoid putting it in the otherwise persistent structure at all? Can we\nderive the state from elsewhere?  Can we prevent migration from\noccurring in the small windows where this data is live?\n\n> ---\n>  target/ppc/machine.c |    2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/target/ppc/machine.c b/target/ppc/machine.c\n> index 8fec1a4..10b3c41 100644\n> --- a/target/ppc/machine.c\n> +++ b/target/ppc/machine.c\n> @@ -676,7 +676,7 @@ const VMStateDescription vmstate_ppc_cpu = {\n>  \n>          /* Internal state */\n>          VMSTATE_UINTTL(env.hflags_nmsr, PowerPCCPU),\n> -        /* FIXME: access_type? */\n> +        VMSTATE_UINT8_V(env.access_type, PowerPCCPU, 6),\n>  \n>          /* Interrupt state */\n>          VMSTATE_UINT32_V(env.pending_interrupts, PowerPCCPU, 6),","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=\"oKRU02Y7\"; \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 3xrPzq0M1Fz9s83\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 20:58:31 +1000 (AEST)","from localhost ([::1]:56686 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 1drMQ6-0007nM-Nr\n\tfor incoming@patchwork.ozlabs.org; Mon, 11 Sep 2017 06:58:26 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:39387)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1drMPQ-0007n1-9a\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 06:57:45 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1drMPP-0002HG-CO\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 06:57:44 -0400","from ozlabs.org ([2401:3900:2:1::2]:53597)\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 1drMPO-0002Ef-TG; Mon, 11 Sep 2017 06:57:43 -0400","by ozlabs.org (Postfix, from userid 1007)\n\tid 3xrPyq4hFMz9sNV; 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=ZMHfYK3xWRH2PMxHgfzzuCOXMnC/ZD8kOoeowYLN7xI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=oKRU02Y7BiuWKtmNIcomhdk4WoDbkmfdnbsQQhIO7Ip0PueE3w4hJv7B6zvH5kHqn\n\tAqOjxc9RRBUmm40AtU8uc+vAq3p7NQhn3P4FI8qA8hPnI346E2GaDHygCy8dSl2444\n\tkmt6L90VlJGOT8InnAbRhuSTCz1T2Ux25OcLay6Q=","Date":"Mon, 11 Sep 2017 20:57:29 +1000","From":"David Gibson <david@gibson.dropbear.id.au>","To":"Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>","Message-ID":"<20170911105729.GC2784@umbus.fritz.box>","References":"<1505054255-2990-1-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<1505054255-2990-4-git-send-email-mark.cave-ayland@ilande.co.uk>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"1SQmhf2mF2YjsYvc\"","Content-Disposition":"inline","In-Reply-To":"<1505054255-2990-4-git-send-email-mark.cave-ayland@ilande.co.uk>","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] [PATCH 3/4] ppc: add CPU access_type into the\n\tmigration stream","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","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":1766399,"web_url":"http://patchwork.ozlabs.org/comment/1766399/","msgid":"<1d0c4384-fc32-05bb-7e42-44480f51610f@ilande.co.uk>","list_archive_url":null,"date":"2017-09-11T16:52:10","subject":"Re: [Qemu-devel] [PATCH 3/4] ppc: add CPU access_type into the\n\tmigration stream","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:57, David Gibson wrote:\n\n> On Sun, Sep 10, 2017 at 03:37:34PM +0100, Mark Cave-Ayland wrote:\n>> This is referenced in cpu_ppc_handle_mmu_fault() and so should be included\n>> in the migration stream.\n> \n> That is not, on its own, sufficient reason.\n> \n>> Note: the vmstate_ppc version number has already been bumped by the previous\n>> patch in this series.\n>>\n>> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>\n> \n> As with 2/4 it breaks backwards migration.\n> \n> But more, I really disklike the idea of migrating this.  It's internal\n> state for one, and it's also essentially transitory state.  Can we\n> avoid putting it in the otherwise persistent structure at all? Can we\n> derive the state from elsewhere?  Can we prevent migration from\n> occurring in the small windows where this data is live?\n\nFrom what I can see references to access_type are scattered throughout\nmmu_helper.c although I'm not necessarily familiar enough with PPC to\nknow whether this is something that can be derived elsewhere instead.\nAnd once again it was something that was removed by a90db15.\n\nWhen pausing a VM, does execution stop at the end of the current TB\nrather than immediately? If so, perhaps someone could confirm that\nguarantee is good enough for access_type?\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 3xrYry3WNfz9s81\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 02:53:06 +1000 (AEST)","from localhost ([::1]:59071 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 1drRxI-00020K-IX\n\tfor incoming@patchwork.ozlabs.org; Mon, 11 Sep 2017 12:53:04 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:54384)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <mark.cave-ayland@ilande.co.uk>) id 1drRwg-0001yV-4i\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 12:52:27 -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 1drRwd-0003hR-32\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 12:52:26 -0400","from chuckie.co.uk ([82.165.15.123]:38086\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 1drRwc-0003gf-RZ; Mon, 11 Sep 2017 12:52:23 -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 1drRwa-0003w4-8c; Mon, 11 Sep 2017 17:52:21 +0100"],"To":"David Gibson <david@gibson.dropbear.id.au>","References":"<1505054255-2990-1-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<1505054255-2990-4-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<20170911105729.GC2784@umbus.fritz.box>","From":"Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>","Message-ID":"<1d0c4384-fc32-05bb-7e42-44480f51610f@ilande.co.uk>","Date":"Mon, 11 Sep 2017 17:52:10 +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":"<20170911105729.GC2784@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] [PATCH 3/4] ppc: add CPU access_type into the\n\tmigration stream","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","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":1767628,"web_url":"http://patchwork.ozlabs.org/comment/1767628/","msgid":"<20170913071955.GJ7550@umbus.fritz.box>","list_archive_url":null,"date":"2017-09-13T07:19:55","subject":"Re: [Qemu-devel] [PATCH 3/4] ppc: add CPU access_type into the\n\tmigration stream","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 05:52:10PM +0100, Mark Cave-Ayland wrote:\n> On 11/09/17 11:57, David Gibson wrote:\n> \n> > On Sun, Sep 10, 2017 at 03:37:34PM +0100, Mark Cave-Ayland wrote:\n> >> This is referenced in cpu_ppc_handle_mmu_fault() and so should be included\n> >> in the migration stream.\n> > \n> > That is not, on its own, sufficient reason.\n> > \n> >> Note: the vmstate_ppc version number has already been bumped by the previous\n> >> patch in this series.\n> >>\n> >> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>\n> > \n> > As with 2/4 it breaks backwards migration.\n> > \n> > But more, I really disklike the idea of migrating this.  It's internal\n> > state for one, and it's also essentially transitory state.  Can we\n> > avoid putting it in the otherwise persistent structure at all? Can we\n> > derive the state from elsewhere?  Can we prevent migration from\n> > occurring in the small windows where this data is live?\n> \n> >From what I can see references to access_type are scattered throughout\n> mmu_helper.c although I'm not necessarily familiar enough with PPC to\n> know whether this is something that can be derived elsewhere instead.\n> And once again it was something that was removed by a90db15.\n\nRight, but the migration code prior to a90db15 was a complete mess.\nIt definitely included a number of things it didn't need to and\nshouldn't as well as being missing other things that were needed.\nIt's not a good model.  And although it might have more-or-less worked\nfor certain machines like the ones you're reviving here, it was never\nproperly tested\n\n> When pausing a VM, does execution stop at the end of the current TB\n> rather than immediately? If so, perhaps someone could confirm that\n> guarantee is good enough for access_type?\n\nI'm pretty sure it has to; we'd have to come up out of an individual\nTB in order to get to the main loop where we check the \"please pause\"\nflag.  I'm not sure if that helps us here though - I *think* access\ntype is about carrying information from the point where we trigger an\nexception to the point where we actually start processing the\nexception.\n\nThis code is really ugly and I've never understood it well :(. It's\nalways seemed bogus to me that we have an essentially global variable\nto carry information over that small gap, though.  Unfortunately it's\nunlikely that I'd be able to dive into this and work out if it's\nreally needed any time soon.","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; dkim=pass (1024-bit key;\n\tunprotected) header.d=gibson.dropbear.id.au\n\theader.i=@gibson.dropbear.id.au header.b=\"FJvNhRjv\"; \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 3xsYGH1yjlz9sNw\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 17:29:59 +1000 (AEST)","from localhost ([::1]:40585 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 1ds27R-0006j2-9D\n\tfor incoming@patchwork.ozlabs.org; Wed, 13 Sep 2017 03:29:57 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:57168)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1ds25i-0005cR-D0\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 03:28:12 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1ds25e-0001QS-Bh\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 03:28:10 -0400","from ozlabs.org ([103.22.144.67]:35883)\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-0001OP-GU; Wed, 13 Sep 2017 03:28:06 -0400","by ozlabs.org (Postfix, from userid 1007)\n\tid 3xsYD10VFbz9sNw; Wed, 13 Sep 2017 17:28:01 +1000 (AEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n\td=gibson.dropbear.id.au; s=201602; t=1505287681;\n\tbh=6Ssg9GdFEATy7oC74v5ZfGtU/aHE+8aMEWvTDJhy8KU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=FJvNhRjvc7f5v+0sm1hU5i17isdEyiUtoThcVu8swfKCfluChlIGl3mZ1d0u6JExz\n\t419+OL44pER2cket7KWAfhIfWJL+bO+4h8CBrXszTL8ICxz2e490bs6JEsPHrYg65S\n\tLiSSZrqrY+x8lLm+k0eMNy4cJ9lQsC4dIAmcADwA=","Date":"Wed, 13 Sep 2017 17:19:55 +1000","From":"David Gibson <david@gibson.dropbear.id.au>","To":"Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>","Message-ID":"<20170913071955.GJ7550@umbus.fritz.box>","References":"<1505054255-2990-1-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<1505054255-2990-4-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<20170911105729.GC2784@umbus.fritz.box>\n\t<1d0c4384-fc32-05bb-7e42-44480f51610f@ilande.co.uk>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"zOcTNEe3AzgCmdo9\"","Content-Disposition":"inline","In-Reply-To":"<1d0c4384-fc32-05bb-7e42-44480f51610f@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] [PATCH 3/4] ppc: add CPU access_type into the\n\tmigration stream","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","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":1768042,"web_url":"http://patchwork.ozlabs.org/comment/1768042/","msgid":"<03166ac2-6209-9301-16b5-244744d3ebd5@ilande.co.uk>","list_archive_url":null,"date":"2017-09-13T17:17:21","subject":"Re: [Qemu-devel] [PATCH 3/4] ppc: add CPU access_type into the\n\tmigration stream","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 08:19, David Gibson wrote:\n\n>> When pausing a VM, does execution stop at the end of the current TB\n>> rather than immediately? If so, perhaps someone could confirm that\n>> guarantee is good enough for access_type?\n> \n> I'm pretty sure it has to; we'd have to come up out of an individual\n> TB in order to get to the main loop where we check the \"please pause\"\n> flag.  I'm not sure if that helps us here though - I *think* access\n> type is about carrying information from the point where we trigger an\n> exception to the point where we actually start processing the\n> exception.\n> \n> This code is really ugly and I've never understood it well :(. It's\n> always seemed bogus to me that we have an essentially global variable\n> to carry information over that small gap, though.  Unfortunately it's\n> unlikely that I'd be able to dive into this and work out if it's\n> really needed any time soon.\n\nFrom my testing yesterday it does appear to be required for TCG (or\nunless this is exposing another bug in the Mac migration) so I can check\nit works here and then maybe someone else confirm it works on KVM?\n\nA couple of things I've noticed: the heathrow VMStateDescription looks\ngood, however I can see that the OpenPIC timers won't likely migrate\ncorrectly without adding a few more fields - that's easy to fix.\n\nAnother thing is that if we're changing the migration stream for Mac\nmodels Ben has some OpenPIC and other related changes in his wip queue\nthat it might make sense to put those in first before properly fixing\nthe Mac machine migration.\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 3xspL23M09z9sBW\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Sep 2017 03:19:05 +1000 (AEST)","from localhost ([::1]:43757 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 1dsBJX-0002Eb-0d\n\tfor incoming@patchwork.ozlabs.org; Wed, 13 Sep 2017 13:19:03 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:33932)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <mark.cave-ayland@ilande.co.uk>) id 1dsBI8-0001VZ-9h\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 13:17:37 -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 1dsBI4-0006eD-50\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 13:17:36 -0400","from chuckie.co.uk ([82.165.15.123]:49061\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 1dsBI3-0006cn-V0; Wed, 13 Sep 2017 13:17:32 -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 1dsBI3-00089Z-Il; Wed, 13 Sep 2017 18:17:32 +0100"],"To":"David Gibson <david@gibson.dropbear.id.au>","References":"<1505054255-2990-1-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<1505054255-2990-4-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<20170911105729.GC2784@umbus.fritz.box>\n\t<1d0c4384-fc32-05bb-7e42-44480f51610f@ilande.co.uk>\n\t<20170913071955.GJ7550@umbus.fritz.box>","From":"Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>","Message-ID":"<03166ac2-6209-9301-16b5-244744d3ebd5@ilande.co.uk>","Date":"Wed, 13 Sep 2017 18:17: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":"<20170913071955.GJ7550@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] [PATCH 3/4] ppc: add CPU access_type into the\n\tmigration stream","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","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":1768328,"web_url":"http://patchwork.ozlabs.org/comment/1768328/","msgid":"<20170914035442.GL3972@umbus.fritz.box>","list_archive_url":null,"date":"2017-09-14T03:54:42","subject":"Re: [Qemu-devel] [PATCH 3/4] ppc: add CPU access_type into the\n\tmigration stream","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 06:17:21PM +0100, Mark Cave-Ayland wrote:\n> On 13/09/17 08:19, David Gibson wrote:\n> \n> >> When pausing a VM, does execution stop at the end of the current TB\n> >> rather than immediately? If so, perhaps someone could confirm that\n> >> guarantee is good enough for access_type?\n> > \n> > I'm pretty sure it has to; we'd have to come up out of an individual\n> > TB in order to get to the main loop where we check the \"please pause\"\n> > flag.  I'm not sure if that helps us here though - I *think* access\n> > type is about carrying information from the point where we trigger an\n> > exception to the point where we actually start processing the\n> > exception.\n> > \n> > This code is really ugly and I've never understood it well :(. It's\n> > always seemed bogus to me that we have an essentially global variable\n> > to carry information over that small gap, though.  Unfortunately it's\n> > unlikely that I'd be able to dive into this and work out if it's\n> > really needed any time soon.\n> \n> >From my testing yesterday it does appear to be required for TCG (or\n> unless this is exposing another bug in the Mac migration) so I can check\n> it works here and then maybe someone else confirm it works on KVM?\n> \n> A couple of things I've noticed: the heathrow VMStateDescription looks\n> good, however I can see that the OpenPIC timers won't likely migrate\n> correctly without adding a few more fields - that's easy to fix.\n\nRight.  And since OpenPIC isn't used on any platforms that have real\nproduction use in the wild, it's fine to bump the migration stream\nversion for it.\n\n> Another thing is that if we're changing the migration stream for Mac\n> models Ben has some OpenPIC and other related changes in his wip queue\n> that it might make sense to put those in first before properly fixing\n> the Mac machine migration.\n\nThat would have something to be said for it.\n\nIt's probably not essential, though, since I don't consider the\nnon-pseries platforms at this stage sufficiently mature that we\nguarantee a stable migration stream format.","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; dkim=pass (1024-bit key;\n\tunprotected) header.d=gibson.dropbear.id.au\n\theader.i=@gibson.dropbear.id.au header.b=\"JQbHEQWc\"; \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 3xt4Tr07fLz9sPt\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Sep 2017 13:56:46 +1000 (AEST)","from localhost ([::1]:45609 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 1dsLGd-000154-29\n\tfor incoming@patchwork.ozlabs.org; Wed, 13 Sep 2017 23:56:43 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:37277)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1dsLG0-00014a-CN\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 23:56:05 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1dsLFz-0000xn-8z\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 23:56:04 -0400","from ozlabs.org ([2401:3900:2:1::2]:53119)\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-0000vD-HT; Wed, 13 Sep 2017 23:56:03 -0400","by ozlabs.org (Postfix, from userid 1007)\n\tid 3xt4Sv5SRvz9sRm; 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=3eGvKhdqL40dObUaQvvkMcfPJMK4/BU0rOqXsEpQOvk=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=JQbHEQWcag3l3thgRQ/5Ln42Nbkd2hS3whlvkhFNHpZRK0jk3fqzMZvVm3f9CiX8G\n\tcwBl4HYnKUATn7YaHooRZGQO/f7juWiKg68Ccxy5U8FGPPGjAds981fjh3Pq5q9tPK\n\tYTihPLmvbbktLtCpPzN1k7XhkSUJ2mfnpc4ou3gg=","Date":"Thu, 14 Sep 2017 13:54:42 +1000","From":"David Gibson <david@gibson.dropbear.id.au>","To":"Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>","Message-ID":"<20170914035442.GL3972@umbus.fritz.box>","References":"<1505054255-2990-1-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<1505054255-2990-4-git-send-email-mark.cave-ayland@ilande.co.uk>\n\t<20170911105729.GC2784@umbus.fritz.box>\n\t<1d0c4384-fc32-05bb-7e42-44480f51610f@ilande.co.uk>\n\t<20170913071955.GJ7550@umbus.fritz.box>\n\t<03166ac2-6209-9301-16b5-244744d3ebd5@ilande.co.uk>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"HLsZ5Z1opAQvdr2J\"","Content-Disposition":"inline","In-Reply-To":"<03166ac2-6209-9301-16b5-244744d3ebd5@ilande.co.uk>","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] [PATCH 3/4] ppc: add CPU access_type into the\n\tmigration stream","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","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>"}}]