direct-io.hg

changeset 9468:d102a30417a7

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>
author cl349@firebug.cl.cam.ac.uk
date Wed Mar 29 16:50:59 2006 +0100 (2006-03-29)
parents 4c2d101a3228
children b3cb19d2b07f
files xen/include/asm-x86/shadow.h
line diff
     1.1 --- a/xen/include/asm-x86/shadow.h	Wed Mar 29 16:47:46 2006 +0100
     1.2 +++ b/xen/include/asm-x86/shadow.h	Wed Mar 29 16:50:59 2006 +0100
     1.3 @@ -1506,6 +1506,7 @@ static inline void guest_physmap_remove_
     1.4      struct domain *d, unsigned long gpfn, unsigned long mfn)
     1.5  {
     1.6      struct domain_mmap_cache c1, c2;
     1.7 +    unsigned long type;
     1.8  
     1.9      if ( likely(!shadow_mode_translate(d)) )
    1.10          return;
    1.11 @@ -1514,6 +1515,8 @@ static inline void guest_physmap_remove_
    1.12      domain_mmap_cache_init(&c2);
    1.13      shadow_lock(d);
    1.14      shadow_sync_and_drop_references(d, mfn_to_page(mfn));
    1.15 +    while ( (type = shadow_max_pgtable_type(d, gpfn, NULL)) != PGT_none )
    1.16 +        free_shadow_page(__shadow_status(d, gpfn, type));
    1.17      set_p2m_entry(d, gpfn, -1, &c1, &c2);
    1.18      set_gpfn_from_mfn(mfn, INVALID_M2P_ENTRY);
    1.19      shadow_unlock(d);