Skip to contentSkip to conversation

Minor fix to the fast emulation patch.

PATCH In review Gianluca Guida 2 participants 3 messages Feb 19, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Minor fix to the fast emulation patch.

Hello,

The fast emulation path patch introduced a bug when we have an event injection during a write to a pagetable: after removing shadows we still jump to the done label, releasing the lock even if we aren't grabbing it.

Inline patch fixes this.

xen/arch/x86/mm/shadow/multi.c +1 -1
diff -r 8848d9e07584 xen/arch/x86/mm/shadow/multi.c
@@ -3020,7 +3020,7 @@ static int sh_page_fault(struct vcpu *v,
                      "injection: cr2=%#lx, mfn=%#lx\n", 
                      va, mfn_x(gmfn));
             sh_remove_shadows(v, gmfn, 0 /* thorough */, 1 /* must succeed */);
-            goto done;
+            return EXCRET_fault_fixed;
         }
     }
#1 lore raw

Oh, good spot. My overlook when moving unlock before that snippet. It doesn't occur in our stress test, and my rough feeling is to observe such warning once per months. Thanks for finding it. :-)

Thanks,
Kevin

Quoted 27 lines

From: Gianluca Guida
Sent: 2008年2月19日 8:28

Hello,

The fast emulation path patch introduced a bug when we have an event injection during a write to a pagetable: after removing shadows we still jump to the done label, releasing the lock even if we aren't grabbing it.

Inline patch fixes this.

diff -r 8848d9e07584 xen/arch/x86/mm/shadow/multi.c

xen/arch/x86/mm/shadow/multi.c +1 -1
@@ -3020,7 +3020,7 @@ static int sh_page_fault(struct vcpu *v,
                     "injection: cr2=%#lx, mfn=%#lx\n", 
                     va, mfn_x(gmfn));
            sh_remove_shadows(v, gmfn, 0 /* thorough */, 1 /* 
 must succeed */);
-            goto done;
+            return EXCRET_fault_fixed;
        }
    }
#2 lore raw

At Tue, 19 Feb 2008 08:49:41 +0800,

Quoted 3 lines · Kevin

Oh, good spot. My overlook when moving unlock before that snippet. It doesn't occur in our stress test, and my rough feeling is to observe such warning once per months. Thanks for finding it. :-)

I actually see it happening often in windows compilation tests (e.g. 5-6 times in a single run of a Windows DDK build). That's how I noticed it. :)

Thanks,
Gianl.