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

RE: [Xen-devel] [patch] more correct pfn_valid()

  • To: "Scott Parish" <srparish@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
  • Date: Wed, 18 May 2005 23:18:22 +0100
  • Delivery-date: Wed, 18 May 2005 22:17:53 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcVb9aZ7Rlj1GNpbTJqBIcUW7A2ChAAANsGg
  • Thread-topic: [Xen-devel] [patch] more correct pfn_valid()

>    #define pfn_valid(_pfn)     ((_pfn) < max_page)
> Since max_page is now above the out-of-range io, the 
> pfn_valid() returns "valid". And hence get_page() is called, 
> but returns an error given that the page count is zero ("not 
> allocated") which ultimately ends up that the ioremap() for 
> several device drivers fails with ENOMEM.
> While attached patch fixes this problem (from empirical 
> evidence), there may be a better solution.

I think the best fix is to have the frame_table cover the whole of
physical ram, and then mark non-ram pages in the frame_table.

To save some memory, we could map the frame_table in virtual address
space, then use __get_user when reading from it (a fault indicates a
non-ram page too)


Xen-devel mailing list



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