WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] hvm_copy_from_guest_virt

To: Wu Bingzheng <wubingzheng@xxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] hvm_copy_from_guest_virt
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Fri, 11 Sep 2009 07:43:40 +0100
Cc:
Delivery-date: Thu, 10 Sep 2009 23:44:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <6857960.101761252635960996.JavaMail.coremail@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acoyh0r1dpWSZWpmR3WosfKbarqNpAAI+dyt
Thread-topic: [Xen-devel] hvm_copy_from_guest_virt
User-agent: Microsoft-Entourage/12.20.0.090605
On 11/09/2009 03:26, "Wu Bingzheng" <wubingzheng@xxxxxxx> 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



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>