From: Gregory Haskins <ghaskins@novell.com>
To: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, avi@redhat.com, glommer@redhat.com,
aliguori@us.ibm.com
Subject: [KVM PATCH] xinterface
Date: Thu, 16 Jul 2009 11:19:40 -0400 [thread overview]
Message-ID: <20090716150323.29318.17714.stgit@dev.haskins.net> (raw)
(Applies to kvm.git/master:84a3c081)
For details, please read the patch header.
Background: The original vbus code was tightly integrated with kvm.ko. Avi
suggested that we abstract the interfaces such that it could live outside
of kvm. Part of that discussion turned into what is now irqfd/ioeventfd
checked into kvm.git. The other part of the discussion (pointer-translation)
was suggested to be addressed by having the memory-slot info replicated
across interested modules.
I was looking into what is required for essentially hooking the
SET_MEMORY_REGION operations in QEMU yesterday by talking to Anthony and
Glauber on IRC. We came to the conclusion that we could possibly
do a minor cleanup on the various callsites of SET_MEMORY_REGION so that
a wrapper function was used. I could then add a hook at this wrapper
to essentially get notification events whenever memory-slots change, and
could forward this info to my module appropriate.
Anthony made the observation that replicating the slots info is
not the cleanest design, and I tend to agree with him. Its replicating
data and is going to be prone to synchronization problems, etc. He
also mentioned that other modules like virtio-net would want access
to this same information at some point, so perhaps a general solution was in
order.
Therefore, I stepped back from that initial approach of replicating slots
and instead provided a abstract mechanism to utilize the original structures.
This code has been tested with a prototype of the vbus-v4 code and appears
to function properly.
Comments/suggestions?
Regards,
-Greg
---
Gregory Haskins (1):
KVM: introduce "xinterface" API for external interaction with guests
arch/x86/Kbuild | 4 +
arch/x86/kvm/Makefile | 4 +
arch/x86/kvm/x86.c | 1
include/linux/kvm.h | 2 +
include/linux/kvm_host.h | 6 ++
include/linux/kvm_xinterface.h | 58 ++++++++++++++++
virt/kvm/kvm_main.c | 72 ++++++++++++++++++++
virt/kvm/xinterface.c | 147 ++++++++++++++++++++++++++++++++++++++++
8 files changed, 293 insertions(+), 1 deletions(-)
create mode 100644 include/linux/kvm_xinterface.h
create mode 100644 virt/kvm/xinterface.c
--
Signature
next reply other threads:[~2009-07-16 15:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-16 15:19 Gregory Haskins [this message]
2009-07-16 15:19 ` [KVM PATCH] KVM: introduce "xinterface" API for external interaction with guests Gregory Haskins
2009-07-16 15:30 ` Sam Ravnborg
2009-07-16 15:31 ` Gregory Haskins
2009-07-16 15:37 ` Anthony Liguori
2009-07-16 15:47 ` Gregory Haskins
2009-07-16 16:09 ` Anthony Liguori
2009-07-16 16:52 ` Arnd Bergmann
2009-07-16 18:22 ` Gregory Haskins
2009-07-16 18:53 ` Gregory Haskins
2009-07-16 19:38 ` Zan Lynx
2009-07-16 19:48 ` Gregory Haskins
2009-07-16 19:46 ` Arnd Bergmann
2009-07-17 0:25 ` Gregory Haskins
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=20090716150323.29318.17714.stgit@dev.haskins.net \
--to=ghaskins@novell.com \
--cc=aliguori@us.ibm.com \
--cc=avi@redhat.com \
--cc=glommer@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@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