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

Re: [Xen-devel] Question on p2m table

On Mon, 2011-05-30 at 17:15 +0100, MaoXiaoyun wrote:
> Hi:
>   Question might be simple but really confused me a long time.
>   In my assumption, during VM running, the CPU sees the guest code
> instruction,
> so when it want to asscess memory, it sees the guest virtual
> adress(GVA), so it need to 
> first translate to guest physical adress(GPA), and then host physical
> adress(HPA), and finally 
> access the real memory address.
> Since GPA are always needs to translated to HPA, and p2m table only
> accessable in Xen for 
> HVM guest, does this mean every memory access will need VMExit to Xen?


If you are running on HAP then the P2M is programmed into the processor
on guest entry and will be used by the page walking hardware directly
without normally needing to vmexit, except where e.g. MMIO emulation
requires it.

If you are running on shadow page tables then the processor actually
sees a pagetable which has had the P2M translation applied already,
instead of the pagetables it thinks it is running on. The shadow code
does demand filling of this shadow page tables from the one the guest
page tables so you will take a vmexit only when there is a shadow page
table miss, the frequency of this will depend heavily on your workload
and configuration e.g. the shadow page table memory allocation for the


Xen-devel mailing list



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