On Thu, May 24, 2012 at 6:34 AM, Jan Kiszka <jan.kis...@web.de> wrote: > From: Jan Kiszka <jan.kis...@siemens.com> > > tb_invalidate_phys_addr has to called with the exact physical address of > the breakpoint we add/remove, not just the page's base address. > Otherwise we easily fail to flush the right TB. > > Regression of 1e7855a558.
Sorry, I fail to see how 1e7855a558 could introduce a regression, it just rearranged the code. Even more, AFAIK cpu_get_phys_page_debug returns complete physical address, not just physical page. Probably it has a misleading name. > Reported-by: TeLeMan <gele...@gmail.com> > Signed-off-by: Jan Kiszka <jan.kis...@siemens.com> > --- > exec.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/exec.c b/exec.c > index a0494c7..efa1345 100644 > --- a/exec.c > +++ b/exec.c > @@ -1492,7 +1492,8 @@ void tb_invalidate_phys_addr(target_phys_addr_t addr) > > static void breakpoint_invalidate(CPUArchState *env, target_ulong pc) > { > - tb_invalidate_phys_addr(cpu_get_phys_page_debug(env, pc)); > + tb_invalidate_phys_addr(cpu_get_phys_page_debug(env, pc) + > + (pc & ~TARGET_PAGE_MASK)); > } > #endif > #endif /* TARGET_HAS_ICE */ > -- > 1.7.3.4 -- Thanks. -- Max