[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
> Sent: 19 September 2017 10:58
> To: Julien Grall <julien.grall@xxxxxxx>
> Cc: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>; George Dunlap
> <George.Dunlap@xxxxxxxxxx>; Ian Jackson <Ian.Jackson@xxxxxxxxxx>; Paul
> Durrant <Paul.Durrant@xxxxxxxxxx>; Wei Liu <wei.liu2@xxxxxxxxxx>;
> sstabellini@xxxxxxxxxx; xen-devel@xxxxxxxxxxxxx; Tim (Xen.org)
> <tim@xxxxxxx>
> Subject: Re: [Xen-devel] [PATCH v2] xen: grant-table: Simplify
> get_paged_frame
> >>> On 19.09.17 at 11:39, <julien.grall@xxxxxxx> wrote:
> > On 19/09/17 09:56, Jan Beulich wrote:
> >>>>> On 19.09.17 at 10:34, <Paul.Durrant@xxxxxxxxxx> 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 values) would seem more appropriate.
> >>
> >> That's been true from the very beginning of the existence of
> >> the function, I think.
> >
> > I am not sure how this function would fit in common/memory.c code. We
> > already have get_page_from_gfn to get a page from the tuple (d, gfn).
> >
> > This function adds more check that may not fit everyone. The only place
> > I could see potential usage is prepare_ring_for_helper. But what would
> > be a suitable name given?
> Actually I didn't mean to suggest you do anything beyond what
> the patch already does. If you, Paul, or anyone else feel like
> moving the function, it would probably better be a separate
> patch (and we may then want to think of not only a better name,
> but also where else such that function may be usable).

Ok, I'll do it then. I need the same functionality for PV-IOMMU.


> Jan

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.