]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: MMU: Use cmpxchg for pte updates on walk_addr()
authorMarcelo Tosatti <marcelo@kvack.org>
Fri, 7 Dec 2007 12:56:58 +0000 (07:56 -0500)
committerAvi Kivity <avi@qumranet.com>
Wed, 30 Jan 2008 15:53:19 +0000 (17:53 +0200)
commit25abf4ade9b0394de0924c78378b26c558beb0de
treea7e1cd372a26b36d9fc4d6a7a12523e07f7a9f5e
parent007b29e2d25ced640d830d3c6d2b8c21eab1e059
KVM: MMU: Use cmpxchg for pte updates on walk_addr()

In preparation for multi-threaded guest pte walking, use cmpxchg()
when updating guest pte's. This guarantees that the assignment of the
dirty bit can't be lost if two CPU's are faulting the same address
simultaneously.

[avi: fix kunmap_atomic() parameters]

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/paging_tmpl.h