qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] cputlb: fix watchpoints handling
@ 2012-05-05 21:44 Max Filippov
  2012-05-12  9:54 ` Blue Swirl
  0 siblings, 1 reply; 2+ messages in thread
From: Max Filippov @ 2012-05-05 21:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Blue Swirl, Max Filippov, Richard Henderson

Cleanup commit e554861766d9ae84dd5720baa4869f4ed711506f have changed
code_address calculation in the tlb_set_page function in case of access
to a page with a watchpoint. This caused QEMU segfault in the xtensa
test_break unit test. Fix it by moving code_address assignment above
memory_region_section_get_iotlb call.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 cputlb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cputlb.c b/cputlb.c
index 7f40a62..0d1e252 100644
--- a/cputlb.c
+++ b/cputlb.c
@@ -272,10 +272,10 @@ void tlb_set_page(CPUArchState *env, target_ulong vaddr,
     } else {
         addend = 0;
     }
-    iotlb = memory_region_section_get_iotlb(env, section, vaddr, paddr, prot,
-                                            &address);
 
     code_address = address;
+    iotlb = memory_region_section_get_iotlb(env, section, vaddr, paddr, prot,
+                                            &address);
 
     index = (vaddr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
     env->iotlb[mmu_idx][index] = iotlb - vaddr;
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-12  9:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-05 21:44 [Qemu-devel] [PATCH] cputlb: fix watchpoints handling Max Filippov
2012-05-12  9:54 ` Blue Swirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).