# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1225104560 0
# Node ID efc0a4065ee1fd76b010ff6e1d09d865ea1ec50e
# Parent b99ab7f88a8205f4ecfc6c1c002d6256e1115c17
x86_32: Lock in map_domain_page() may be taken with IRQs disabled, and
hence must *always* disable IRQs.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
xen/arch/x86/x86_32/domain_page.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff -r b99ab7f88a82 -r efc0a4065ee1 xen/arch/x86/x86_32/domain_page.c
--- a/xen/arch/x86/x86_32/domain_page.c Mon Oct 27 10:29:39 2008 +0000
+++ b/xen/arch/x86/x86_32/domain_page.c Mon Oct 27 10:49:20 2008 +0000
@@ -43,7 +43,7 @@ void *map_domain_page(unsigned long mfn)
void *map_domain_page(unsigned long mfn)
{
unsigned long va;
- unsigned int idx, i;
+ unsigned int idx, i, flags;
struct vcpu *v;
struct mapcache_domain *dcache;
struct mapcache_vcpu *vcache;
@@ -69,7 +69,7 @@ void *map_domain_page(unsigned long mfn)
goto out;
}
- spin_lock(&dcache->lock);
+ spin_lock_irqsave(&dcache->lock, flags);
/* Has some other CPU caused a wrap? We must flush if so. */
if ( unlikely(dcache->epoch != vcache->shadow_epoch) )
@@ -105,7 +105,7 @@ void *map_domain_page(unsigned long mfn)
set_bit(idx, dcache->inuse);
dcache->cursor = idx + 1;
- spin_unlock(&dcache->lock);
+ spin_unlock_irqrestore(&dcache->lock, flags);
l1e_write(&dcache->l1tab[idx], l1e_from_pfn(mfn, __PAGE_HYPERVISOR));
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|