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

Re: [Xen-devel] why xen use x86_emulat ion() in page_fault



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


 


Rackspace

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