public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Mihai Donțu" <mdontu@bitdefender.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Stephen Pape <srpape@gmail.com>,
	kvm@vger.kernel.org, Jan Kiszka <jan.kiszka@web.de>
Subject: Re: Introspection API development
Date: Thu, 4 Aug 2016 16:41:40 +0300	[thread overview]
Message-ID: <20160804164140.591d0e52@bitdefender.com> (raw)
In-Reply-To: <b2fae3ce-d4b8-d0a9-6e6b-51ebd78d572b@redhat.com>

On Thursday 04 August 2016 14:56:01 Paolo Bonzini wrote:
> On 04/08/2016 13:18, Mihai Donțu wrote:
> > The model we're aiming is: on a KVM host, out of the N running VM-s, one
> > has special privileges allowing it to manipulate the memory and vCPU
> > state of the others. We call that special VM an SVA (Security Virtual
> > Appliance) and it uses a channel (much like the one found on Xen -
> > evtchn) and a set of specific VMCALL-s to:
> > 
> >   * receive notifications from the host when a new VM is
> >     created/destroyed
> >   * manipulate the EPT of a specific VM
> >   * manipulate the vCPU state of a specific VM (GPRs)
> >   * manipulate the memory of a specific VM (insert code)  
> 
> No special VMs and hypercalls, please.  Xen is a microkernel at its
> core, KVM is not.  Just run a process on the host.

I personally have no problem with that approach, but I was thinking at
RHEV which uses the ESXi model: the "host OS" is pretty much locked
down and only runs the bare minimum, relying on "service VM-s" to
implement 3rd party features (not that I know of any for RHEV, yet).

> I'm not very convinced of manipulating the EPT page tables directly.
> There must be some higher-level abstraction.  For example, KVM has
> recently grown a new in-kernel interface to track dirty pages, and if
> anything you should export that one as ioctls, and make QEMU use the ioctls.

I merely gave EPT as an example of the type of low level access we'd
need. Obviously something generic would be much better, as we're also
looking at ARM.

> > Obviously we've tried the userspace / qemu approach since it would have
> > made development _much_ easier, but it's simply not "performant" enough.  
> 
> That reminds me of kdbus.  Without having even stated what the
> requirements are, "it's slow" is dogma rather than fact.  Even more so
> if the client is proprietary and hidden behind a black-box "appliance".

I apologise, I might have given the impression that we jumped into the
"it's too slow" wagon too fast. We're looking at both approaches
actually, I'm merely the only one looking into VirtIO. However, I don't
have any numbers yet. :-(

> vhost-user is performant enough for line-speed packet processing.  It's
> obviously not the same thing as VM memory introspection, but it's a
> logical suggestion.

I'll have a look at that again, thanks for the hint!

Here is a small presentation of what we're trying to achieve for KVM:
https://events.linuxfoundation.org/sites/events/files/slides/Zero-Footprint%20Guest%20Memory%20Introspection%20from%20Xen%20_%20draft11.pdf

When I'm talking about speed, I might be a bit biased as I've been
involved in the performance improvements only on the Xen side and we
tried pretty hard to keep some code paths as simple as possible.

-- 
Mihai DONȚU

  reply	other threads:[~2016-08-04 14:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-04  3:25 Introspection API development Stephen Pape
2016-08-04  8:50 ` Paolo Bonzini
2016-08-04  8:55   ` Jan Kiszka
2016-08-04 11:18   ` Mihai Donțu
2016-08-04 12:44     ` Jan Kiszka
2016-08-04 13:57       ` Mihai Donțu
2016-08-04 12:56     ` Paolo Bonzini
2016-08-04 13:41       ` Mihai Donțu [this message]
2016-08-04 12:48 ` Stefan Hajnoczi
2016-08-04 15:08   ` Stephen Pape

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=20160804164140.591d0e52@bitdefender.com \
    --to=mdontu@bitdefender.com \
    --cc=jan.kiszka@web.de \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=srpape@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox