mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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:
1 parent
cea7a6cd7b
commit
2f0f4ad09f
1 file changed
+9
@@ -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 )
|
||||
|
||||