From: Gleb Natapov <gleb@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: SPA <infinite.questions@gmail.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: Correct way of tracking reads on given gfn ?
Date: Mon, 9 Sep 2013 15:29:21 +0300 [thread overview]
Message-ID: <20130909122921.GT17294@redhat.com> (raw)
In-Reply-To: <522DA88E.6060906@redhat.com>
On Mon, Sep 09, 2013 at 12:53:02PM +0200, Paolo Bonzini wrote:
> 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.
>
Dropping all sptes will also work, but trapping each read access will be dog slow. QEMU
emulation will be much faster.
--
Gleb.
next prev parent reply other threads:[~2013-09-09 12:29 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
2013-09-09 12:29 ` Gleb Natapov [this message]
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=20130909122921.GT17294@redhat.com \
--to=gleb@redhat.com \
--cc=infinite.questions@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
/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