From: Avi Kivity <avi@redhat.com>
To: Alexander Graf <agraf@suse.de>
Cc: Ed Swierk <eswierk@aristanetworks.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: Userspace MSR handling
Date: Sun, 24 May 2009 15:07:20 +0300 [thread overview]
Message-ID: <4A193878.4030206@redhat.com> (raw)
In-Reply-To: <790CB8FA-1660-4F6B-BEEC-AAB9724DDD64@suse.de>
Alexander Graf wrote:
>
>
>
>
> On 22.05.2009, at 22:11, Ed Swierk <eswierk@aristanetworks.com> wrote:
>
>> I'm experimenting with Gerd's excellent work on integrating Xenner
>> into Qemu (http://git.et.redhat.com/?p=qemu-kraxel.git). I'm using it
>> to boot a FreeBSD guest that uses the Xen paravirtual network drivers.
>> Decoupling the Xen PV guest support from the hypervisor really
>> simplifies deployment.
>>
>> The current implementation doesn't yet support KVM, as KVM has to
>> handle a Xen-specific MSR in order to map hypercall pages into the
>> guest physical address space. A recent thread on this list discussed
>> the issue but didn't come to a resolution.
>>
>> Does it make sense to implement a generic mechanism for handling MSRs
>> in userspace? I imagine a mechanism analogous to PIO, adding a
>> KVM_EXIT_MSR code and a msr type in the kvm_run struct.
>>
>> I'm happy to take a stab at implementing this if no one else is
>> already working on it.
>
> I think it's a great idea.
> I was thinking of doing something similar for ppc's HIDs/SPRs too, so
> a userspace app can complement the kernel's vcpu support.
>
> Also by falling back to userspace all those MSR read/write patches I
> send wouldn't have to go in-kernel anymore :)
I'm wary of this. It spreads the burden of implementing the cpu
emulation across the kernel/user boundary. We don't really notice with
qemu as userspace, because we have a cpu emulator on both sides, but
consider an alternative userspace that only emulates devices and has no
cpu emulation support. We want to support that scenario well.
Moreover, your patches only stub out those MSRs. As soon as you
implement the more interesting bits, you'll find yourself back in the
kernel.
I agree however that the Xen hypercall page protocol has no business in
kvm.ko. But can't we implement it in emu? Xenner conveniently places a
ring 0 stub in the guest, we could trap the MSR there and emulate it
entirely in the guest.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2009-05-24 12:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-22 20:11 Userspace MSR handling Ed Swierk
2009-05-23 8:57 ` Alexander Graf
2009-05-24 12:07 ` Avi Kivity [this message]
2009-05-24 16:15 ` Alexander Graf
2009-05-26 11:31 ` Avi Kivity
2009-05-25 11:03 ` Gerd Hoffmann
2009-05-25 11:20 ` Avi Kivity
2009-05-25 11:29 ` Gerd Hoffmann
2009-05-25 11:31 ` Avi Kivity
2009-05-27 16:12 ` Ed Swierk
2009-05-27 16:28 ` Avi Kivity
2009-05-27 17:09 ` Ed Swierk
2009-05-27 19:16 ` Gerd Hoffmann
2009-05-27 23:00 ` Ed Swierk
2009-05-28 8:53 ` Avi Kivity
2009-05-29 9:47 ` Gerd Hoffmann
2009-05-31 8:21 ` Avi Kivity
2009-05-25 11:16 ` Gerd Hoffmann
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=4A193878.4030206@redhat.com \
--to=avi@redhat.com \
--cc=agraf@suse.de \
--cc=eswierk@aristanetworks.com \
--cc=kvm@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 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.