ia64/xen-unstable

changeset 18955:636c685d9622

[IA64] fix mis-setting ed bit for itlb entry for hvm domain.

This patch fixes a windows BSOD issue caused by mis-setting pte's ED bit
for itlb entry.
For hash vTLB, it uses unified tlb and doesn't differentiate itc and dtc
in its implementation, so itlb_miss handler may reference dtlb entry in
hash vTLB.
But it may result in issues, because dtlb's ED bit may be different with
itlb's setting.
Since the case is very rare, so just purge the corresponding entry in hash
vTLB and let guest OS to determin how to set ED bit for itlb mapping once
found it.

Signed-off-by : Xiantao Zhang <xiantao.zhang@intel.com>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Mon Jan 05 12:24:58 2009 +0900 (2009-01-05)
parents 4422219acd93
children 29a0ecb8a711
files xen/arch/ia64/vmx/vtlb.c
line diff
     1.1 --- a/xen/arch/ia64/vmx/vtlb.c	Mon Jan 05 12:24:58 2009 +0900
     1.2 +++ b/xen/arch/ia64/vmx/vtlb.c	Mon Jan 05 12:24:58 2009 +0900
     1.3 @@ -678,11 +678,20 @@ thash_data_t *vtlb_lookup(VCPU *v, u64 v
     1.4          cch = vtlb_thash(hcb->pta, va, vrr.rrval, &tag);
     1.5          do {
     1.6              if (cch->etag == tag && cch->ps == ps)
     1.7 -                return cch;
     1.8 +                goto found;
     1.9              cch = cch->next;
    1.10          } while(cch);
    1.11      }
    1.12      return NULL;
    1.13 +found:
    1.14 +    if (unlikely(!cch->ed && is_data == ISIDE_TLB)) {
    1.15 +        /*The case is very rare, and it may lead to incorrect setting
    1.16 +          for itlb's ed bit! Purge it from hash vTLB and let guest os
    1.17 +          determin the ed bit of the itlb entry.*/
    1.18 +        vtlb_purge(v, va, ps);
    1.19 +        cch = NULL;
    1.20 +    }
    1.21 +    return cch;
    1.22  }
    1.23  
    1.24