[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 26/32] PPC: Fix GDB read on code area for PPC6xx
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 26/32] PPC: Fix GDB read on code area for PPC6xx |
Date: |
Sun, 30 Jun 2013 03:45:03 +0200 |
From: Fabien Chouteau <address@hidden>
On PPC 6xx, data and code have separated TLBs. Until now QEMU was only
looking at data TLBs, which is not good when GDB wants to read code.
This patch adds a second call to get_physical_address() with an
ACCESS_CODE type of access when the first call with ACCESS_INT fails.
Signed-off-by: Fabien Chouteau <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
target-ppc/mmu_helper.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/target-ppc/mmu_helper.c b/target-ppc/mmu_helper.c
index 34330dc..385b67a 100644
--- a/target-ppc/mmu_helper.c
+++ b/target-ppc/mmu_helper.c
@@ -1431,7 +1431,15 @@ hwaddr cpu_get_phys_page_debug(CPUPPCState *env,
target_ulong addr)
}
if (unlikely(get_physical_address(env, &ctx, addr, 0, ACCESS_INT) != 0)) {
- return -1;
+
+ /* Some MMUs have separate TLBs for code and data. If we only try an
+ * ACCESS_INT, we may not be able to read instructions mapped by code
+ * TLBs, so we also try a ACCESS_CODE.
+ */
+ if (unlikely(get_physical_address(env, &ctx, addr, 0,
+ ACCESS_CODE) != 0)) {
+ return -1;
+ }
}
return ctx.raddr & TARGET_PAGE_MASK;
--
1.8.1.4
- [Qemu-devel] [PULL 00/32] ppc patch queue 2013-06-30, Alexander Graf, 2013/06/29
- [Qemu-devel] [PATCH 02/32] KVM: Export kvm_init_irq_routing, Alexander Graf, 2013/06/29
- [Qemu-devel] [PATCH 06/32] KVM: PIC: Only commit irq routing when necessary, Alexander Graf, 2013/06/29
- [Qemu-devel] [PATCH 03/32] KVM: MSI: Swap payload to native endianness, Alexander Graf, 2013/06/29
- [Qemu-devel] [PATCH 16/32] ppc: do not register IABR SPR twice for 603e, Alexander Graf, 2013/06/29
- [Qemu-devel] [PATCH 01/32] KVM: Don't assume that mpstate exists with in-kernel PIC always, Alexander Graf, 2013/06/29
- [Qemu-devel] [PATCH 26/32] PPC: Fix GDB read on code area for PPC6xx,
Alexander Graf <=
- [Qemu-devel] [PATCH 07/32] PPC: Add non-kvm stub file, Alexander Graf, 2013/06/29
- [Qemu-devel] [PATCH 09/32] intc/openpic: QOM'ify, Alexander Graf, 2013/06/29
- [Qemu-devel] [PATCH 12/32] mpc8544_guts: Fix MemoryRegion name, Alexander Graf, 2013/06/29
- [Qemu-devel] [PATCH 10/32] intc/openpic: Convert to QOM realize, Alexander Graf, 2013/06/29
- [Qemu-devel] [PATCH 29/32] PPC: Newworld: Add uninorth token register, Alexander Graf, 2013/06/29
- [Qemu-devel] [PATCH 13/32] mpc8544_guts: QOM'ify, Alexander Graf, 2013/06/29
- [Qemu-devel] [PATCH 11/32] intc/openpic_kvm: Fix QOM and build issues, Alexander Graf, 2013/06/29
- [Qemu-devel] [PATCH 05/32] PPC: e500: factor out mpic init code, Alexander Graf, 2013/06/29
- [Qemu-devel] [PATCH 19/32] pseries: Fix compiler warning (conversion of pointer to integral value), Alexander Graf, 2013/06/29
- [Qemu-devel] [PATCH 14/32] mpc8544_guts: Turn qdev initfn into instance_init, Alexander Graf, 2013/06/29