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 ?

--
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to