All of lore.kernel.org
 help / color / mirror / Atom feed
* [Question] Intercept read access in KVM
@ 2012-11-15 11:43 R
  0 siblings, 0 replies; only message in thread
From: R @ 2012-11-15 11:43 UTC (permalink / raw)
  To: kvm

Hi, everyone

I am studying KVM code.
And I try to intercept a  guest's read access to a page using VMX and
EPT support.

According to Intel Manual, the lowest bit of the EPT page table entry
is used to
control read access to a page.

I modified the rmap_write_protect function to remove the
VMX_EPT_READABLE_MASK of a spte. This is  accomplish by changing the
new_spte parameter of  mmu_spte_update function.

But in KVM, it seems like it is used to indicate whether a page is
present or not. So this would trigger the
WARN_ON(!is_rmap_spte(new_spte)) and cause the Host to panic.

Why can not rmap_write_protect  be applied to set the spte to non-present.

Does drop_spte function is the only way to  intercept a read access of
a in guest page.

I use kvm-kmod-3.1 and linux kernel 3.1. Can anyone help if I do
anything wrong or there is another more elegant way to do it.

Thank U for answering.

--
Thanks
Rui Wu

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-11-15 11:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-15 11:43 [Question] Intercept read access in KVM R

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.