From: "Zhengwang Ruan (Royo)" <zhengwang.ruan@gmail.com>
To: Tim Deegan <tim@xen.org>
Cc: cc Luit <universalbillow@gmail.com>, xen-devel@lists.xensource.com
Subject: Re: why xen use x86_emulation() in page_fault
Date: Tue, 11 Oct 2011 21:21:08 +0800 [thread overview]
Message-ID: <4E9442C4.7010903@gmail.com> (raw)
In-Reply-To: <20111011081829.GB88076@ocelot.phlegethon.org>
Hi Tim,
I am a freshman to this member-list and interested in some contents in
your reply, looking forward to your answer. :)
At 2011-10-11 16:18, Tim Deegan wrote:
> At 09:39 +0800 on 11 Oct (1318325957), cc Luit 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?
> In the shadow pagetable code, we keep the shadows up-to-date by:
> 1 - making all shadowed pagetables read-only;
> 2 - intercepting the page faults when the guest writes to them; and
> 3 - updating the guest pagetable and the shadow at the same time,
> with whatever change the guest was making.
>
> For step 3 we need to emulate the instruction that caused the pagefault
> so that we can tell what was being written.
>
> There are other reasons for the emulator to be called (emulating MMIO
> instructions, emulating real-mode&c) but that's why the shadow
> pagetable code uses it.
1, Does this emulator set up a emulation environment to execute
instructions for a VM(guest OS)?
2, Real-mode code you talked above is used to execute the first 16-bit
initial code of a guest OS? Does it have other usages in current Xen
implementation?
Thanks,
Royo (Zhengwang)
> Cheers,
>
> Tim.
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
prev parent reply other threads:[~2011-10-11 13:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-11 1:39 why xen use x86_emulation() in page_fault cc Luit
2011-10-11 8:18 ` Tim Deegan
2011-10-11 10:14 ` cc Luit
2011-10-11 11:29 ` Tim Deegan
2011-10-11 12:03 ` cc Luit
2011-10-11 12:21 ` Tim Deegan
2011-10-11 13:07 ` cc Luit
2011-10-13 11:47 ` Tim Deegan
2011-10-13 12:21 ` Christoph Egger
2011-10-11 12:04 ` Zhengwang Ruan (Royo)
2011-10-11 13:46 ` cc Luit
2011-10-13 11:53 ` Tim Deegan
2011-10-11 13:21 ` Zhengwang Ruan (Royo) [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E9442C4.7010903@gmail.com \
--to=zhengwang.ruan@gmail.com \
--cc=tim@xen.org \
--cc=universalbillow@gmail.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.