ia64/xen-unstable

changeset 14065:eb190b1faa52

x86: Only unshadow on failed emulation, not when an exception is raised.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Wed Feb 21 20:30:37 2007 +0000 (2007-02-21)
parents 4e50678c364c
children f62a052384a5
files xen/arch/x86/mm/shadow/multi.c
line diff
     1.1 --- a/xen/arch/x86/mm/shadow/multi.c	Wed Feb 21 20:03:56 2007 +0000
     1.2 +++ b/xen/arch/x86/mm/shadow/multi.c	Wed Feb 21 20:30:37 2007 +0000
     1.3 @@ -2915,7 +2915,12 @@ static int sh_page_fault(struct vcpu *v,
     1.4      if ( !(regs->error_code & PFEC_user_mode) )
     1.5          r = x86_emulate(&emul_ctxt.ctxt, emul_ops);
     1.6  
     1.7 -    if ( (r == X86EMUL_UNHANDLEABLE) || (r == X86EMUL_EXCEPTION) )
     1.8 +    /*
     1.9 +     * NB. We do not unshadow on X86EMUL_EXCEPTION. It's not clear that it
    1.10 +     * would be a good unshadow hint. If we *do* decide to unshadow-on-fault
    1.11 +     * then it must be 'failable': we cannot require the unshadow to succeed.
    1.12 +     */
    1.13 +    if ( r == X86EMUL_UNHANDLEABLE )
    1.14      {
    1.15          SHADOW_PRINTK("emulator failure, unshadowing mfn %#lx\n", 
    1.16                         mfn_x(gmfn));