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] [PATCH] x86: adjust reserved bit page fault handling

To: Jan Beulich <jbeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] x86: adjust reserved bit page fault handling
From: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Fri, 1 Feb 2008 09:28:15 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 01 Feb 2008 01:29:46 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <47A2EA32.76E4.0078.0@xxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <47A2EA32.76E4.0078.0@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.13 (2006-08-11)
At 08:45 +0000 on 01 Feb (1201855522), Jan Beulich wrote:
> @@ -1034,8 +1047,10 @@ static int fixup_page_fault(unsigned lon
>      struct vcpu   *v = current;
>      struct domain *d = v->domain;
>  
> -    /* No fixups in interrupt context or when interrupts are disabled. */
> -    if ( in_irq() || !(regs->eflags & X86_EFLAGS_IF) )
> +    /* No fixups in interrupt context, when interrupts are disabled, or
> +     * when a reserved bit was found to be set. */
> +    if ( in_irq() || !(regs->eflags & X86_EFLAGS_IF) ||
> +         (regs->error_code & PFEC_reserved_bit) )
>          return 0;
>  
>      if ( unlikely(IN_HYPERVISOR_RANGE(addr)) )

The shadow pagetable code deliberately introduces invalid pagetable
entries as part of its fast-path treatment of MMIO and not-present
entries in the guest tables, so paging_fault needs to be called for
PFEC_reserved_bit faults.

Cheers,

Tim.

-- 
Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Principal Software Engineer, Citrix Systems (R&D) Ltd.
[Company #02300071, SL9 0DZ, UK.]

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