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

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.

v3: fix i386 pte exchange code in patch 3
    add missing __set_spte() to drop_spte() in patch 2

v2: fix incorrect code transformations in first patch

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         |   88 +++++++++++++++++++++++++++++++------------
 arch/x86/kvm/paging_tmpl.h |   13 +++---
 2 files changed, 69 insertions(+), 32 deletions(-)


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

end of thread, other threads:[~2010-07-05 13:55 UTC | newest]

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).