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] Question on p2m table

To: MaoXiaoyun <tinnycloud@xxxxxxxxxxx>
Subject: Re: [Xen-devel] Question on p2m table
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Tue, 31 May 2011 10:14:54 +0100
Cc: xen devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 31 May 2011 07:43:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <BLU157-w20E0638269BC9F8D36679CDA7B0@xxxxxxx>
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>
Organization: Citrix Systems, Inc.
References: <SNT0-MC4-F36Ccpzvqk001553a4@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <BLU157-w20E0638269BC9F8D36679CDA7B0@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

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