On 05/04/2011 05:00 PM, Takuya Yoshikawa wrote:
>
> We do get_user() in read_gpte(). That is equivalent to
> get_user_pages(). So we already broke that layer of abstraction.
At first, I broke hva_to_pfn() into two functions:
hva_to_page
hva_to_pfn
and used the former to get the page.
Ouch, what a complicated function.
But after making that patch, I thought it might be a bit extra to do such
things in the function which is doing low level page manipulations like
kmapping.
Actually, we are already assuming that the page returned by gfn_to_page is
always a usual page which contains gptes without extra checks.
When gfn_to_page() returns an error, it is actually a real page in host
memory that can be scribbled on. So no further checks are needed.
Which way do you like the best?
I think it should work fine as is. The question is whether we're doing
a layering violation here (but in any case, that was introduced by
ptep_user, not this patch).
--
error compiling committee.c: too many arguments to function
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html