[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
>
>-- 
>Tim Deegan <Tim.Deegan@xxxxxxxxxx>
>Principal Software Engineer, Xen Platform Team
>Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)
OK, I'll have a try as you said first. Hopefully it won't take a long long time:)
Thanks a lot. Have a nice day~~


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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.