Re: [PATCH v2] cpu-exec: simplify jump cache management

2024-01-26 Thread Richard Henderson
On 1/23/24 07:57, Richard Henderson wrote: On 1/23/24 01:34, Paolo Bonzini wrote: Unless I'm missing something egregious, the jmp cache is only every populated with a valid entry by the same thread that reads the cache. Therefore, the contents of any valid entry are always consistent and there

Re: [PATCH v2] cpu-exec: simplify jump cache management

2024-01-24 Thread Paolo Bonzini
On Tue, Jan 23, 2024 at 11:02 PM Alex Bennée wrote: > However I would note that TranslationBlock has the comment: > > * jmp_lock also protects the CF_INVALID cflag; a jump must not be chained > * to a destination TB that has CF_INVALID set. > > which I don't think holds true. It does,

Re: [PATCH v2] cpu-exec: simplify jump cache management

2024-01-23 Thread Alex Bennée
Paolo Bonzini writes: > Unless I'm missing something egregious, the jmp cache is only every > populated with a valid entry by the same thread that reads the cache. > Therefore, the contents of any valid entry are always consistent and > there is no need for any acquire/release magic. > > Indeed

Re: [PATCH v2] cpu-exec: simplify jump cache management

2024-01-22 Thread Richard Henderson
On 1/23/24 01:34, Paolo Bonzini wrote: Unless I'm missing something egregious, the jmp cache is only every populated with a valid entry by the same thread that reads the cache. Therefore, the contents of any valid entry are always consistent and there is no need for any acquire/release magic.

[PATCH v2] cpu-exec: simplify jump cache management

2024-01-22 Thread Paolo Bonzini
Unless I'm missing something egregious, the jmp cache is only every populated with a valid entry by the same thread that reads the cache. Therefore, the contents of any valid entry are always consistent and there is no need for any acquire/release magic. Indeed ->tb has to be accessed with