On 21 May 2012 07:16, Alexander Graf <ag...@suse.de> 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