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: [Xen-devel] why xen use x86_emulat ion() in page_fault

To: cc Luit <universalbillow@xxxxxxxxx>
Subject: Re: [Xen-devel] why xen use x86_emulat ion() in page_fault
From: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Date: Tue, 11 Oct 2011 10:27:53 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 11 Oct 2011 02:29:08 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=wzOxv9nfxwCw9n/diap1hKmIwiUN16u0Czvk3gIudwk=; b=nStVSoyw3OAl3M0zgldAEfPVK5PePqMOGZP2UvmvUuvnOgY7nCseoZQkmaQjwr9G2R wDLhUmsnV0fo2mdYg59w1UBnjaDCI2sfUr53vfKqrSPQ3H2bRtvF7ESYrvm/vpkujUVf WzhPLApdBrbRJHNqKLvYRvQJs3bBtZccVtXVU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
The comments in xen/arch/mm/shadow/multi.c:sh_page_fault() about emulation say:
    /* Need to emulate accesses to page tables */
and
    /* In HVM guests, we force CR0.WP always to be set, so that the
     * pagetables are always write-protected.  If the guest thinks
     * CR0.WP is clear, we must emulate faulting supervisor writes to
     * allow the guest to write through read-only PTEs.  Emulate if the
     * fault was a non-user write to a present page.  */

Do you have some question about these?

Regarding NPT/EPT, as far as I know, the only reason to do emulation
is when the guest is doing MMIO.  The whole point of MMIO is to
emulate access to devices.

 -George

On Tue, Oct 11, 2011 at 2:58 AM, cc Luit <universalbillow@xxxxxxxxx> wrote:
> Hi, everyone, I have a question,
> in the shadow_page_fault or ept mechanism, xen will use the x86_emulation
> for some instructions, I'm wondering why it must use it, if after we fix the
> SPT or EPT table, just VMEntry to HVM to re-excute this instruction  but not
> emulate in xen, is there some problems?
>
> can sb. tell me why?
> thanks:)
> --
> - Luit @ Parallel Processing Institute, Fudan University
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>
>

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