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

[Xen-devel] Re: RFC: Using grant table to give iomem permission

  • To: Kieran Mansley <kmansley@xxxxxxxxxxxxxx>
  • From: Keir Fraser <keir@xxxxxxxxxxxxx>
  • Date: Fri, 18 May 2007 15:45:27 +0100
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 18 May 2007 07:43:57 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AceZWyxwatnHXwVOEdyzvQAX8io7RQ==
  • Thread-topic: RFC: Using grant table to give iomem permission

On 18/5/07 15:14, "Kieran Mansley" <kmansley@xxxxxxxxxxxxxx> wrote:

>>> Some questions from me:
>>>  - does this approach seem sane?
>> There's no reason you shouldn't be able to use GNTMAP_host_map as usual, and
>> do refcounting in the active grant entry, also as usual.
> OK.  My reluctance to do that was simply that I wasn't sure if the
> operations that take place when doing a GNTMAP_host_map would conflict
> with those when doing an iomem_map.  If you think they shouldn't, I'll
> give it a go.

I'm not sure what you mean.

> That raises one of my other questions which is how to test for it being
> a valid RAM page, as in the absence of it GNTMAP_iomem_map that's pretty
> much the only indicator that it's iomem we're dealing with.  As I said,
> mfn_valid() doesn't seem to be sufficient.

Yes, I misled you here. You want the middle bit of get_page_from_l1e(). It
checks for !mfn_valid()||page_get_owner()==dom_io. Then you'd do an
iomem_access_permitted check passing in a pointer to the granting domain.

You should perhaps pull the core of get_page_from_l1e() into a supporting
function which you can then make available for common/grant_table.c to call

 -- Keir

Xen-devel mailing list



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