Re: [PATCH v4] page_alloc: assert IRQs are enabled in heap alloc/free

2022-04-26 Thread Stefano Stabellini
On Tue, 26 Apr 2022, Andrew Cooper wrote: > > Can my (personal) GitLab be added as a Developer to the Xen Project > > group? I think this is the intended way for people to run the CI > > pipelines on their own branches. > > It is.  Username? David, let us know if you have any issues with gitlab.

Re: [PATCH v4] page_alloc: assert IRQs are enabled in heap alloc/free

2022-04-26 Thread Julien Grall
On 26/04/2022 15:14, Julien Grall wrote: On 26/04/2022 15:01, Jan Beulich wrote: On 25.04.2022 15:28, David Vrabel wrote: --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -162,6 +162,13 @@   static char __initdata opt_badpage[100] = "";   string_param("badpage", opt_badpage); +/*

Re: [PATCH v4] page_alloc: assert IRQs are enabled in heap alloc/free

2022-04-26 Thread Andrew Cooper
On 26/04/2022 15:33, David Vrabel wrote: > > > On 26/04/2022 15:14, Julien Grall wrote: >> Hi, >> >> On 26/04/2022 15:01, Jan Beulich wrote: >>> On 25.04.2022 15:28, David Vrabel wrote: --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -162,6 +162,13 @@   static cha

Re: [PATCH v4] page_alloc: assert IRQs are enabled in heap alloc/free

2022-04-26 Thread David Vrabel
On 26/04/2022 15:14, Julien Grall wrote: Hi, On 26/04/2022 15:01, Jan Beulich wrote: On 25.04.2022 15:28, David Vrabel wrote: --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -162,6 +162,13 @@   static char __initdata opt_badpage[100] = "";   string_param("badpage", opt_badpag

Re: [PATCH v4] page_alloc: assert IRQs are enabled in heap alloc/free

2022-04-26 Thread Julien Grall
Hi, On 26/04/2022 15:01, Jan Beulich wrote: On 25.04.2022 15:28, David Vrabel wrote: --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -162,6 +162,13 @@ static char __initdata opt_badpage[100] = ""; string_param("badpage", opt_badpage); +/* + * Heap allocations may need TLB

Re: [PATCH v4] page_alloc: assert IRQs are enabled in heap alloc/free

2022-04-26 Thread Jan Beulich
On 25.04.2022 15:28, David Vrabel wrote: > --- a/xen/common/page_alloc.c > +++ b/xen/common/page_alloc.c > @@ -162,6 +162,13 @@ > static char __initdata opt_badpage[100] = ""; > string_param("badpage", opt_badpage); > > +/* > + * Heap allocations may need TLB flushes which require IRQs to be >

Re: [PATCH v4] page_alloc: assert IRQs are enabled in heap alloc/free

2022-04-26 Thread Jan Beulich
On 25.04.2022 20:32, Julien Grall wrote: > On 25/04/2022 15:13, David Vrabel wrote: >> On 25/04/2022 14:43, Julien Grall wrote: >>> On 25/04/2022 14:37, Jan Beulich wrote: On 25.04.2022 15:34, Julien Grall wrote: > On 25/04/2022 14:28, David Vrabel wrote: >> --- a/xen/common/page_alloc

Re: [PATCH v4] page_alloc: assert IRQs are enabled in heap alloc/free

2022-04-25 Thread Julien Grall
Hi, On 25/04/2022 15:13, David Vrabel wrote: On 25/04/2022 14:43, Julien Grall wrote: Hi Jan, On 25/04/2022 14:37, Jan Beulich wrote: On 25.04.2022 15:34, Julien Grall wrote: On 25/04/2022 14:28, David Vrabel wrote: --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -162,6 +16

Re: [PATCH v4] page_alloc: assert IRQs are enabled in heap alloc/free

2022-04-25 Thread David Vrabel
On 25/04/2022 14:43, Julien Grall wrote: Hi Jan, On 25/04/2022 14:37, Jan Beulich wrote: On 25.04.2022 15:34, Julien Grall wrote: On 25/04/2022 14:28, David Vrabel wrote: --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -162,6 +162,13 @@    static char __initdata opt_badpage[

Re: [PATCH v4] page_alloc: assert IRQs are enabled in heap alloc/free

2022-04-25 Thread Julien Grall
Hi, On 25/04/2022 14:44, Jan Beulich wrote: On 25.04.2022 15:43, Julien Grall wrote: On 25/04/2022 14:37, Jan Beulich wrote: On 25.04.2022 15:34, Julien Grall wrote: On 25/04/2022 14:28, David Vrabel wrote: --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -162,6 +162,13 @@

Re: [PATCH v4] page_alloc: assert IRQs are enabled in heap alloc/free

2022-04-25 Thread Jan Beulich
On 25.04.2022 15:43, Julien Grall wrote: > On 25/04/2022 14:37, Jan Beulich wrote: >> On 25.04.2022 15:34, Julien Grall wrote: >>> On 25/04/2022 14:28, David Vrabel wrote: --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -162,6 +162,13 @@ static char __initdata

Re: [PATCH v4] page_alloc: assert IRQs are enabled in heap alloc/free

2022-04-25 Thread Julien Grall
Hi, On 25/04/2022 14:28, David Vrabel wrote: From: David Vrabel Heap pages can only be safely allocated and freed with interuupts The typo I pointed out in v3 has not been addressed. For reminder, this is: s/interupts/interrupts/ Cheers, -- Julien Grall

Re: [PATCH v4] page_alloc: assert IRQs are enabled in heap alloc/free

2022-04-25 Thread Julien Grall
Hi Jan, On 25/04/2022 14:37, Jan Beulich wrote: On 25.04.2022 15:34, Julien Grall wrote: On 25/04/2022 14:28, David Vrabel wrote: --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -162,6 +162,13 @@ static char __initdata opt_badpage[100] = ""; string_param("badpage", opt_bad

Re: [PATCH v4] page_alloc: assert IRQs are enabled in heap alloc/free

2022-04-25 Thread Jan Beulich
On 25.04.2022 15:34, Julien Grall wrote: > On 25/04/2022 14:28, David Vrabel wrote: >> --- a/xen/common/page_alloc.c >> +++ b/xen/common/page_alloc.c >> @@ -162,6 +162,13 @@ >> static char __initdata opt_badpage[100] = ""; >> string_param("badpage", opt_badpage); >> >> +/* >> + * Heap alloca

Re: [PATCH v4] page_alloc: assert IRQs are enabled in heap alloc/free

2022-04-25 Thread Julien Grall
Hi David, On 25/04/2022 14:28, David Vrabel wrote: From: David Vrabel Heap pages can only be safely allocated and freed with interuupts enabled as they may require a TLB flush which will send IPIs (on x86). Normally spinlock debugging would catch calls from the incorrect context, but not from

Re: [PATCH v4] page_alloc: assert IRQs are enabled in heap alloc/free

2022-04-25 Thread Jan Beulich
On 25.04.2022 15:28, David Vrabel wrote: > From: David Vrabel > > Heap pages can only be safely allocated and freed with interuupts > enabled as they may require a TLB flush which will send IPIs (on x86). > > Normally spinlock debugging would catch calls from the incorrect > context, but not fro

[PATCH v4] page_alloc: assert IRQs are enabled in heap alloc/free

2022-04-25 Thread David Vrabel
From: David Vrabel Heap pages can only be safely allocated and freed with interuupts enabled as they may require a TLB flush which will send IPIs (on x86). Normally spinlock debugging would catch calls from the incorrect context, but not from stop_machine_run() action functions as these are call