diff options
author | john.levon@sun.com <john.levon@sun.com> | 2007-01-23 19:06:31 -0800 |
---|---|---|
committer | john.levon@sun.com <john.levon@sun.com> | 2007-01-23 19:06:31 -0800 |
commit | 95d3856e97242a79e735138e71d6c8ab54b2beef (patch) | |
tree | 067e65d191cd6cced6fb891680702d8496e601ea /linux-2.6-xen-sparse/arch | |
parent | 1fd75e7150f0d132a4932dbd94777fff76afb8f0 (diff) | |
download | xen-95d3856e97242a79e735138e71d6c8ab54b2beef.tar.gz xen-95d3856e97242a79e735138e71d6c8ab54b2beef.tar.bz2 xen-95d3856e97242a79e735138e71d6c8ab54b2beef.zip |
Close save-after-restore race.
Make xc_linux_save() wait for the frame_list_list MFN to be updated by the
domain before trying to use it. Make Linux set the top-level MFN /after/
updating the other MFN lists.
Signed-off-by: John Levon <john.levon@sun.com>
Diffstat (limited to 'linux-2.6-xen-sparse/arch')
-rw-r--r-- | linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c | 4 | ||||
-rw-r--r-- | linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c b/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c index 946ecffb8d..4d0d6e0558 100644 --- a/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c +++ b/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c @@ -1736,8 +1736,6 @@ void __init setup_arch(char **cmdline_p) * frames that make up the p2m table. Used by save/restore */ pfn_to_mfn_frame_list_list = alloc_bootmem_low_pages(PAGE_SIZE); - HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list_list = - virt_to_mfn(pfn_to_mfn_frame_list_list); fpp = PAGE_SIZE/sizeof(unsigned long); for (i=0, j=0, k=-1; i< max_pfn; i+=fpp, j++) { @@ -1754,6 +1752,8 @@ void __init setup_arch(char **cmdline_p) virt_to_mfn(&phys_to_machine_mapping[i]); } HYPERVISOR_shared_info->arch.max_pfn = max_pfn; + HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list_list = + virt_to_mfn(pfn_to_mfn_frame_list_list); } /* diff --git a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c index 8b3b67ad95..f49110cf90 100644 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c @@ -817,8 +817,6 @@ void __init setup_arch(char **cmdline_p) * save/restore. */ pfn_to_mfn_frame_list_list = alloc_bootmem_pages(PAGE_SIZE); - HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list_list = - virt_to_mfn(pfn_to_mfn_frame_list_list); fpp = PAGE_SIZE/sizeof(unsigned long); for (i=0, j=0, k=-1; i< end_pfn; i+=fpp, j++) { @@ -835,6 +833,8 @@ void __init setup_arch(char **cmdline_p) virt_to_mfn(&phys_to_machine_mapping[i]); } HYPERVISOR_shared_info->arch.max_pfn = end_pfn; + HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list_list = + virt_to_mfn(pfn_to_mfn_frame_list_list); } } |