Don't unshadow when the shadow l2 is the current used shadow table.

Otherwise, when destroying the domain, if the current sl2 is unpinned
then the shadow page will be freed without accquire the shadow_lock.
This may also improve the performance due to avoiding uncessary
unshadow.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2005-12-08 15:21:36 +01:00
1 parent 064a4d414b
commit bc70813814
2 files changed
+8

No files matched your search

+4
View File
@@ -1450,6 +1450,7 @@ static int resync_all(struct domain *d, u32 stype)
int changed;
u32 min_max_shadow, min_max_snapshot;
int min_shadow, max_shadow, min_snapshot, max_snapshot;
struct vcpu *v;
ASSERT(shadow_lock_is_acquired(d));
@@ -1739,6 +1740,9 @@ static int resync_all(struct domain *d, u32 stype)
if ( unlikely(unshadow) )
{
for_each_vcpu(d, v)
if(smfn == pagetable_get_pfn(v->arch.shadow_table))
return need_flush;
perfc_incrc(unshadow_l2_count);
shadow_unpin(smfn);
#if CONFIG_PAGING_LEVELS == 2
+4
View File
@@ -2326,6 +2326,7 @@ static int resync_all(struct domain *d, u32 stype)
int changed;
u32 min_max_shadow, min_max_snapshot;
int min_shadow, max_shadow, min_snapshot, max_snapshot;
struct vcpu *v;
ASSERT(shadow_lock_is_acquired(d));
@@ -2527,6 +2528,9 @@ static int resync_all(struct domain *d, u32 stype)
if ( unlikely(unshadow) )
{
for_each_vcpu(d, v)
if(smfn == pagetable_get_pfn(v->arch.shadow_table))
return need_flush;
perfc_incrc(unshadow_l2_count);
shadow_unpin(smfn);
if ( unlikely(shadow_mode_external(d)) )
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.