From: Tim Deegan Subject: Re: [PATCH] x86: adjust reserved bit page fault handling Date: Fri, 1 Feb 2008 09:28:15 +0000 Message-ID: <20080201092815.GA19416@york.uk.xensource.com> References: <47A2EA32.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Return-path: Content-Disposition: inline In-Reply-To: <47A2EA32.76E4.0078.0@novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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 Principal Software Engineer, Citrix Systems (R&D) Ltd. [Company #02300071, SL9 0DZ, UK.]