{"id":811639,"url":"http://patchwork.ozlabs.org/api/patches/811639/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170908143344.12960-3-clg@kaod.org/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170908143344.12960-3-clg@kaod.org>","list_archive_url":null,"date":"2017-09-08T14:33:43","name":"[2/3] spapr: fix CAS-generated reset","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"7b17b37a21d0451fdd47413f8385c4af404fac12","submitter":{"id":68548,"url":"http://patchwork.ozlabs.org/api/people/68548/?format=json","name":"Cédric Le Goater","email":"clg@kaod.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170908143344.12960-3-clg@kaod.org/mbox/","series":[{"id":2230,"url":"http://patchwork.ozlabs.org/api/series/2230/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=2230","date":"2017-09-08T14:33:43","name":"spapr: XIVE and CAS fixes","version":1,"mbox":"http://patchwork.ozlabs.org/series/2230/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/811639/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/811639/checks/","tags":{},"related":[],"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 3xpfz45DTLz9s7G\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  9 Sep 2017 00:36:48 +1000 (AEST)","from localhost ([::1]:45752 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 1dqKOk-0005ep-Pk\n\tfor incoming@patchwork.ozlabs.org; Fri, 08 Sep 2017 10:36:46 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:54619)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <clg@kaod.org>) id 1dqKMY-0004Lw-LP\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 10:34:31 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <clg@kaod.org>) id 1dqKMT-0001Pa-4y\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 10:34:30 -0400","from 7.mo4.mail-out.ovh.net ([178.33.253.54]:52242)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <clg@kaod.org>) id 1dqKMS-0001Ot-Uo\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 10:34:25 -0400","from player159.ha.ovh.net (b9.ovh.net [213.186.33.59])\n\tby mo4.mail-out.ovh.net (Postfix) with ESMTP id 7F2CA958CE\n\tfor <qemu-devel@nongnu.org>; Fri,  8 Sep 2017 16:34:23 +0200 (CEST)","from zorba.kaod.org.com\n\t(i15-les03-th2-31-37-69-229.sfr.lns.abo.bbox.fr [31.37.69.229])\n\t(Authenticated sender: clg@kaod.org)\n\tby player159.ha.ovh.net (Postfix) with ESMTPSA id 2409448009C;\n\tFri,  8 Sep 2017 16:34:18 +0200 (CEST)"],"From":"=?utf-8?q?C=C3=A9dric_Le_Goater?= <clg@kaod.org>","To":"qemu-ppc@nongnu.org,\n\tqemu-devel@nongnu.org","Date":"Fri,  8 Sep 2017 16:33:43 +0200","Message-Id":"<20170908143344.12960-3-clg@kaod.org>","X-Mailer":"git-send-email 2.13.5","In-Reply-To":"<20170908143344.12960-1-clg@kaod.org>","References":"<20170908143344.12960-1-clg@kaod.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","X-Ovh-Tracer-Id":"12281034712901258067","X-VR-SPAMSTATE":"OK","X-VR-SPAMSCORE":"-100","X-VR-SPAMCAUSE":"gggruggvucftvghtrhhoucdtuddrfeelledrfeeggdejkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd","Content-Transfer-Encoding":"quoted-printable","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"178.33.253.54","Subject":"[Qemu-devel] [PATCH 2/3] spapr: fix CAS-generated reset","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":"=?utf-8?q?C=C3=A9dric_Le_Goater?= <clg@kaod.org>,\n\tMichael Roth <mdroth@linux.vnet.ibm.com>, David Gibson\n\t<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>"},"content":"The OV5_MMU_RADIX_300 requires special handling in the CAS negotiation\nprocess. It is cleared from the option vector of the guest before\nevaluating the changes and re-added later. But, when testing for a\npossible CAS reset :\n\n    spapr->cas_reboot = spapr_ovec_diff(ov5_updates,\n                                        ov5_cas_old, spapr->ov5_cas);\n\nthe bit OV5_MMU_RADIX_300 will each time be seen as removed from the\nprevious OV5 set, hence generating a reset loop.\n\nFix this problem by also clearing the same bit in the ov5_cas_old set.\n\nSigned-off-by: Cédric Le Goater <clg@kaod.org>\n---\n hw/ppc/spapr_hcall.c | 7 +++++++\n 1 file changed, 7 insertions(+)","diff":"diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c\nindex 07b3da8dc4cd..92f1e21358b8 100644\n--- a/hw/ppc/spapr_hcall.c\n+++ b/hw/ppc/spapr_hcall.c\n@@ -1575,6 +1575,13 @@ static target_ulong h_client_architecture_support(PowerPCCPU *cpu,\n      * to worry about this for now.\n      */\n     ov5_cas_old = spapr_ovec_clone(spapr->ov5_cas);\n+\n+    /* also clear the radix/hash bit from the current ov5_cas bits to\n+     * be in sync with the newly ov5 bits. Else the radix bit will be\n+     * seen as being removed and this will generate a reset loop\n+     */\n+    spapr_ovec_clear(ov5_cas_old, OV5_MMU_RADIX_300);\n+\n     /* full range of negotiated ov5 capabilities */\n     spapr_ovec_intersect(spapr->ov5_cas, spapr->ov5, ov5_guest);\n     spapr_ovec_cleanup(ov5_guest);\n","prefixes":["2/3"]}