angler-fishThe Vulnerability History Project

KVM: MMU: Fix SMP shadow instantiation race

      There is a race where VCPU0 is shadowing a pagetable entry while VCPU1
is updating it, which results in a stale shadow copy.

Fix that by comparing the contents of the cached guest pte with the
current guest pte after write-protecting the guest pagetable.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
    
commit 7819026eefee53eaaac3fdce1a2f157c7ea943fe
+8 -4
+21 -8
expand_less