Re: [Xen-devel] [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required

2019-03-08 Thread Jan Beulich
>>> On 08.03.19 at 16:36, wrote: > Jan Beulich writes ("Re: [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as > required"): >> Ian Jackson 03/07/19 3:44 PM >>> >> >Jan Beulich writes ("Re: [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as >> >required"): >> >> I'd like to note though that in the firs

Re: [Xen-devel] [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required

2019-03-08 Thread Jan Beulich
>>> On 08.03.19 at 16:43, wrote: > Stefano Stabellini writes ("[PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as > required"): >> free_xenheap_pages(p, PERCPU_ORDER); > > JOOI, why does free_xenheap_pages not take a void* ? It does. It's the const that gets in the way here, not the char. And

Re: [Xen-devel] [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required

2019-03-08 Thread Ian Jackson
Stefano Stabellini writes ("[PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required"): > Use DECLARE_BOUNDS and the two static inline functions that come with it > for comparisons and subtractions of: > > __2M_rwdata_start, __2M_rwdata_end, __end_vpci_array, > __start_vpci_array, _stextentry, _et

Re: [Xen-devel] [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required

2019-03-08 Thread Ian Jackson
Jan Beulich writes ("Re: [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required"): > Ian Jackson 03/07/19 3:44 PM >>> > >Jan Beulich writes ("Re: [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as > >required"): > >> I'd like to note though that in the first two cases we don't alter the > >> declar

Re: [Xen-devel] [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required

2019-03-08 Thread Ian Jackson
Jan Beulich writes ("Re: [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required"): > Ian Jackson 03/07/19 3:02 PM > >Jan, it is quite unfortunate that you are replying to Stefano to > >disagree with things that Stefano did because I suggested them, rather > >than replying to my patch comments.

Re: [Xen-devel] [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required

2019-03-08 Thread Juergen Gross
On 08/03/2019 09:46, Jan Beulich wrote: Ian Jackson 03/07/19 3:02 PM >>> >> Stefano Stabellini writes ("Re: [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS >> as required"): >>> On Wed, 6 Mar 2019, Jan Beulich wrote: Is the line wrapping really needed here? >>> >>> It would end at 80 charac

Re: [Xen-devel] [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required

2019-03-08 Thread Jan Beulich
>>> Ian Jackson 03/07/19 3:02 PM >>> >Stefano Stabellini writes ("Re: [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as >required"): >> On Wed, 6 Mar 2019, Jan Beulich wrote: >> > Is the line wrapping really needed here? >> >> It would end at 80 characters exactly otherwise. I am happy to do as you

Re: [Xen-devel] [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required

2019-03-08 Thread Jan Beulich
>>> Ian Jackson 03/07/19 3:44 PM >>> >Jan Beulich writes ("Re: [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as >required"): >> I'd like to note though that in the first two cases we don't alter the >> declared object anyway, but instead a derived one; the declaration >> should not use const for ot

Re: [Xen-devel] [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required

2019-03-07 Thread Ian Jackson
Jan Beulich writes ("Re: [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required"): > I'd like to note though that in the first two cases we don't alter the > declared object anyway, but instead a derived one; the declaration > should not use const for other reasons though. And the 3rd case is > f

Re: [Xen-devel] [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required

2019-03-07 Thread George Dunlap
On 3/7/19 2:02 PM, Ian Jackson wrote: > Stefano Stabellini writes ("Re: [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS > as required"): >> On Wed, 6 Mar 2019, Jan Beulich wrote: >>> Is the line wrapping really needed here? >> >> It would end at 80 characters exactly otherwise. I am happy to do as you

Re: [Xen-devel] [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required

2019-03-07 Thread Ian Jackson
Stefano Stabellini writes ("Re: [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required"): > On Wed, 6 Mar 2019, Jan Beulich wrote: > > Is the line wrapping really needed here? > > It would end at 80 characters exactly otherwise. I am happy to do as you > prefer. Certainly I prefer lines to end

Re: [Xen-devel] [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required

2019-03-07 Thread Ian Jackson
Stefano Stabellini writes ("Re: [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required"): > This is problematic. We have also the following instances in this series > to deal with: > > xen/arch/arm/percpu.c:_free_percpu_area > char *p = (char *)__per_cpu_start + __per_cpu_offset[cpu]; > > xen

Re: [Xen-devel] [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required

2019-03-07 Thread Jan Beulich
>>> On 06.03.19 at 22:38, wrote: > On Wed, 6 Mar 2019, Jan Beulich wrote: >> >>> On 05.03.19 at 23:38, wrote: >> > @@ -600,7 +602,9 @@ static void noinline init_done(void) >> > unregister_init_virtual_region(); >> > >> > /* Zero the .init code and data. */ >> > -for ( va = __init_

Re: [Xen-devel] [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required

2019-03-07 Thread Jan Beulich
>>> On 06.03.19 at 22:05, wrote: > On Wed, 6 Mar 2019, Jan Beulich wrote: >> >>> On 05.03.19 at 23:38, wrote: >> > @@ -600,7 +602,9 @@ static void noinline init_done(void) >> > unregister_init_virtual_region(); >> > >> > /* Zero the .init code and data. */ >> > -for ( va = __init_

Re: [Xen-devel] [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required

2019-03-06 Thread Stefano Stabellini
On Wed, 6 Mar 2019, Jan Beulich wrote: > >>> On 05.03.19 at 23:38, wrote: > > @@ -600,7 +602,9 @@ static void noinline init_done(void) > > unregister_init_virtual_region(); > > > > /* Zero the .init code and data. */ > > -for ( va = __init_begin; va < _p(__init_end); va += PAGE_SIZ

Re: [Xen-devel] [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required

2019-03-06 Thread Stefano Stabellini
On Wed, 6 Mar 2019, Jan Beulich wrote: > >>> On 05.03.19 at 23:38, wrote: > > --- a/xen/arch/x86/percpu.c > > +++ b/xen/arch/x86/percpu.c > > @@ -13,7 +13,8 @@ unsigned long __per_cpu_offset[NR_CPUS]; > > * context of PV guests. > > */ > > #define INVALID_PERCPU_AREA (0x8000L - (l

Re: [Xen-devel] [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required

2019-03-06 Thread Jan Beulich
>>> On 05.03.19 at 23:38, wrote: > @@ -600,7 +602,9 @@ static void noinline init_done(void) > unregister_init_virtual_region(); > > /* Zero the .init code and data. */ > -for ( va = __init_begin; va < _p(__init_end); va += PAGE_SIZE ) > +for ( va = (char *)__init_begin; > +

Re: [Xen-devel] [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required

2019-03-06 Thread Jan Beulich
>>> On 05.03.19 at 23:38, wrote: > --- a/xen/arch/x86/percpu.c > +++ b/xen/arch/x86/percpu.c > @@ -13,7 +13,8 @@ unsigned long __per_cpu_offset[NR_CPUS]; > * context of PV guests. > */ > #define INVALID_PERCPU_AREA (0x8000L - (long)__per_cpu_start) > -#define PERCPU_ORDER get_orde

[Xen-devel] [PATCH v11 5/9] xen/x86: use DECLARE_BOUNDS as required

2019-03-05 Thread Stefano Stabellini
Use DECLARE_BOUNDS and the two static inline functions that come with it for comparisons and subtractions of: __2M_rwdata_start, __2M_rwdata_end, __end_vpci_array, __start_vpci_array, _stextentry, _etextentry, __trampoline_rel_start, __trampoline_rel_stop, __trampoline_seg_start, __trampoline_seg_