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:Re: Re: [Xen-devel] How to create shadow page table of my own?

At 2011-02-21,"Tim Deegan" <Tim.Deegan@xxxxxxxxxx> wrote:

>At 13:57 +0000 on 21 Feb (1298296632), ?????? wrote:
>> I deliberately make those two sections align for the page in order to
>> make SPT creation simple, see that? The sim_k_text & data all start at
>> a new page. The text section occupied 13 pages & data occupied 1 page
>> although the size of data is only 0x7c.
>
>Yes I saw that.  
>
>> I know in the hvm, the virtual address is translated to the physical
>> address first, then translated to the machine address. For my
>> constructed address space, I want to create SPT to convert virtual
>> address to machine address directly & eliminate the need for any guest
>> level page table for this address space, is it possible?
>
>Sure it's possible.  You can put anything you like into the shadow
>pagetables.  But you need first to think about _exactly_ what behaviour
>you want.  If two VCPUs have the same CR3 value will you ever need them
>to have different shadow pagetables?  That's not possible with the
>current Xen shadow pagetables because they share one set of shadows
>among all a domain's VCPUs.
>
>What should happen if Xen emulates an instruction that accesses the
>secure area?  The emulator doesn't use the shadow pagetables so you
>will have to find and fix the other paths that map VAs to MAs.
>
>Have you got access to a machine that supports AMD NPT or Intel EPT?  If
>so it might be easier to have a per-VCPU EPT/NPT table that you add and
>remove mappings as you go in and out of "secure" mode.
>
>> For now what I consider is pass the starting address & size to the xen.
>> 
>> You said I need to duplicate a lot of state, where I need to modify?
>
>xen/arch/x86/mm/shadow/*.c .  It's pretty complex code but there are
>some comments in there.  But as I said it would probably be easier to
>use the EPT/NPT code if you can.
>
>Cheer,
>
>Tim.

I've did some reaserch, found EPT was not appropriate, cauz EPT implements the translation from GPA to HPA, but what I want is the translation from GVA to HPA which exactly what the shadow page table did. By using spt I can eliminate the need for page table of my own address space in the guest, but ept still need it. So maybe I have to keep researching shadow page table:(
A lot of work needs to be done, WoW !!


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