From: Avi Kivity <avi@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Alexander Graf <agraf@suse.de>,
Ed Swierk <eswierk@aristanetworks.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: Userspace MSR handling
Date: Mon, 25 May 2009 14:20:35 +0300 [thread overview]
Message-ID: <4A1A7F03.1020106@redhat.com> (raw)
In-Reply-To: <4A1A7B14.5000205@redhat.com>
Gerd Hoffmann wrote:
> On 05/24/09 14:07, Avi Kivity wrote:
>> 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.
>
> No. The case where handling the msr writes is needed is the pv-on-hvm
> driver support. For pv kernels it could be handled by emu if it would
> be needed, but pv kernels don't need the msr stuff in the first place.
> There should be a longish mail about that in the list archive ...
Yes, I forgot.
Device drivers have no business writing to cpu model specific
registers. I hate to bring that fugliness to kvm but I do want to
support Xen guests.
It should have been implemented as mmio. Maybe implement an ioctl that
converts rdmsr/wrmsr to equivalent mmios?
struct kvm_msr_mmio {
__u32 msr;
__u32 nr;
__u64 mmio;
__u32 flags;
__u32 pad[3];
}
In any case it should reject the standard msr ranges to prevent Alex
from implementing cpu emulation in userspace.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2009-05-25 11:20 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
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 [this message]
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=4A1A7F03.1020106@redhat.com \
--to=avi@redhat.com \
--cc=agraf@suse.de \
--cc=eswierk@aristanetworks.com \
--cc=kraxel@redhat.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.