From: Keir Fraser Subject: Re: hvm_copy_from_guest_virt Date: Fri, 11 Sep 2009 07:43:40 +0100 Message-ID: References: <6857960.101761252635960996.JavaMail.coremail@app195.163.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <6857960.101761252635960996.JavaMail.coremail@app195.163.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Wu Bingzheng , xen-devel List-Id: xen-devel@lists.xenproject.org On 11/09/2009 03:26, "Wu Bingzheng" wrote: > In Xen 3.3.0, hvm's shadow page fault handler: sh_page_fault(): > I call 'hvm_copy_from_guest_virt' to read some guest's (Windows XP) memory. > If I read user space, it works fine. > If I read kernel space, like 0x8xxxxxxx or 0xFxxxxxxx, it retures > HVMCOPY_bad_gva_to_gfn. > I am sure that the page I read is present in guest's page table. > > Can I copy memory from kernel space? Yes. Either the pages are not present in the pagetable, or you passed PFEC_user_mode flag in the fourth argument to hvm_copy_from_guest_virt(). -- Keir