Re: [Qemu-devel] [PATCH v2 12/17] translate-all: add page_collection assertions

2018-05-10 Thread Emilio G. Cota
On Mon, Apr 23, 2018 at 20:31:15 -0400, Emilio G. Cota wrote: > On Fri, Apr 13, 2018 at 17:42:45 -1000, Richard Henderson wrote: > > On 04/05/2018 04:13 PM, Emilio G. Cota wrote: > > > +static __thread bool page_collection_locked; > > > + > > > +void assert_page_collection_locked(bool val) > > > +{

Re: [Qemu-devel] [PATCH v2 12/17] translate-all: add page_collection assertions

2018-04-23 Thread Emilio G. Cota
On Fri, Apr 13, 2018 at 17:42:45 -1000, Richard Henderson wrote: > On 04/05/2018 04:13 PM, Emilio G. Cota wrote: > > +static __thread bool page_collection_locked; > > + > > +void assert_page_collection_locked(bool val) > > +{ > > +tcg_debug_assert(page_collection_locked == val); > > +} > > + >

Re: [Qemu-devel] [PATCH v2 12/17] translate-all: add page_collection assertions

2018-04-13 Thread Richard Henderson
On 04/05/2018 04:13 PM, Emilio G. Cota wrote: > +static __thread bool page_collection_locked; > + > +void assert_page_collection_locked(bool val) > +{ > +tcg_debug_assert(page_collection_locked == val); > +} > + > +static inline void set_page_collection_locked(bool val) > +{ > +page_collect

[Qemu-devel] [PATCH v2 12/17] translate-all: add page_collection assertions

2018-04-05 Thread Emilio G. Cota
The appended adds assertions to make sure we do not longjmp with page locks held. Some notes: - user-mode has nothing to check, since page_locks are !user-mode only. - The checks only apply to page collections, since these have relatively complex callers. - Some simple page_lock/unlock callers