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_emulation() in page_fault

To: Tim Deegan <tim@xxxxxxx>
Subject: Re: [Xen-devel] why xen use x86_emulation() in page_fault
From: cc Luit <universalbillow@xxxxxxxxx>
Date: Tue, 11 Oct 2011 18:14:19 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 11 Oct 2011 03:17:27 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=idIs9mM/Ryr+69mjgIUF1ofC13GihiMCWeyGJ2WZzv0=; b=ZlWJ5GuKWe2LFdDQZ+WZ7ara0TjKlPLK97ooU0r5R7JPC+dCuHzwxTRGyGImoJKPCl ABKFoDkoAhfG9g87qcV7OVOpE1mYY6nLL5TxatWbMhIoyJkgvXLmXPnYTPvOlrPBBjh6 Y4pKu+hevVWwIsDYoRb7cuKzoIX2qFn5KlFIU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20111011081829.GB88076@xxxxxxxxxxxxxxxxxxxxx>
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>
References: <CADWh-PE3tdCP5UshkwH0VX9J0aJaxBLfQdiN1u9WF+Q--x4ejA@xxxxxxxxxxxxxx> <20111011081829.GB88076@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On Tue, Oct 11, 2011 at 4:18 PM, Tim Deegan <tim@xxxxxxx> 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.

Thanks first of all, I know now it is the Eager mode that SPT is sync up with GPT when guest want to change the page table using the instructions emulator,  but if for some reason I don't want xen to emulate such an instruction, but just VMEntry to HVM to retry, is there any feasibility problems? in other words, in the old time, the shadow page is the Lazy mode, that xen will not emulate, and the GPT and SPT is out of sync for some time, besides the lose in performance, is there other problems?
> Cheers,

Tim.



--
- Luit @ Parallel Processing Institute, Fudan University 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel