Re: [PATCH v2 2/5] mm: Factor out the pdx compression logic in ma/va converters

2023-08-08 Thread Julien Grall
Hi Jan, On 08/08/2023 07:05, Jan Beulich wrote: On 07.08.2023 18:26, Alejandro Vallejo wrote: On Mon, Jul 31, 2023 at 05:15:19PM +0200, Jan Beulich wrote: Especially since the names of the helper functions are longish, I'm afraid I'm not fully convinced of the transformation. In what sense?

Re: [PATCH v2 2/5] mm: Factor out the pdx compression logic in ma/va converters

2023-08-08 Thread Jan Beulich
On 07.08.2023 18:26, Alejandro Vallejo wrote: > On Mon, Jul 31, 2023 at 05:15:19PM +0200, Jan Beulich wrote: >> Especially since the names of the helper functions are longish, >> I'm afraid I'm not fully convinced of the transformation. > In what sense? If it's just naming style I'm happy to

Re: [PATCH v2 2/5] mm: Factor out the pdx compression logic in ma/va converters

2023-08-07 Thread Alejandro Vallejo
On Mon, Jul 31, 2023 at 05:15:19PM +0200, Jan Beulich wrote: > On 28.07.2023 09:59, Alejandro Vallejo wrote: > > --- a/xen/include/xen/pdx.h > > +++ b/xen/include/xen/pdx.h > > @@ -160,6 +160,31 @@ static inline unsigned long pdx_to_pfn(unsigned long > > pdx) > > #define mfn_to_pdx(mfn)

Re: [PATCH v2 2/5] mm: Factor out the pdx compression logic in ma/va converters

2023-07-31 Thread Jan Beulich
On 28.07.2023 09:59, Alejandro Vallejo wrote: > --- a/xen/include/xen/pdx.h > +++ b/xen/include/xen/pdx.h > @@ -160,6 +160,31 @@ static inline unsigned long pdx_to_pfn(unsigned long pdx) > #define mfn_to_pdx(mfn) pfn_to_pdx(mfn_x(mfn)) > #define pdx_to_mfn(pdx) _mfn(pdx_to_pfn(pdx)) > > +/** >

Re: [PATCH v2 2/5] mm: Factor out the pdx compression logic in ma/va converters

2023-07-28 Thread Julien Grall
Hi, On 28/07/2023 08:59, Alejandro Vallejo wrote: This patch factors out the pdx compression logic hardcoded in both ports for the maddr<->vaddr conversion functions. Touches both x86 and arm ports. Signed-off-by: Alejandro Vallejo Reviewed-by: Julien Grall Cheers, -- Julien Grall

[PATCH v2 2/5] mm: Factor out the pdx compression logic in ma/va converters

2023-07-28 Thread Alejandro Vallejo
This patch factors out the pdx compression logic hardcoded in both ports for the maddr<->vaddr conversion functions. Touches both x86 and arm ports. Signed-off-by: Alejandro Vallejo --- v2: * Cast variable to u64 before shifting left to avoid overflow (Julien) ---