From c6e422e04d86a18085677e03439f9f0c0f4548a0 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Thu, 13 Jul 2017 16:36:28 +0200 Subject: [PATCH 4/6] target/ppc: Fix return value in tcg radix mmu fault handler RH-Author: Laurent Vivier Message-id: <20170713163630.24848-3-lvivier@redhat.com> Patchwork-id: 75764 O-Subject: [RHEL-ALT-7.4 qemu-kvm PATCH 2/4] target/ppc: Fix return value in tcg radix mmu fault handler Bugzilla: 1470558 RH-Acked-by: David Gibson RH-Acked-by: Thomas Huth RH-Acked-by: Suraj Jitindar Singh From: Suraj Jitindar Singh 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 Signed-off-by: David Gibson (cherry picked from commit 35068bd15eec80844699173b9e7d5ccb09a6bb87) Signed-off-by: Laurent Vivier BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1470558 BREW: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=13654102 Signed-off-by: Miroslav Rezanina --- 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; } -- 1.8.3.1