ia64/xen-unstable
changeset 4895:24dfd18ea63e
bitkeeper revision 1.1159.258.120 (42848bfe8kMyWWcBA64rq7h7l7AyoA)
Shadow code bug fix (found by Ian) that was breaking refcounts, and subsequently
causing migration problems.
Shadow code bug fix (found by Ian) that was breaking refcounts, and subsequently
causing migration problems.
author | mafetter@fleming.research |
---|---|
date | Fri May 13 11:14:06 2005 +0000 (2005-05-13) |
parents | 783e437809b6 |
children | bb9587c88f65 8d8e644fea51 |
files | xen/arch/x86/memory.c |
line diff
1.1 --- a/xen/arch/x86/memory.c Thu May 12 19:03:36 2005 +0000 1.2 +++ b/xen/arch/x86/memory.c Fri May 13 11:14:06 2005 +0000 1.3 @@ -1607,13 +1607,14 @@ int do_update_va_mapping(unsigned long p 1.4 unsigned l2_idx = page_nr >> (L2_PAGETABLE_SHIFT - L1_PAGETABLE_SHIFT); 1.5 l2_pgentry_t gpde = linear_l2_table[l2_idx]; 1.6 unsigned long gpfn = l2_pgentry_val(gpde) >> PAGE_SHIFT; 1.7 + unsigned long spfn; 1.8 1.9 - if (get_shadow_status(&d->mm, gpfn)) 1.10 + if ((spfn = (get_shadow_status(&d->mm, gpfn) & PSH_pfn_mask))) 1.11 { 1.12 - unsigned long *gl1e = map_domain_mem(gpfn << PAGE_SHIFT); 1.13 + unsigned long *sl1e = map_domain_mem(spfn << PAGE_SHIFT); 1.14 unsigned l1_idx = page_nr & (ENTRIES_PER_L1_PAGETABLE - 1); 1.15 - gl1e[l1_idx] = sval; 1.16 - unmap_domain_mem(gl1e); 1.17 + sl1e[l1_idx] = sval; 1.18 + unmap_domain_mem(sl1e); 1.19 put_shadow_status(&d->mm); 1.20 1.21 perfc_incrc(shadow_update_va_fail1);