From: Keir Fraser Subject: Re: Xen cpufreq support status: how to notify hypervisor of frequency change? Date: Tue, 11 Apr 2006 09:25:16 +0100 Message-ID: References: <200604081829.00179.yourst@yourst.com> <200604102005.38814.yourst@yourst.com> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200604102005.38814.yourst@yourst.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Matt T. Yourst" Cc: yourst@cs.binghamton.edu, xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 11 Apr 2006, at 01:05, Matt T. Yourst wrote: > Note that I only implemented this for powernow-k8 right now, since > that's the > only hardware I could test it on. It's very obvious how to adapt it to > the > other cpufreq drivers, by just replacing rdmsr and wrmsr with the Xen > wrapper > versions I provided, and adding in the setcpufreq hypercall at the end. All this stuff should be done by emulating the MSR writes in emulate_privileged_op() in arch/x86/traps.c. This will avoid any modification of Linux at all. Currently there's only simple filtering of MSR write attempts, but picking up on cpu-freq MSR accesses on e.g., AMD systems and also resync'ing the local clock would not be difficult. -- Keir