diff options
author | cl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk> | 2006-03-29 16:50:59 +0100 |
---|---|---|
committer | cl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk> | 2006-03-29 16:50:59 +0100 |
commit | 4df87c91b1f5c65f96a98cdf66ee783dac649329 (patch) | |
tree | 37346e504ac477d331b2dcd521ca7b9741aa1f2c /xen/include/asm-x86/shadow.h | |
parent | a10d8554f8deecbfd3937964c7c031592c7ac365 (diff) | |
download | xen-4df87c91b1f5c65f96a98cdf66ee783dac649329.tar.gz xen-4df87c91b1f5c65f96a98cdf66ee783dac649329.tar.bz2 xen-4df87c91b1f5c65f96a98cdf66ee783dac649329.zip |
Free shadows of any pages which are released by a domain back to Xen.
This should fix the "Assertion '! IS_INVALID_M2P_ENTRY(gpfn)'"-crash in
free_shadow_page on domain destruction.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
Diffstat (limited to 'xen/include/asm-x86/shadow.h')
-rw-r--r-- | xen/include/asm-x86/shadow.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xen/include/asm-x86/shadow.h b/xen/include/asm-x86/shadow.h index ca988bbece..28d50466ea 100644 --- a/xen/include/asm-x86/shadow.h +++ b/xen/include/asm-x86/shadow.h @@ -1506,6 +1506,7 @@ static inline void guest_physmap_remove_page( struct domain *d, unsigned long gpfn, unsigned long mfn) { struct domain_mmap_cache c1, c2; + unsigned long type; if ( likely(!shadow_mode_translate(d)) ) return; @@ -1514,6 +1515,8 @@ static inline void guest_physmap_remove_page( domain_mmap_cache_init(&c2); shadow_lock(d); shadow_sync_and_drop_references(d, mfn_to_page(mfn)); + while ( (type = shadow_max_pgtable_type(d, gpfn, NULL)) != PGT_none ) + free_shadow_page(__shadow_status(d, gpfn, type)); set_p2m_entry(d, gpfn, -1, &c1, &c2); set_gpfn_from_mfn(mfn, INVALID_M2P_ENTRY); shadow_unlock(d); |