Re: [Xen-devel] [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-06 Thread Stefano Stabellini
On Thu, 6 Aug 2015, Julien Grall wrote: > On 06/08/15 12:06, Stefano Stabellini wrote: > > On Thu, 6 Aug 2015, Julien Grall wrote: > >> Hi, > >> > >> > >> On 04/08/15 19:12, Julien Grall wrote: > >>> diff --git a/include/xen/page.h b/include/xen/page.h > >>> index c5ed20b..e7e1425 100644 > >>> ---

Re: [Xen-devel] [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-06 Thread Julien Grall
On 06/08/15 12:06, Stefano Stabellini wrote: > On Thu, 6 Aug 2015, Julien Grall wrote: >> Hi, >> >> >> On 04/08/15 19:12, Julien Grall wrote: >>> diff --git a/include/xen/page.h b/include/xen/page.h >>> index c5ed20b..e7e1425 100644 >>> --- a/include/xen/page.h >>> +++ b/include/xen/page.h >>> @@

Re: [Xen-devel] [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-06 Thread Stefano Stabellini
On Thu, 6 Aug 2015, Julien Grall wrote: > Hi, > > > On 04/08/15 19:12, Julien Grall wrote: > > diff --git a/include/xen/page.h b/include/xen/page.h > > index c5ed20b..e7e1425 100644 > > --- a/include/xen/page.h > > +++ b/include/xen/page.h > > @@ -3,9 +3,9 @@ > > > > #include > > > >

Re: [Xen-devel] [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-06 Thread Julien Grall
Hi, On 04/08/15 19:12, Julien Grall wrote: > diff --git a/include/xen/page.h b/include/xen/page.h > index c5ed20b..e7e1425 100644 > --- a/include/xen/page.h > +++ b/include/xen/page.h > @@ -3,9 +3,9 @@ > > #include > > -static inline unsigned long page_to_mfn(struct page *page) > +static

Re: [Xen-devel] [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-06 Thread Julien Grall
Hi, On 04/08/15 19:12, Julien Grall wrote: diff --git a/include/xen/page.h b/include/xen/page.h index c5ed20b..e7e1425 100644 --- a/include/xen/page.h +++ b/include/xen/page.h @@ -3,9 +3,9 @@ #include asm/xen/page.h -static inline unsigned long page_to_mfn(struct page *page)

Re: [Xen-devel] [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-06 Thread Stefano Stabellini
On Thu, 6 Aug 2015, Julien Grall wrote: Hi, On 04/08/15 19:12, Julien Grall wrote: diff --git a/include/xen/page.h b/include/xen/page.h index c5ed20b..e7e1425 100644 --- a/include/xen/page.h +++ b/include/xen/page.h @@ -3,9 +3,9 @@ #include asm/xen/page.h -static

Re: [Xen-devel] [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-06 Thread Julien Grall
On 06/08/15 12:06, Stefano Stabellini wrote: On Thu, 6 Aug 2015, Julien Grall wrote: Hi, On 04/08/15 19:12, Julien Grall wrote: diff --git a/include/xen/page.h b/include/xen/page.h index c5ed20b..e7e1425 100644 --- a/include/xen/page.h +++ b/include/xen/page.h @@ -3,9 +3,9 @@

Re: [Xen-devel] [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-06 Thread Stefano Stabellini
On Thu, 6 Aug 2015, Julien Grall wrote: On 06/08/15 12:06, Stefano Stabellini wrote: On Thu, 6 Aug 2015, Julien Grall wrote: Hi, On 04/08/15 19:12, Julien Grall wrote: diff --git a/include/xen/page.h b/include/xen/page.h index c5ed20b..e7e1425 100644 --- a/include/xen/page.h +++

Re: [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-05 Thread Wei Liu
On Tue, Aug 04, 2015 at 07:12:48PM +0100, Julien Grall wrote: [...] > diff --git a/drivers/net/xen-netback/netback.c > b/drivers/net/xen-netback/netback.c > index 7d50711..3b7b7c3 100644 > --- a/drivers/net/xen-netback/netback.c > +++ b/drivers/net/xen-netback/netback.c > @@ -314,7 +314,7 @@

Re: [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-05 Thread Dmitry Torokhov
On Wed, Aug 05, 2015 at 11:08:55AM +0100, Stefano Stabellini wrote: > On Tue, 4 Aug 2015, Julien Grall wrote: > > Based on include/xen/mm.h [1], Linux is mistakenly using MFN when GFN > > is meant, I suspect this is because the first support for Xen was for > > PV. This resulted in some

Re: [Xen-devel] [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-05 Thread Boris Ostrovsky
On 08/05/2015 08:33 AM, Julien Grall wrote: On 05/08/15 13:19, Boris Ostrovsky wrote: On 08/05/2015 06:51 AM, Julien Grall wrote: diff --git a/drivers/video/fbdev/xen-fbfront.c b/drivers/video/fbdev/xen-fbfront.c index 09dc447..25e3cce 100644 --- a/drivers/video/fbdev/xen-fbfront.c +++

Re: [Xen-devel] [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-05 Thread Julien Grall
On 05/08/15 13:19, Boris Ostrovsky wrote: > On 08/05/2015 06:51 AM, Julien Grall wrote: >> diff --git a/drivers/video/fbdev/xen-fbfront.c b/drivers/video/fbdev/xen-fbfront.c index 09dc447..25e3cce 100644 --- a/drivers/video/fbdev/xen-fbfront.c +++

Re: [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-05 Thread Boris Ostrovsky
On 08/05/2015 06:51 AM, Julien Grall wrote: diff --git a/drivers/video/fbdev/xen-fbfront.c b/drivers/video/fbdev/xen-fbfront.c index 09dc447..25e3cce 100644 --- a/drivers/video/fbdev/xen-fbfront.c +++ b/drivers/video/fbdev/xen-fbfront.c @@ -539,7 +539,7 @@ static int xenfb_remove(struct

Re: [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-05 Thread Julien Grall
Hi Boris, On 05/08/15 00:16, Boris Ostrovsky wrote: > On 08/04/2015 02:12 PM, Julien Grall wrote: >> /* >>* We detect special mappings in one of two ways: >> @@ -217,9 +232,13 @@ static inline unsigned long >> bfn_to_local_pfn(unsigned long mfn) >> /* VIRT <-> MACHINE conversion */ >>

Re: [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-05 Thread Stefano Stabellini
On Tue, 4 Aug 2015, Julien Grall wrote: > Based on include/xen/mm.h [1], Linux is mistakenly using MFN when GFN > is meant, I suspect this is because the first support for Xen was for > PV. This resulted in some misimplementation of helpers on ARM and > confused developers about the expected

Re: [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-05 Thread Stefano Stabellini
On Tue, 4 Aug 2015, Boris Ostrovsky wrote: > On 08/04/2015 02:12 PM, Julien Grall wrote: > > /* > >* We detect special mappings in one of two ways: > > @@ -217,9 +232,13 @@ static inline unsigned long bfn_to_local_pfn(unsigned > > long mfn) > > /* VIRT <-> MACHINE conversion */ > >

Re: [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-05 Thread Stefano Stabellini
On Tue, 4 Aug 2015, Boris Ostrovsky wrote: On 08/04/2015 02:12 PM, Julien Grall wrote: /* * We detect special mappings in one of two ways: @@ -217,9 +232,13 @@ static inline unsigned long bfn_to_local_pfn(unsigned long mfn) /* VIRT - MACHINE conversion */ #define

Re: [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-05 Thread Stefano Stabellini
On Tue, 4 Aug 2015, Julien Grall wrote: Based on include/xen/mm.h [1], Linux is mistakenly using MFN when GFN is meant, I suspect this is because the first support for Xen was for PV. This resulted in some misimplementation of helpers on ARM and confused developers about the expected behavior.

Re: [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-05 Thread Julien Grall
Hi Boris, On 05/08/15 00:16, Boris Ostrovsky wrote: On 08/04/2015 02:12 PM, Julien Grall wrote: /* * We detect special mappings in one of two ways: @@ -217,9 +232,13 @@ static inline unsigned long bfn_to_local_pfn(unsigned long mfn) /* VIRT - MACHINE conversion */ #define

Re: [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-05 Thread Boris Ostrovsky
On 08/05/2015 06:51 AM, Julien Grall wrote: diff --git a/drivers/video/fbdev/xen-fbfront.c b/drivers/video/fbdev/xen-fbfront.c index 09dc447..25e3cce 100644 --- a/drivers/video/fbdev/xen-fbfront.c +++ b/drivers/video/fbdev/xen-fbfront.c @@ -539,7 +539,7 @@ static int xenfb_remove(struct

Re: [Xen-devel] [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-05 Thread Julien Grall
On 05/08/15 13:19, Boris Ostrovsky wrote: On 08/05/2015 06:51 AM, Julien Grall wrote: diff --git a/drivers/video/fbdev/xen-fbfront.c b/drivers/video/fbdev/xen-fbfront.c index 09dc447..25e3cce 100644 --- a/drivers/video/fbdev/xen-fbfront.c +++ b/drivers/video/fbdev/xen-fbfront.c @@ -539,7

Re: [Xen-devel] [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-05 Thread Boris Ostrovsky
On 08/05/2015 08:33 AM, Julien Grall wrote: On 05/08/15 13:19, Boris Ostrovsky wrote: On 08/05/2015 06:51 AM, Julien Grall wrote: diff --git a/drivers/video/fbdev/xen-fbfront.c b/drivers/video/fbdev/xen-fbfront.c index 09dc447..25e3cce 100644 --- a/drivers/video/fbdev/xen-fbfront.c +++

Re: [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-05 Thread Dmitry Torokhov
On Wed, Aug 05, 2015 at 11:08:55AM +0100, Stefano Stabellini wrote: On Tue, 4 Aug 2015, Julien Grall wrote: Based on include/xen/mm.h [1], Linux is mistakenly using MFN when GFN is meant, I suspect this is because the first support for Xen was for PV. This resulted in some misimplementation

Re: [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-05 Thread Wei Liu
On Tue, Aug 04, 2015 at 07:12:48PM +0100, Julien Grall wrote: [...] diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c index 7d50711..3b7b7c3 100644 --- a/drivers/net/xen-netback/netback.c +++ b/drivers/net/xen-netback/netback.c @@ -314,7 +314,7 @@ static

Re: [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-04 Thread Boris Ostrovsky
On 08/04/2015 02:12 PM, Julien Grall wrote: /* * We detect special mappings in one of two ways: @@ -217,9 +232,13 @@ static inline unsigned long bfn_to_local_pfn(unsigned long mfn) /* VIRT <-> MACHINE conversion */ #define virt_to_machine(v)(phys_to_machine(XPADDR(__pa(v

[PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-04 Thread Julien Grall
Based on include/xen/mm.h [1], Linux is mistakenly using MFN when GFN is meant, I suspect this is because the first support for Xen was for PV. This resulted in some misimplementation of helpers on ARM and confused developers about the expected behavior. For instance, with pfn_to_mfn, we expect

Re: [PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-04 Thread Boris Ostrovsky
On 08/04/2015 02:12 PM, Julien Grall wrote: /* * We detect special mappings in one of two ways: @@ -217,9 +232,13 @@ static inline unsigned long bfn_to_local_pfn(unsigned long mfn) /* VIRT - MACHINE conversion */ #define virt_to_machine(v)(phys_to_machine(XPADDR(__pa(v

[PATCH v2 4/8] xen: Use the correctly the Xen memory terminologies

2015-08-04 Thread Julien Grall
Based on include/xen/mm.h [1], Linux is mistakenly using MFN when GFN is meant, I suspect this is because the first support for Xen was for PV. This resulted in some misimplementation of helpers on ARM and confused developers about the expected behavior. For instance, with pfn_to_mfn, we expect