Re: [Xen-devel] [PATCH v2] xen: grant-table: Simplify get_paged_frame

2017-09-20 Thread Julien Grall
Hi Roger, On 19/09/17 12:40, Roger Pau Monné wrote: On Tue, Sep 19, 2017 at 10:44:53AM +0100, Julien Grall wrote: Hi, On 19/09/17 08:13, Roger Pau Monné wrote: On Mon, Sep 18, 2017 at 06:32:22PM +0100, Julien Grall wrote: Hi Roger, On 18/09/17 17:58, Roger Pau Monné wrote: On Mon, Sep 18,

Re: [Xen-devel] [PATCH v2] xen: grant-table: Simplify get_paged_frame

2017-09-19 Thread Roger Pau Monné
On Tue, Sep 19, 2017 at 10:44:53AM +0100, Julien Grall wrote: > Hi, > > On 19/09/17 08:13, Roger Pau Monné wrote: > > On Mon, Sep 18, 2017 at 06:32:22PM +0100, Julien Grall wrote: > > > Hi Roger, > > > > > > On 18/09/17 17:58, Roger Pau Monné wrote: > > > > On Mon, Sep 18, 2017 at 05:27:52PM +010

Re: [Xen-devel] [PATCH v2] xen: grant-table: Simplify get_paged_frame

2017-09-19 Thread Julien Grall
Hi Wei, On 19/09/17 11:38, Wei Liu wrote: On Mon, Sep 18, 2017 at 05:27:52PM +0100, Julien Grall wrote: The implementation of get_paged_frame is currently different whether the architecture support sharing memory or paging memory. Both version are extremely similar so it is possible to consolid

Re: [Xen-devel] [PATCH v2] xen: grant-table: Simplify get_paged_frame

2017-09-19 Thread Wei Liu
On Mon, Sep 18, 2017 at 05:27:52PM +0100, Julien Grall wrote: > The implementation of get_paged_frame is currently different whether the > architecture support sharing memory or paging memory. Both > version are extremely similar so it is possible to consolidate in a > single implementation. > > T

Re: [Xen-devel] [PATCH v2] xen: grant-table: Simplify get_paged_frame

2017-09-19 Thread Paul Durrant
) > > Subject: Re: [Xen-devel] [PATCH v2] xen: grant-table: Simplify > get_paged_frame > > >>> On 19.09.17 at 11:39, wrote: > > On 19/09/17 09:56, Jan Beulich wrote: > >>>>> On 19.09.17 at 10:34, wrote: > >>> I do wonder whether this func

Re: [Xen-devel] [PATCH v2] xen: grant-table: Simplify get_paged_frame

2017-09-19 Thread Julien Grall
(Xen.org) Subject: Re: [Xen-devel] [PATCH v2] xen: grant-table: Simplify get_paged_frame Hi, On 19/09/17 09:56, Jan Beulich wrote: On 19.09.17 at 10:34, wrote: I do wonder whether this function belongs in the grant table code though. Getting the page from a (d, gfn) tuple is probably something

Re: [Xen-devel] [PATCH v2] xen: grant-table: Simplify get_paged_frame

2017-09-19 Thread Jan Beulich
>>> On 19.09.17 at 11:39, wrote: > On 19/09/17 09:56, Jan Beulich wrote: > On 19.09.17 at 10:34, wrote: >>> I do wonder whether this function belongs in the grant table code though. >>> Getting the page from a (d, gfn) tuple is probably something that's needed >>> in >>> a few places and hen

Re: [Xen-devel] [PATCH v2] xen: grant-table: Simplify get_paged_frame

2017-09-19 Thread Paul Durrant
t; (Xen.org) > Subject: Re: [Xen-devel] [PATCH v2] xen: grant-table: Simplify > get_paged_frame > > Hi, > > On 19/09/17 09:56, Jan Beulich wrote: > >>>> On 19.09.17 at 10:34, wrote: > >> I do wonder whether this function belongs in the grant table code thou

Re: [Xen-devel] [PATCH v2] xen: grant-table: Simplify get_paged_frame

2017-09-19 Thread Julien Grall
Hi, On 19/09/17 08:13, Roger Pau Monné wrote: On Mon, Sep 18, 2017 at 06:32:22PM +0100, Julien Grall wrote: Hi Roger, On 18/09/17 17:58, Roger Pau Monné wrote: On Mon, Sep 18, 2017 at 05:27:52PM +0100, Julien Grall wrote: The implementation of get_paged_frame is currently different whether t

Re: [Xen-devel] [PATCH v2] xen: grant-table: Simplify get_paged_frame

2017-09-19 Thread Julien Grall
Hi, On 19/09/17 09:56, Jan Beulich wrote: On 19.09.17 at 10:34, wrote: I do wonder whether this function belongs in the grant table code though. Getting the page from a (d, gfn) tuple is probably something that's needed in a few places and hence putting the code in common/memory.c (with suitab

Re: [Xen-devel] [PATCH v2] xen: grant-table: Simplify get_paged_frame

2017-09-19 Thread Jan Beulich
>>> On 19.09.17 at 10:34, wrote: > I do wonder whether this function belongs in the grant table code though. > Getting the page from a (d, gfn) tuple is probably something that's needed in > a few places and hence putting the code in common/memory.c (with suitable > adjustment to the error valu

Re: [Xen-devel] [PATCH v2] xen: grant-table: Simplify get_paged_frame

2017-09-19 Thread Paul Durrant
t; (Xen.org) ; Julien Grall ; > jbeul...@suse.com > Subject: [Xen-devel] [PATCH v2] xen: grant-table: Simplify get_paged_frame > > The implementation of get_paged_frame is currently different whether the > architecture support sharing memory or paging memory. Both > versi

Re: [Xen-devel] [PATCH v2] xen: grant-table: Simplify get_paged_frame

2017-09-19 Thread Roger Pau Monné
On Mon, Sep 18, 2017 at 06:32:22PM +0100, Julien Grall wrote: > Hi Roger, > > On 18/09/17 17:58, Roger Pau Monné wrote: > > On Mon, Sep 18, 2017 at 05:27:52PM +0100, Julien Grall wrote: > > > The implementation of get_paged_frame is currently different whether the > > > architecture support sharin

Re: [Xen-devel] [PATCH v2] xen: grant-table: Simplify get_paged_frame

2017-09-18 Thread Julien Grall
Hi Roger, On 18/09/17 17:58, Roger Pau Monné wrote: On Mon, Sep 18, 2017 at 05:27:52PM +0100, Julien Grall wrote: The implementation of get_paged_frame is currently different whether the architecture support sharing memory or paging memory. Both version are extremely similar so it is possible t

Re: [Xen-devel] [PATCH v2] xen: grant-table: Simplify get_paged_frame

2017-09-18 Thread Roger Pau Monné
On Mon, Sep 18, 2017 at 05:27:52PM +0100, Julien Grall wrote: > The implementation of get_paged_frame is currently different whether the > architecture support sharing memory or paging memory. Both > version are extremely similar so it is possible to consolidate in a > single implementation. > > T

[Xen-devel] [PATCH v2] xen: grant-table: Simplify get_paged_frame

2017-09-18 Thread Julien Grall
The implementation of get_paged_frame is currently different whether the architecture support sharing memory or paging memory. Both version are extremely similar so it is possible to consolidate in a single implementation. The main difference is the x86 version will allow grant on foreign page whe