All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Hopwood <david.nospam.hopwood@blueyonder.co.uk>
To: xen-devel@lists.sourceforge.net
Subject: Re: Porting of Guest OS
Date: Sat, 01 Jan 2005 02:26:57 +0000	[thread overview]
Message-ID: <41D60A71.1000801@blueyonder.co.uk> (raw)
In-Reply-To: <Pine.LNX.4.58.0412310839080.16678@linux.site>

Ronald G. Minnich wrote:
> On Fri, 31 Dec 2004, David Hopwood wrote:
> 
>>It should be possible to make it work by using the hypervisor interface
>>equivalents of rdmsr/wrmsr. See section 9.11 of the IA32 architecture
>>manual Volume 3.

<http://developer.intel.com/design/pentium4/manuals/index_new.htm>
<ftp://download.intel.com/design/Pentium4/manuals/25366814.pdf>

> interesting. Part of the microcode upgrade process is pointing the CPU at 
> a chunk of memory that it ingests as the new microcode. I found the whole 
> business a bit dicey to think about from ring 1, but I guess it ought to 
> be fine.

I really shouldn't post at that time of the morning. First, it should have
been obvious that DOM0 only runs on a single CPU, since multiprocessor
guests aren't supported yet. Second, the architecture manual only gives
sample code for doing the update in real mode; it seems to imply that this
will also work from protected mode, but it's not quite clear what the
requirements are. Based on the code of the Linux kernel driver:

   <http://lxr.linux.no/source/arch/i386/kernel/microcode.c#L288>

it looks like EAX just has to contain a linear address when Linux is
running on bare hardware (the driver casts a pointer in the data segment,
which is zero-based, to an unsigned int). In order to use a generic
wrmsr hypercall, DOM0 would have to calculate what linear address Xen
should use, which although possible (I think), is a horrible layering
violation that would depend on implementation details of Xen.

It would be much cleaner to either:

  - add a privileged hypercall specifically to allow DOM0 to update the
    microcode on all processors (essentially just copy the Linux driver
    into Xen),
  - compile the latest microcode into Xen and have it do the update at
    boot. This would require people to upgrade Xen in order to upgrade the
    microcode.

-- 
David Hopwood <david.nospam.hopwood@blueyonder.co.uk>



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt

  reply	other threads:[~2005-01-01  2:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-30  0:12 Porting of Guest OS Amitabh Tamhane
2004-12-30  2:58 ` Fajar A. Nugraha
2004-12-30  8:14   ` Amitabh Tamhane
2004-12-30  8:35     ` Fajar A. Nugraha
2004-12-30 14:50       ` M.A. Williamson
2004-12-31  1:14         ` Amitabh Tamhane
2004-12-31  1:58           ` Ronald G. Minnich
2004-12-31  7:40             ` David Hopwood
2004-12-31  7:49               ` Fajar A. Nugraha
2004-12-31  8:02                 ` David Hopwood
2004-12-31 15:40               ` Ronald G. Minnich
2005-01-01  2:26                 ` David Hopwood [this message]
2004-12-31  9:53             ` Keir Fraser
2004-12-31 15:44               ` Ronald G. Minnich
2004-12-31 15:42           ` M.A. Williamson
  -- strict thread matches above, loose matches on Subject: below --
2004-12-30  0:13 Amitabh Tamhane

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=41D60A71.1000801@blueyonder.co.uk \
    --to=david.nospam.hopwood@blueyonder.co.uk \
    --cc=xen-devel@lists.sourceforge.net \
    /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.