[Top][All Lists]

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

Re: [Qemu-devel] ppc: CPU reset must flush translation buffer

From: Peter Maydell
Subject: Re: [Qemu-devel] ppc: CPU reset must flush translation buffer
Date: Mon, 21 May 2012 08:15:08 +0100

On 21 May 2012 07:16, Alexander Graf <address@hidden> wrote:
> Shouldn't this be true for all CPUs? I remember talking about reset
> with Peter a while ago... but don't remember the conclusions :)

The conclusion we came to is that you only need to tb_flush
in your CPU's reset function if you have some CPU state which
you handle by baking it into translated code and doing a tb_flush
when the state changes. This is relatively rare, most CPU
frontends only use the other options:
 (a) CPU state is constant for life of simulation
 (b) CPU state not baked into code
 (c) CPU state encoded in tb_flags.

In particular, target-ppc doesn't have any uses of tb_flush
at the moment, so either this fix is insufficient (and you need
to also use tb_flush at the point where the relevant state is
changed by whatever helper function) or it's the wrong fix.

If the issue is ROM reloading then the loading code needs to
be fixed (compare the way that the memory region API correctly
handles bits of physical memory being mapped/unmapped/remapped
without the caller needing to do a tb_reset).

-- PMM

reply via email to

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