ia64/xen-unstable
changeset 14859:6a4c6d8a00f5
Fix map_pages_to_xen() to atomically switch between valid mappings.
This is needed to successfully boot a debug=y build of xen on kvm.
Reported by Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
This is needed to successfully boot a debug=y build of xen on kvm.
Reported by Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author | kfraser@localhost.localdomain |
---|---|
date | Sun Apr 15 21:56:38 2007 +0100 (2007-04-15) |
parents | 249de074617f |
children | a9aa7c29eda8 |
files | xen/arch/x86/mm.c |
line diff
1.1 --- a/xen/arch/x86/mm.c Fri Apr 13 18:14:06 2007 +0100 1.2 +++ b/xen/arch/x86/mm.c Sun Apr 15 21:56:38 2007 +0100 1.3 @@ -3424,7 +3424,7 @@ int map_pages_to_xen( 1.4 { 1.5 /* Super-page mapping. */ 1.6 ol2e = *pl2e; 1.7 - l2e_write(pl2e, l2e_from_pfn(mfn, flags|_PAGE_PSE)); 1.8 + l2e_write_atomic(pl2e, l2e_from_pfn(mfn, flags|_PAGE_PSE)); 1.9 1.10 if ( (l2e_get_flags(ol2e) & _PAGE_PRESENT) ) 1.11 { 1.12 @@ -3454,14 +3454,14 @@ int map_pages_to_xen( 1.13 l1e_write(&pl1e[i], 1.14 l1e_from_pfn(l2e_get_pfn(*pl2e) + i, 1.15 l2e_get_flags(*pl2e) & ~_PAGE_PSE)); 1.16 - l2e_write(pl2e, l2e_from_pfn(virt_to_mfn(pl1e), 1.17 - __PAGE_HYPERVISOR)); 1.18 + l2e_write_atomic(pl2e, l2e_from_pfn(virt_to_mfn(pl1e), 1.19 + __PAGE_HYPERVISOR)); 1.20 local_flush_tlb_pge(); 1.21 } 1.22 1.23 pl1e = l2e_to_l1e(*pl2e) + l1_table_offset(virt); 1.24 ol1e = *pl1e; 1.25 - l1e_write(pl1e, l1e_from_pfn(mfn, flags)); 1.26 + l1e_write_atomic(pl1e, l1e_from_pfn(mfn, flags)); 1.27 if ( (l1e_get_flags(ol1e) & _PAGE_PRESENT) ) 1.28 local_flush_tlb_one(virt); 1.29