From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCHv2 3/4] Add HYPER-V apic access MSRs. Date: Sun, 17 Jan 2010 14:41:42 +0200 Message-ID: <20100117124142.GC31692@redhat.com> References: <1263719028-24765-1-git-send-email-gleb@redhat.com> <1263719028-24765-4-git-send-email-gleb@redhat.com> <4B530090.50506@redhat.com> <20100117123232.GA10114@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , mtosatti@redhat.com, kvm@vger.kernel.org To: Christoph Hellwig Return-path: Received: from mx1.redhat.com ([209.132.183.28]:18689 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751253Ab0AQMlv (ORCPT ); Sun, 17 Jan 2010 07:41:51 -0500 Content-Disposition: inline In-Reply-To: <20100117123232.GA10114@infradead.org> Sender: kvm-owner@vger.kernel.org List-ID: 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.