From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Hopwood Subject: Re: Porting of Guest OS Date: Sat, 01 Jan 2005 02:26:57 +0000 Message-ID: <41D60A71.1000801@blueyonder.co.uk> References: <41D50271.7050806@blueyonder.co.uk> Reply-To: david.nospam.hopwood@blueyonder.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: xen-devel-admin@lists.sourceforge.net Errors-To: xen-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: xen-devel@lists.sourceforge.net List-Id: xen-devel@lists.xenproject.org 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. > 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: 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 ------------------------------------------------------- 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