qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Weird behavior while using the instruction counter


From: Paul Brook
Subject: Re: [Qemu-devel] Weird behavior while using the instruction counter
Date: Thu, 24 Jul 2008 15:02:52 +0100
User-agent: KMail/1.9.9

> > No. You're assuming the IO trap occurs on the last instruction, which not
> > true.  The problem is that cpu_exec_nocache introduces a second TB with
> > the same lookup key(pc+flags). cpu_io_recompile (and possibly other
> > places) assume the currently executing TB is the only tb that matches. It
> > needs to invalidate the original TB (if it exists) as well as the
> > uncached one.
>
> Obviously, you're right. I was testing with blocks of a single
> instruction. What do you think of this:
>
>  if (tb != &tbs[0] && (tb - 1)->pc == tb->pc) {
>         tb_phys_invalidate(tb - 1, -1);
>  }

No. There's no guarantee that the TBs are consecutive.

Paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]