public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Fix accessed bit tracking
@ 2010-06-06 13:06 Avi Kivity
  2010-06-06 13:06 ` [PATCH 1/4] KVM: MMU: Introduce drop_spte() Avi Kivity
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Avi Kivity @ 2010-06-06 13:06 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: kvm

The kvm mmu synchronizes shadow ptes using the mmu lock, however the cpu
will happily ignore the lock when setting the accessed bit.  This can cause
the accessed bit to be lost.  Luckily this only results in incorrect page
selection for swap.

This patchset fixes the problem by atomically updating the spte when
needed while taking care of the accessed bit.

Avi Kivity (4):
  KVM: MMU: Introduce drop_spte()
  KVM: MMU: Move accessed/dirty bit checks from rmap_remove() to
    drop_spte()
  KVM: MMU: Atomically check for accessed bit when dropping an spte
  KVM: MMU: Don't drop accessed bit while updating an spte

 arch/x86/kvm/mmu.c         |   91 +++++++++++++++++++++++++++++++------------
 arch/x86/kvm/paging_tmpl.h |   13 +++---
 2 files changed, 71 insertions(+), 33 deletions(-)


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-06-06 14:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-06 13:06 [PATCH 0/4] Fix accessed bit tracking Avi Kivity
2010-06-06 13:06 ` [PATCH 1/4] KVM: MMU: Introduce drop_spte() Avi Kivity
2010-06-06 14:33   ` Avi Kivity
2010-06-06 13:06 ` [PATCH 2/4] KVM: MMU: Move accessed/dirty bit checks from rmap_remove() to drop_spte() Avi Kivity
2010-06-06 13:06 ` [PATCH 3/4] KVM: MMU: Atomically check for accessed bit when dropping an spte Avi Kivity
2010-06-06 13:06 ` [PATCH 4/4] KVM: MMU: Don't drop accessed bit while updating " Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox