diff options
author | Tim Deegan <tim@xen.org> | 2013-04-09 10:30:33 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-04-09 10:30:33 +0200 |
commit | 69b0fbfe6036516303a7058b0a182c925c3c56c8 (patch) | |
tree | 165af8490f981351eee56e933e27766dabf86e62 /xen/arch/x86/domain_page.c | |
parent | c3a2148192705592d38407ba9919eb1eb151a153 (diff) | |
download | xen-69b0fbfe6036516303a7058b0a182c925c3c56c8.tar.gz xen-69b0fbfe6036516303a7058b0a182c925c3c56c8.tar.bz2 xen-69b0fbfe6036516303a7058b0a182c925c3c56c8.zip |
x86: serialize page table population in map_domain_page_global()
Looking at map_domain_page_global, there doesn't seem to be any locking
preventing two CPUs from populating a page of global-map l1es at the
same time.
Signed-off-by: Tim Deegan <tim@xen.org>
Diffstat (limited to 'xen/arch/x86/domain_page.c')
-rw-r--r-- | xen/arch/x86/domain_page.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/arch/x86/domain_page.c b/xen/arch/x86/domain_page.c index 7421e03358..efda6afd8b 100644 --- a/xen/arch/x86/domain_page.c +++ b/xen/arch/x86/domain_page.c @@ -354,9 +354,10 @@ void *map_domain_page_global(unsigned long mfn) set_bit(idx, inuse); inuse_cursor = idx + 1; + pl1e = virt_to_xen_l1e(va); + spin_unlock(&globalmap_lock); - pl1e = virt_to_xen_l1e(va); if ( !pl1e ) return NULL; l1e_write(pl1e, l1e_from_pfn(mfn, __PAGE_HYPERVISOR)); |