On Sun, Jan 17, 2010 at 07:32:32AM -0500, Christoph Hellwig wrote:
> On Sun, Jan 17, 2010 at 02:20:32PM +0200, Avi Kivity wrote:
> >> + addr = kmap_atomic(page, KM_USER0);
> >> + clear_user_page(addr, vaddr, page);
> >> + kunmap_atomic(addr, KM_USER0);
> >>
> >
> > Surprising that clear_user_page needs kmap_atomic() (but true).
>
> There's a clear_user_highpage helper to take care of it for you.
I copied code from the instead of using helper faction for
some unknown to me reason. Anyway if I can't get struct page from
user virtual address I can't use it. Actually I am not sure the page
should be zeroed at all. Spec only descries first dword of the page and
doesn't require zeroing the reset as far as I see.
--
Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html