{"id":811523,"url":"http://patchwork.ozlabs.org/api/patches/811523/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170908103558.31632-18-david@gibson.dropbear.id.au/","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":"<20170908103558.31632-18-david@gibson.dropbear.id.au>","list_archive_url":null,"date":"2017-09-08T10:35:35","name":"[PULL,17/40] booke206: fix booke206_tlbnps for mav 2.0","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"00bb9df68351c396e9c21d8e480e9e7bbad01ea6","submitter":{"id":47,"url":"http://patchwork.ozlabs.org/api/people/47/?format=json","name":"David Gibson","email":"david@gibson.dropbear.id.au"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170908103558.31632-18-david@gibson.dropbear.id.au/mbox/","series":[{"id":2179,"url":"http://patchwork.ozlabs.org/api/series/2179/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=2179","date":"2017-09-08T10:35:20","name":"[PULL,01/40] hw/ppc/spapr_drc.c: change spapr_drc_needed to use drc->dev","version":1,"mbox":"http://patchwork.ozlabs.org/series/2179/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/811523/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/811523/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>)","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=\"efTZlgNB\"; \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 3xpZ6r2m8lz9s7G\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  8 Sep 2017 20:58:12 +1000 (AEST)","from localhost ([::1]:44551 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 1dqGzC-0004Pd-Cx\n\tfor incoming@patchwork.ozlabs.org; Fri, 08 Sep 2017 06:58:10 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:58676)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1dqGe5-00028x-KL\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 06:36:29 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <dgibson@ozlabs.org>) id 1dqGe0-0003Ei-OO\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 06:36:21 -0400","from ozlabs.org ([103.22.144.67]:38991)\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 1dqGe0-0003By-DL; Fri, 08 Sep 2017 06:36:16 -0400","by ozlabs.org (Postfix, from userid 1007)\n\tid 3xpYdK0HxGz9t2h; Fri,  8 Sep 2017 20:36:04 +1000 (AEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n\td=gibson.dropbear.id.au; s=201602; t=1504866965;\n\tbh=Svz2enJDyQrMdyTk5MAZKl7aHgMD6Q2RWhvCq8zlK5Y=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=efTZlgNBeNVBgBp4eJuQBqRszKFD/mTDofdNQfR42/asX9oUUSrX5LMh//RJh0xEP\n\tIKKqZ1BWIIpXOl9zyaHC3XKuZrrU6LObtlaLrlRyzheSyUTYWrU5+86SnTHA5ded58\n\tYeaP5V5e42gH0f39lwq7FL9UjcqpJqzVxOgoawRk=","From":"David Gibson <david@gibson.dropbear.id.au>","To":"peter.maydell@linaro.org","Date":"Fri,  8 Sep 2017 20:35:35 +1000","Message-Id":"<20170908103558.31632-18-david@gibson.dropbear.id.au>","X-Mailer":"git-send-email 2.13.5","In-Reply-To":"<20170908103558.31632-1-david@gibson.dropbear.id.au>","References":"<20170908103558.31632-1-david@gibson.dropbear.id.au>","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":"[Qemu-devel] [PULL 17/40] booke206: fix booke206_tlbnps for mav 2.0","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":"qemu-devel@nongnu.org, aik@ozlabs.ru, agraf@suse.de,\n\tmdroth@linux.vnet.ibm.com,\n\tKONRAD Frederic <frederic.konrad@adacore.com>, \n\tqemu-ppc@nongnu.org, imammedo@redhat.com, sam.bobroff@au1.ibm.com,\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>"},"content":"From: KONRAD Frederic <frederic.konrad@adacore.com>\n\nThis fixes booke206_tlbnps for MAV 2.0 by checking the MMUCFG register and\nreturn directly the right tlbnps instead of computing it from non existing\nfield.\n\nSigned-off-by: KONRAD Frederic <frederic.konrad@adacore.com>\nSigned-off-by: David Gibson <david@gibson.dropbear.id.au>\n---\n target/ppc/cpu.h | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)","diff":"diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h\nindex cf4ded7b8e..21f0ddd056 100644\n--- a/target/ppc/cpu.h\n+++ b/target/ppc/cpu.h\n@@ -2473,10 +2473,10 @@ static inline ppcmas_tlb_t *booke206_get_tlbm(CPUPPCState *env, const int tlbn,\n /* returns bitmap of supported page sizes for a given TLB */\n static inline uint32_t booke206_tlbnps(CPUPPCState *env, const int tlbn)\n {\n-    bool mav2 = false;\n     uint32_t ret = 0;\n \n-    if (mav2) {\n+    if ((env->spr[SPR_MMUCFG] & MMUCFG_MAVN) == MMUCFG_MAVN_V2) {\n+        /* MAV2 */\n         ret = env->spr[SPR_BOOKE_TLB0PS + tlbn];\n     } else {\n         uint32_t tlbncfg = env->spr[SPR_BOOKE_TLB0CFG + tlbn];\n","prefixes":["PULL","17/40"]}