[Xen-devel] [PATCH v2 3/3] xen/arm: fix mask calculation in pdx_init_mask

2019-05-08 Thread Stefano Stabellini
The mask calculation in pdx_init_mask is wrong when the first bank starts at address 0x0. The reason is that pdx_init_mask will do '0 - 1' causing an underflow. As a result, the mask becomes 0x which is the biggest possible mask and ends up causing a significant memory waste in the

Re: [Xen-devel] [PATCH v2 3/3] xen/arm: fix mask calculation in pdx_init_mask

2019-05-09 Thread Jan Beulich
>>> On 09.05.19 at 00:47, wrote: > --- a/xen/common/pdx.c > +++ b/xen/common/pdx.c > @@ -50,9 +50,13 @@ static u64 __init fill_mask(u64 mask) > return mask; > } > > +/* > + * We always map the first 1< + * are left uncompressed. > + */ > u64 __init pdx_init_mask(u64 base_addr) > { > -

Re: [Xen-devel] [PATCH v2 3/3] xen/arm: fix mask calculation in pdx_init_mask

2019-05-13 Thread Julien Grall
Hi Stefano, On 5/8/19 11:47 PM, Stefano Stabellini wrote: The mask calculation in pdx_init_mask is wrong when the first bank starts at address 0x0. The reason is that pdx_init_mask will do '0 - 1' causing an underflow. As a result, the mask becomes 0x which is the biggest possibl

Re: [Xen-devel] [PATCH v2 3/3] xen/arm: fix mask calculation in pdx_init_mask

2019-06-03 Thread Stefano Stabellini
On Thu, 9 May 2019, Jan Beulich wrote: > >>> On 09.05.19 at 00:47, wrote: > > --- a/xen/common/pdx.c > > +++ b/xen/common/pdx.c > > @@ -50,9 +50,13 @@ static u64 __init fill_mask(u64 mask) > > return mask; > > } > > > > +/* > > + * We always map the first 1< > + * are left uncompressed. >

Re: [Xen-devel] [PATCH v2 3/3] xen/arm: fix mask calculation in pdx_init_mask

2019-06-03 Thread Julien Grall
Hi Stefano, On 6/3/19 10:56 PM, Stefano Stabellini wrote: On Thu, 9 May 2019, Jan Beulich wrote: On 09.05.19 at 00:47, wrote: --- a/xen/common/pdx.c +++ b/xen/common/pdx.c @@ -50,9 +50,13 @@ static u64 __init fill_mask(u64 mask) return mask; } +/* + * We always map the first 1< P

Re: [Xen-devel] [PATCH v2 3/3] xen/arm: fix mask calculation in pdx_init_mask

2019-06-03 Thread Jan Beulich
>>> On 04.06.19 at 00:02, wrote: > On 6/3/19 10:56 PM, Stefano Stabellini wrote: >> On Thu, 9 May 2019, Jan Beulich wrote: >> On 09.05.19 at 00:47, wrote: --- a/xen/common/pdx.c +++ b/xen/common/pdx.c @@ -50,9 +50,13 @@ static u64 __init fill_mask(u64 mask) return ma