From: Gleb Natapov <gleb@redhat.com>
To: Arthur Chunqi Li <yzt356@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
SPA <infinite.questions@gmail.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: Correct way of tracking reads on given gfn ?
Date: Tue, 10 Sep 2013 09:08:39 +0300 [thread overview]
Message-ID: <20130910060838.GV17294@redhat.com> (raw)
In-Reply-To: <CABpY8MKa=bM9KkAgiGAqiKXfii-vHL++on518Dm2E_TVfBH6ew@mail.gmail.com>
On Tue, Sep 10, 2013 at 09:12:11AM +0800, Arthur Chunqi Li wrote:
> On Mon, Sep 9, 2013 at 8:29 PM, Gleb Natapov <gleb@redhat.com> wrote:
> > 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.
> Hi Gleb,
> I'm interested in this topic, what do you mean by QEMU emulation? Do
> you mean the functions in arch/x86/kvm/emulate.c? In what scenario
> will KVM call these functions?
>
No, I mean don't use KVM at all.
--
Gleb.
prev parent reply other threads:[~2013-09-10 6:08 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
2013-09-10 1:12 ` Arthur Chunqi Li
2013-09-10 6:08 ` Gleb Natapov [this message]
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=20130910060838.GV17294@redhat.com \
--to=gleb@redhat.com \
--cc=infinite.questions@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=yzt356@gmail.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 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.