public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: SPA <infinite.questions@gmail.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: Correct way of tracking reads on given gfn ?
Date: Mon, 09 Sep 2013 12:53:02 +0200	[thread overview]
Message-ID: <522DA88E.6060906@redhat.com> (raw)
In-Reply-To: <CALSEb2cXDDOnUM6ZvHtYcv+dE_M2J+4Oy_EcR4mZWW2hcBXW-w@mail.gmail.com>

Il 09/09/2013 12:22, SPA ha scritto:
> Thanks Paolo.
> 
> Is there a way where reads would trap ?
> 
> I explored a bit on PM_PRESENT_MASK.  Though its not READ bit, but a
> PRESENT bit,  it looks like it should generate traps on reads if this
> bit is reset. From code, looks like rmap_write_protect() like function
> I stated in previous mail should do. Would this approach work ? Are
> there any glaring problems with this approach ?

I cannot say right away.  Another way could be to set reserved bits to
generate EPT misconfigurations.  See ept_set_mmio_spte_mask and
is_mmio_spte.

This would trap both reads and writes.

Paolo

  reply	other threads:[~2013-09-09 10:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2013-09-09 12:29       ` Gleb Natapov
2013-09-10  1:12         ` Arthur Chunqi Li
2013-09-10  6:08           ` Gleb Natapov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=522DA88E.6060906@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=infinite.questions@gmail.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox