ia64/xen-unstable
changeset 6129:5ec5f6960507
Fix loop iterator aliasing in x86/32 memory initialisation.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Thu Aug 11 21:52:22 2005 +0000 (2005-08-11) |
parents | 57b3fdca5dae |
children | f507ca15ae00 |
files | xen/arch/x86/x86_32/mm.c |
line diff
1.1 --- a/xen/arch/x86/x86_32/mm.c Thu Aug 11 21:38:58 2005 +0000 1.2 +++ b/xen/arch/x86/x86_32/mm.c Thu Aug 11 21:52:22 2005 +0000 1.3 @@ -150,7 +150,7 @@ void __init zap_low_mappings(l2_pgentry_ 1.4 void subarch_init_memory(struct domain *dom_xen) 1.5 { 1.6 unsigned long m2p_start_mfn; 1.7 - int i; 1.8 + unsigned int i, j; 1.9 1.10 /* 1.11 * We are rather picky about the layout of 'struct pfn_info'. The 1.12 @@ -174,12 +174,12 @@ void subarch_init_memory(struct domain * 1.13 { 1.14 m2p_start_mfn = l2e_get_pfn( 1.15 idle_pg_table_l2[l2_linear_offset(RDWR_MPT_VIRT_START) + i]); 1.16 - for ( i = 0; i < L2_PAGETABLE_ENTRIES; i++ ) 1.17 + for ( j = 0; j < L2_PAGETABLE_ENTRIES; j++ ) 1.18 { 1.19 - frame_table[m2p_start_mfn+i].count_info = PGC_allocated | 1; 1.20 + frame_table[m2p_start_mfn+j].count_info = PGC_allocated | 1; 1.21 /* Ensure it's only mapped read-only by domains. */ 1.22 - frame_table[m2p_start_mfn+i].u.inuse.type_info = PGT_gdt_page | 1; 1.23 - page_set_owner(&frame_table[m2p_start_mfn+i], dom_xen); 1.24 + frame_table[m2p_start_mfn+j].u.inuse.type_info = PGT_gdt_page | 1; 1.25 + page_set_owner(&frame_table[m2p_start_mfn+j], dom_xen); 1.26 } 1.27 } 1.28 }