aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/shadow.h
diff options
context:
space:
mode:
authorTim Deegan <Tim.Deegan@xensource.com>2007-02-08 10:44:53 +0000
committerTim Deegan <Tim.Deegan@xensource.com>2007-02-08 10:44:53 +0000
commit49d6f8401bf93c7a5ac411db31d7a84a77df66b4 (patch)
treef8232109dd217febe1471a66025e9f19c42757fe /xen/include/asm-x86/shadow.h
parent51efffe71249ca3250c3c4be0192525c41a7dc81 (diff)
downloadxen-49d6f8401bf93c7a5ac411db31d7a84a77df66b4.tar.gz
xen-49d6f8401bf93c7a5ac411db31d7a84a77df66b4.tar.bz2
xen-49d6f8401bf93c7a5ac411db31d7a84a77df66b4.zip
[XEN] When removing pages, drop shadow refs before complaining about refcount.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
Diffstat (limited to 'xen/include/asm-x86/shadow.h')
-rw-r--r--xen/include/asm-x86/shadow.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/xen/include/asm-x86/shadow.h b/xen/include/asm-x86/shadow.h
index 2afc0b0562..a4a489dcf5 100644
--- a/xen/include/asm-x86/shadow.h
+++ b/xen/include/asm-x86/shadow.h
@@ -355,8 +355,9 @@ int sh_remove_all_mappings(struct vcpu *v, mfn_t target_mfn);
static inline void
shadow_drop_references(struct domain *d, struct page_info *p)
{
- /* See the comment about locking in sh_remove_all_mappings */
- sh_remove_all_mappings(d->vcpu[0], _mfn(page_to_mfn(p)));
+ if ( unlikely(shadow_mode_enabled(d)) )
+ /* See the comment about locking in sh_remove_all_mappings */
+ sh_remove_all_mappings(d->vcpu[0], _mfn(page_to_mfn(p)));
}
/* Remove all shadows of the guest mfn. */