From: Chris Wright <chrisw@sous-sol.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Virtualization Mailing List <virtualization@lists.osdl.org>
Subject: Re: New CPUID/MSR driver; virtualization hooks
Date: Wed, 4 Apr 2007 18:16:40 -0700 [thread overview]
Message-ID: <20070405011640.GL19575@sequoia.sous-sol.org> (raw)
In-Reply-To: <461447F2.9010807@zytor.com>
* H. Peter Anvin (hpa@zytor.com) wrote:
> I have finally gotten off the pot and finished writing up my new
> CPUID/MSR driver, which contains support for registers that need
> arbitrary GPRs touched. For i386 vs x86-64 compatibility, both use an
> x86-64 register image (16 64-bit register fields); this allows 32-bit
> userspace to access the full 64-bit image if the kernel is 64 bits.
>
> Anyway, this presumably requires new paravirtualization hooks. The
> patch is at:
>
> http://www.kernel.org/pub/linux/kernel/people/hpa/new-cpuid-msr.patch
Not mirrored out yet
>
> ... and a git tree is at ...
>
> http://git.kernel.org/?p=linux/kernel/git/hpa/linux-2.6-cpuidmsr.git;a=summary
Bleah, and gitweb is unhappy ATM too.
> I'm posting this here to give the paravirt maintainers an opportunity to
> comment. Presumably the functions that need to be paravirtualized are
> the ones represented by the functions do_cpuid(), do_rdmsr() and
> do_wrmsr(): they take a cpu number, an input register image, and an
> output register image, and return either 0 or -EIO (in case of a trap.)
Yes, so currently cpuid, for example, is like this:
do_cpuid
cpuid
__cpuid
Where __cpuid is
native_cpuid() on !CONFIG_PARAVIRT (include/asm-i386/processor.h)
(and this is real asm("cpuid"))
and
paravirt_ops.cpuid() on CONFIG_PARAVIRT (
Without having seen the patch yet, you'll need to make sure
that the final point which is issuing asm("cpuid") is wrapped
and split to CONFIG_PARAVIRT and non CONFIG_PARAVIRT modes.
Similar for rdmsr:
do_rdmsr
rdmsr_eio
rdmsr_safe
Where rdmsr is paravirtualized
rdmsr is asm("rdmsr") on !CONFIG_PARAVIRT (include/asm-i386/msr.h)
and
paravirt_ops.read_msr() on CONFIG_PARAVIRT (include/asm-i386/paravirt.h)
Similar for do_wrmsr.
Does that answer your question?
thanks,
-chris
next prev parent reply other threads:[~2007-04-05 1:16 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-05 0:50 New CPUID/MSR driver; virtualization hooks H. Peter Anvin
2007-04-05 1:16 ` Chris Wright [this message]
2007-04-05 1:23 ` H. Peter Anvin
2007-04-05 5:17 ` Zachary Amsden
2007-04-05 18:03 ` H. Peter Anvin
2007-04-05 21:09 ` Zachary Amsden
2007-04-05 21:09 ` H. Peter Anvin
2007-04-05 21:25 ` Zachary Amsden
2007-04-05 21:17 ` H. Peter Anvin
2007-04-05 21:27 ` Zachary Amsden
2007-04-05 21:40 ` H. Peter Anvin
2007-04-05 21:43 ` Jeremy Fitzhardinge
2007-04-05 21:43 ` Zachary Amsden
2007-04-05 21:49 ` Jeremy Fitzhardinge
2007-04-05 21:59 ` H. Peter Anvin
2007-04-05 22:19 ` Jeremy Fitzhardinge
2007-04-05 22:31 ` H. Peter Anvin
2007-04-05 21:54 ` Chris Wright
2007-04-05 1:48 ` Tony Breeds
2007-04-05 5:00 ` Zachary Amsden
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=20070405011640.GL19575@sequoia.sous-sol.org \
--to=chrisw@sous-sol.org \
--cc=hpa@zytor.com \
--cc=virtualization@lists.osdl.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;
as well as URLs for NNTP newsgroup(s).