KVM: MMU: Don't drop accessed bit while updating an spte
authorAvi Kivity <avi@redhat.com>
Sun, 6 Jun 2010 12:46:44 +0000 (15:46 +0300)
committerAvi Kivity <avi@redhat.com>
Mon, 2 Aug 2010 03:40:21 +0000 (06:40 +0300)
commitb79b93f92cb3b66b89d75525fdfd2454b1e1f446
tree0ca735431e67c58ff4b69578dc56bdd6e875eebb
parenta9221dd5ec125fbec1702fae016c6d2ea1a9a3da
KVM: MMU: Don't drop accessed bit while updating an spte

__set_spte() will happily replace an spte with the accessed bit set with
one that has the accessed bit clear.  Add a helper update_spte() which checks
for this condition and updates the page flag if needed.

Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/mmu.c