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/
Home Products Support Community News


Re: [Xen-devel] create shadow pages

To: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Subject: Re: [Xen-devel] create shadow pages
From: ding baozeng <baozengding@xxxxxxxxx>
Date: Fri, 5 Nov 2010 09:32:05 +0800
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 04 Nov 2010 18:32:50 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=CwAqP4vNZs3yLZj/gIusp/XhpMf9Sx/6Cyj7MVYblyo=; b=HN0bLxYaeatzzw0u9YEl+CAH4TaRvjMy8z9pn90AHKWY/wZS7WBocb/FmeJ4+HUdXA En5VEvDWOH+x6n7MX0f9PH/Najf52kzP5w8Zihm9GBlVCFC40lOp9NRRWSUh8EhAoku3 SzV5iWV2w2pYTtSJSxUYZl9YPKzg95TYGbjio=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=ZnOz8Uiks5JfapNRug04M1AsRtbqwoAp0cmyHao1n49IcxsMYtFiSZt1G3YuhGvK4r +TcXKhjNZ6ABDuTACTtAbeO1tpBHIWSINYZEgNxzP2+Gx27AMb6YZff/ZA51X8q7HZDD Bx0toCDrQKwsRzdgxoaRmwdBaRPPvKpWVGgzs=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20101104124401.GH11016@xxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <AANLkTim3OqBOcw2KtpT9rfNj5ZKuqcBup3tJktCmddJc@xxxxxxxxxxxxxx> <20101104124401.GH11016@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

2010/11/4 Tim Deegan <Tim.Deegan@xxxxxxxxxx>

At 12:30 +0000 on 04 Nov (1288873804), ding baozeng wrote:
> I alloc some memory (some pages)in the hvm domU kernel space, but not
> map it. So the kernel space could not access the memory by its guest
> tables. But I would access it by shadow pages for some use.

Why can't you just map it with the guest pagetables?  Having it only in
the shadow pagetables would be confusing.  What if the guest kernel
wants to map something else at that virtual address?

I want to create another address space for security analysis. In this address space, we could access all the kernel address space, but the kernel address space could not access some memory of it. So this address space need to create its own shadow pages. In the shadow pages, they contain all the mapping that kernel shadow pages have, and also contains some mapping for the memory that the kernel could not access. The shadow pages are always in memory. So there would be  two shadows, one for kernel, one for this address space. First, I want to copy the kernel shadow pages and then make some change to create the shadow pages we need.  As we know, the kernel shadow pages is built dynamically, then how to copy it and make it in memory always?

Best Regards,

                                                 Baozeng Ding
> When the
> shadow pages are built, they should be in memory always and should not
> be paged out.  Then how to create the shadow pages for the memory?

The easiest thing would be to change guest_walk_tables to insert your
mappings as if they were in the guest pagetables.  That way all the
users in Xen will be consisitent.



Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, Xen Platform Team
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)

Xen-devel mailing list