x86, shadow: Avoid duplicates in fixup tables.

Avoid entering duplicates in fixup tables, reducing fixup evictions.

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
This commit is contained in:
Keir Fraser committed 2008-12-18 11:28:25 +00:00
1 parent cea7a6cd7b
commit 2f0f4ad09f
1 file changed
+9
+9
View File
@@ -627,6 +627,15 @@ void oos_fixup_add(struct vcpu *v, mfn_t gmfn,
idx = (idx + 1) % SHADOW_OOS_PAGES;
if ( mfn_x(oos[idx]) == mfn_x(gmfn) )
{
int i;
for ( i = 0; i < SHADOW_OOS_FIXUPS; i++ )
{
if ( mfn_valid(oos_fixup[idx].smfn[i])
&& (mfn_x(oos_fixup[idx].smfn[i]) == mfn_x(smfn))
&& (oos_fixup[idx].off[i] == off) )
return;
}
next = oos_fixup[idx].next;
if ( mfn_x(oos_fixup[idx].smfn[next]) != INVALID_MFN )
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.