Re: Introspection API development

Stefan Hajnoczi
2016-08-04T12:49:04Z

[-- Attachment #1: Type: text/plain, Size: 1249 bytes --]

On Wed, Aug 03, 2016 at 11:25:07PM -0400, Stephen Pape wrote:
> Hello all,
>
> For my own purposes, I've been modifying KVM to support introspection.
> I have a project that uses Xen's "vm event" API, and I'm trying to get
> things working with KVM as well. Our implementation needs to be able
> to map guest memory directly. I have seen the qemu patch used by
> libvmi, but they handle memory reads and writes through a socket,
> which just won't work for us. I'm also looking to add other types of
> hooks, and patching qemu seems too limited.
>
> My approach involves modifying the kernel driver to export a
> /dev/virt/ filesystem. I suppose I could do it all via /dev/kvm ioctls
> as well.
>
> My (relatively minor) patch allows processes besides the launching
> process to do things like map guest memory and read VCPU states for a
> VM. Soon, I'll be looking into adding support for handling events (cr3
> writes, int3 traps, etc.). Eventually, an event should come in, a
> program will handle it (while able to read memory/registers), and then
> resume the VCPU.

Why not put your code into QEMU if your end goal is to handle the
vmexit?

Can you describe the use case and software you are developing?

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]