KVM: MMU: Use ptep_user for cmpxchg_gpte()
authorTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Sun, 1 May 2011 05:33:07 +0000 (14:33 +0900)
committerAvi Kivity <avi@redhat.com>
Sun, 22 May 2011 12:48:14 +0000 (08:48 -0400)
commitc8cfbb555eb3632bf3dcbe1a591c1f4d0c28681c
tree4d7b9e26a8f1eee7c598bb132a6cd24e3aa4b211
parent85722cda308c0ad7390dc910139b2ce58c11b9c4
KVM: MMU: Use ptep_user for cmpxchg_gpte()

The address of the gpte was already calculated and stored in ptep_user
before entering cmpxchg_gpte().

This patch makes cmpxchg_gpte() to use that to make it clear that we
are using the same address during walk_addr_generic().

Note that the unlikely annotations are used to show that the conditions
are something unusual rather than for performance.

Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/paging_tmpl.h