On Sat, Jul 11, 2015 at 3:23 PM, Paolo Bonzini <pbonz...@redhat.com> wrote: > > > On 11/07/2015 22:46, Peter Crosthwaite wrote: >> include/exec/ram_addr.h: if (tcg_enabled()) { >> include/exec/ram_addr.h: uint8_t clients = tcg_enabled() ? >> DIRTY_CLIENTS_ALL : DIRTY_CLIENTS_NOCODE; >> memory.c: mr->dirty_log_mask = tcg_enabled() ? (1 << DIRTY_MEMORY_CODE) : >> 0; >> memory.c: mr->dirty_log_mask = tcg_enabled() ? (1 << DIRTY_MEMORY_CODE) : >> 0; >> memory.c: mr->dirty_log_mask = tcg_enabled() ? (1 << DIRTY_MEMORY_CODE) : >> 0; >> memory.c: mr->dirty_log_mask = tcg_enabled() ? (1 << DIRTY_MEMORY_CODE) : >> 0; >> >> So what is the correct logic for populating dirty_log_mask and friends >> when there are 0. 1, or more TCG engines? > > I think it should be set if there's at least one TCG engine. >
Thanks. So translate-common.c will implement a global tcg_any_enabled() for these cases, while others will use a virtualised/local tcg_enabled(). > Have you checked BTW it the DIRTY_MEMORY_CODE stuff works with multiple > tcg_ctxs _and_ the same page hosts code for more than one CPU type? > Offhand I have no idea of the answer... > No, I haven't progressed that far. I have a basic test for shared data area but not shared code. Regards, Peter > Paolo >