]> git.karo-electronics.de Git - karo-tx-linux.git/commit
KVM: MMU: Fix potential race setting upper shadow ptes on nonpae hosts
authorAvi Kivity <avi@qumranet.com>
Wed, 23 Jul 2008 08:43:43 +0000 (11:43 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Aug 2008 19:43:00 +0000 (12:43 -0700)
commit8c5a4a12d8d5bf025a09a576a0b5c62e0167423c
tree098f64ebd822ff4b09df7a563f12a5be624ea8f7
parentc857ebba6025350232c87d89e459338f139a50ab
KVM: MMU: Fix potential race setting upper shadow ptes on nonpae hosts

Original-Commit-Hash: c23a6fe17abf8562e675465f8d55ba1a551d314d

The direct mapped shadow code (used for real mode and two dimensional paging)
sets upper-level ptes using direct assignment rather than calling
set_shadow_pte().  A nonpae host will split this into two writes, which opens
up a race if another vcpu accesses the same memory area.

Fix by calling set_shadow_pte() instead of assigning directly.

Noticed by Izik Eidus.

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kvm/mmu.c