ia64/xen-unstable

changeset 3908:71408f3fa741

bitkeeper revision 1.1236.1.9 (421da0c9oRchQk9qH4h9W-dsF3I1Jg)

[PATCH] gpa-page-zero.patch

GPFN = 0 is a valid page frame and we shouldn't inject #PG into guest.

Signed-off-by: Arun Sharma <arun.sharma@intel.com>

Index: trunk/xen/arch/x86/vmx.c
===================================================================
author arun.sharma@intel.com[kaf24]
date Thu Feb 24 09:39:21 2005 +0000 (2005-02-24)
parents a456c4743c0f
children 33aa4ad8f9d3
files xen/arch/x86/vmx.c
line diff
     1.1 --- a/xen/arch/x86/vmx.c	Thu Feb 24 09:38:55 2005 +0000
     1.2 +++ b/xen/arch/x86/vmx.c	Thu Feb 24 09:39:21 2005 +0000
     1.3 @@ -108,7 +108,7 @@ static void inline __update_guest_eip(un
     1.4  static int vmx_do_page_fault(unsigned long va, struct xen_regs *regs) 
     1.5  {
     1.6      unsigned long eip;
     1.7 -    unsigned long gpa;
     1.8 +    unsigned long gpte, gpa;
     1.9      int result;
    1.10  
    1.11  #if VMX_DEBUG
    1.12 @@ -130,9 +130,10 @@ static int vmx_do_page_fault(unsigned lo
    1.13          return 0;
    1.14      }
    1.15  
    1.16 -    gpa = gva_to_gpa(va);
    1.17 -    if (!gpa)
    1.18 -        return 0;
    1.19 +    gpte = gva_to_gpte(va);
    1.20 +    if (!(gpte & _PAGE_PRESENT) )
    1.21 +            return 0;
    1.22 +    gpa = (gpte & PAGE_MASK) + (va & ~PAGE_MASK);
    1.23  
    1.24      if (mmio_space(gpa))
    1.25          handle_mmio(va, gpa);