From patchwork Wed Jun 14 06:44:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suraj Jitindar Singh X-Patchwork-Id: 9785527 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3FD31602D9 for ; Wed, 14 Jun 2017 06:45:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1AE9028517 for ; Wed, 14 Jun 2017 06:45:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0CB1728575; Wed, 14 Jun 2017 06:45:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CA5BB28517 for ; Wed, 14 Jun 2017 06:45:47 +0000 (UTC) Received: from localhost ([::1]:46746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dL23m-0006rD-Dg for patchwork-qemu-devel@patchwork.kernel.org; Wed, 14 Jun 2017 02:45:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dL23C-0006or-JW for qemu-devel@nongnu.org; Wed, 14 Jun 2017 02:45:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dL23B-0005Vj-T0 for qemu-devel@nongnu.org; Wed, 14 Jun 2017 02:45:10 -0400 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:33446) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dL235-0005S0-SJ; Wed, 14 Jun 2017 02:45:03 -0400 Received: by mail-pf0-x241.google.com with SMTP id w12so15282669pfk.0; Tue, 13 Jun 2017 23:45:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=nzwEzasfETFYWp9LRqEYq557GgFdQpeRsTLpKiHHBYE=; b=lvR1vitey+yV5XwTzXeyo8pgohZtwjtxXamnVSJnfkSKN54ZvkGV4LcU4RzYlJ48pj e5eYs5pPwjH5fz1GNC7dkyPPYu+HB+mZE1YqsyPCV6CjzhhtU8eygowDQcoB/A1loCS5 UQIuVoR3ilpjGgfvOm5/hmkwmvw2FObFOBxC7EatadxW78D+r92NvXqit+QKJhCu4oSz 7yiwLqxELRmUgSr+b77eAViM6vwU1quMcIwiID7YU10VdGRvr++KqTfRDKg09p+Ba0G+ 39bn7GvobsxEJ1qy+Uk4suxezE93hKtsX/cylXj5OhxxZt9phRIlbXqyNNmH0ZhgJWm3 qV3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=nzwEzasfETFYWp9LRqEYq557GgFdQpeRsTLpKiHHBYE=; b=ED5hRvoEi/nbA6asWfjuzz5LLDZ0Xce7kz/JlY0JWxtVE9JJkiuUkYjYuvT+ZXyTw4 X9z80D1Zil0ZG2Rk9ZBqNMv1A2uOY+u48S8m8fcyKp64IoyxVTO067IxxiN3LF60gr3t qiyg0kpm1YIlW9gjEWvi2EQRh33WveFAienOd1KTlCLlAf5t6XDpoVHbBCfPs93g2ZSi H/ZmibpU+wk8UdUblTANNggizguAITAbu9qBUwEF1t4q5gAWjGm1awJajPN9qCP3uctR fsVNILlhU+D72vr4CN08Y52BoyJ52HRpEef4IyrSZoGb/HzycaG1S65BBa90pEchuVsD xrwQ== X-Gm-Message-State: AKS2vOzbZxj60SprC67QbyaACiZQ/q/XpQfAdrw3NtTOwfLQN9WPPl14 dzI/IkZBauvypZ5P X-Received: by 10.84.233.204 with SMTP id m12mr3422364pln.273.1497422700887; Tue, 13 Jun 2017 23:45:00 -0700 (PDT) Received: from surajjs1.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id n4sm82107pgt.3.2017.06.13.23.44.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jun 2017 23:45:00 -0700 (PDT) From: Suraj Jitindar Singh To: qemu-ppc@nongnu.org Date: Wed, 14 Jun 2017 16:44:52 +1000 Message-Id: <20170614064452.23167-1-sjitindarsingh@gmail.com> X-Mailer: git-send-email 2.9.4 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::241 Subject: [Qemu-devel] [PATCH] target/ppc: Fix return value in tcg radix mmu fault handler X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: agraf@suse.de, qemu-devel@nongnu.org, Suraj Jitindar Singh , david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The mmu fault handler should return 0 if it was able to successfully handle the fault and a positive value otherwise. Currently the tcg radix mmu fault handler will return 1 after successfully handling a fault in virtual mode. This is incorrect so fix it so that it returns 0 in this case. The handler already correctly returns 0 when a fault was handled in real mode and 1 if an interrupt was generated. Fixes: d5fee0bbe68d ("target/ppc: Implement ISA V3.00 radix page fault handler") Signed-off-by: Suraj Jitindar Singh --- target/ppc/mmu-radix64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/mmu-radix64.c b/target/ppc/mmu-radix64.c index de18c0b..69fde65 100644 --- a/target/ppc/mmu-radix64.c +++ b/target/ppc/mmu-radix64.c @@ -255,5 +255,5 @@ int ppc_radix64_handle_mmu_fault(PowerPCCPU *cpu, vaddr eaddr, int rwx, tlb_set_page(cs, eaddr & TARGET_PAGE_MASK, raddr & TARGET_PAGE_MASK, prot, mmu_idx, 1UL << page_size); - return 1; + return 0; }