[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Writing MSRs from Domain0


  • To: Holger Steinhaus <hsteinhaus@xxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
  • Date: Fri, 06 Oct 2006 10:20:32 +0100
  • Delivery-date: Fri, 06 Oct 2006 02:21:03 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcbpKKv76pWLgFUbEduvTAAX8io7RQ==
  • Thread-topic: [Xen-devel] Writing MSRs from Domain0



On 6/10/06 10:11, "Holger Steinhaus" <hsteinhaus@xxxxxx> wrote:

> I recently tried Xen 3.0.3-testing on my 2x Opteron-244 SMP machine.
> Everything works well exept one detail, which is not unimportant to me:
> the powernow-k8 driver fails to switch frequencies. A closer look on the
> powernow-k8 source reveals, that some MSR write operations seem to be
> without any effect. A rdmsr() before and after the  wrmsr() call reveals
> that no real change on the register ocurrs.
> 
> An older PowerNow patch from this list emulates MSR writes by DOM0_MSR
> hypercalls, but this call seems to be abandoned some time ago. Other
> routines in the kernel simply employ the rdmsr()/wrmsr() macros from the
> Linux kernel, as the current PowerNow drivers does. Whats the correct
> Xen-like way to maniputate a MSR from a Domain0?

Add the powernow MSRs to the white list (a switch statement ;-) in
emulate_privileged_op in xen/arch/x86/traps.c. This will allow the write to
succeed. Ensure you have a 1:1 correspondence between virtual CPUs and
physical CPUs for domain 0 (i.e., VCPU0 pinned to PPU0, etc). Cross your
fingers. :-)

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.