public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Correct way of tracking reads on given gfn ?
@ 2013-09-09  9:45 Sunil
  2013-09-09 10:08 ` Paolo Bonzini
  0 siblings, 1 reply; 7+ messages in thread
From: Sunil @ 2013-09-09  9:45 UTC (permalink / raw)
  To: kvm@vger.kernel.org

Hello List,

(1) What is the correct way of tracking reads on given gfn ?

Looks like functions rmap_write_protect(kvm, gfn) and
kvm_mmu_rmap_write_protect(kvm, gfn, slot) removes the write
permission for the given page, by flipping write bit using
PT_WRITABLE_MASK. Thus trapping writes.

For trapping reads, are there similar routines ? If not, I see
equivalent flag PM_PRESENT_MASK. Thus one way probably is writing
wrapper routines similar to above to flip both read(present) and write
bits. Or would it be just enough to drop the spte instead using
function drop_spte() ?

(2) Is kvm_flush_remote_tlbs() required after either of above approaches ?
Is kvm_flush_remote_tlbs() correct function to flush tlbs ?

--

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

end of thread, other threads:[~2013-09-10  6:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-09  9:45 Correct way of tracking reads on given gfn ? Sunil
2013-09-09 10:08 ` Paolo Bonzini
2013-09-09 10:22   ` SPA
2013-09-09 10:53     ` Paolo Bonzini
2013-09-09 12:29       ` Gleb Natapov
2013-09-10  1:12         ` Arthur Chunqi Li
2013-09-10  6:08           ` Gleb Natapov

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