Commit c2f07f81a2d52d9d5243ead61d93e875487acf70

Authored by pbrook
1 parent af5db58e

Fix breakpoint TLB invalidation.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1799 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 12 additions and 3 deletions
... ... @@ -1003,10 +1003,19 @@ static void tb_reset_jump_recursive(TranslationBlock *tb)
1003 1003 #if defined(TARGET_HAS_ICE)
1004 1004 static void breakpoint_invalidate(CPUState *env, target_ulong pc)
1005 1005 {
1006   - target_ulong phys_addr;
  1006 + target_ulong addr, pd;
  1007 + ram_addr_t ram_addr;
  1008 + PhysPageDesc *p;
1007 1009  
1008   - phys_addr = cpu_get_phys_page_debug(env, pc);
1009   - tb_invalidate_phys_page_range(phys_addr, phys_addr + 1, 0);
  1010 + addr = cpu_get_phys_page_debug(env, pc);
  1011 + p = phys_page_find(addr >> TARGET_PAGE_BITS);
  1012 + if (!p) {
  1013 + pd = IO_MEM_UNASSIGNED;
  1014 + } else {
  1015 + pd = p->phys_offset;
  1016 + }
  1017 + ram_addr = (pd & TARGET_PAGE_MASK) | (pc & ~TARGET_PAGE_MASK);
  1018 + tb_invalidate_ram_page_range(ram_addr, ram_addr + 1, 0);
1010 1019 }
1011 1020 #endif
1012 1021  
... ...