Wei, Gang
2009-Feb-26 13:04 UTC
[Xen-devel] [PATCH 4/4] ACPI: Enable THERM_CONTROL MSR write for dom0 even cpufreq=xen
Enable THERM_CONTROL MSR write for dom0 even cpufreq=xen Signed-off-by: Wei Gang <gang.wei@intel.com> diff -r bd683e0397b4 xen/arch/x86/traps.c --- a/xen/arch/x86/traps.c Tue Feb 17 22:29:38 2009 +0800 +++ b/xen/arch/x86/traps.c Wed Feb 25 11:23:01 2009 +0800 @@ -2187,10 +2187,17 @@ static int emulate_privileged_op(struct case MSR_IA32_MPERF: case MSR_IA32_APERF: case MSR_IA32_PERF_CTL: + if ( boot_cpu_data.x86_vendor != X86_VENDOR_INTEL ) + goto fail; + if ( !is_cpufreq_controller(v->domain) ) + break; + if ( wrmsr_safe(regs->ecx, eax, edx) != 0 ) + goto fail; + break; case MSR_IA32_THERM_CONTROL: if ( boot_cpu_data.x86_vendor != X86_VENDOR_INTEL ) goto fail; - if ( !is_cpufreq_controller(v->domain) ) + if ( d->domain_id != 0 ) break; if ( wrmsr_safe(regs->ecx, eax, edx) != 0 ) goto fail; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2009-Mar-02 10:56 UTC
[Xen-devel] Re: [PATCH 4/4] ACPI: Enable THERM_CONTROL MSR write for dom0 even cpufreq=xen
On 26/02/2009 13:04, "Wei, Gang" <gang.wei@intel.com> wrote:> Enable THERM_CONTROL MSR write for dom0 even cpufreq=xen > > Signed-off-by: Wei Gang <gang.wei@intel.com>If dom0 is not the cpufreq controller then it is not pinned onto particular physical CPUs and fiddling with MSRs is rather suspect. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Wei, Gang
2009-Mar-03 01:23 UTC
[Xen-devel] RE: [PATCH 4/4] ACPI: Enable THERM_CONTROL MSR write for dom0 even cpufreq=xen
>> Enable THERM_CONTROL MSR write for dom0 even cpufreq=xen >> >> Signed-off-by: Wei Gang <gang.wei@intel.com> > > If dom0 is not the cpufreq controller then it is not pinned onto particular > physical CPUs and fiddling with MSRs is rather suspect.Yes, you are right. But what we really need is simply pinning dom0 vcpus, not dom0 acting as cpufreq controller, am I right? We do expect the MSR throttling still work while xen behaves as the cpufreq controller. Jimmy _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2009-Mar-03 08:52 UTC
[Xen-devel] Re: [PATCH 4/4] ACPI: Enable THERM_CONTROL MSR write for dom0 even cpufreq=xen
On 03/03/2009 01:23, "Wei, Gang" <gang.wei@intel.com> wrote:>>> Enable THERM_CONTROL MSR write for dom0 even cpufreq=xen >>> >>> Signed-off-by: Wei Gang <gang.wei@intel.com> >> >> If dom0 is not the cpufreq controller then it is not pinned onto particular >> physical CPUs and fiddling with MSRs is rather suspect. > > Yes, you are right. But what we really need is simply pinning dom0 vcpus, not > dom0 acting as cpufreq controller, am I right? > We do expect the MSR throttling still work while xen behaves as the cpufreq > controller.Then should the patch be dependent on opt_dom0_vcpus_pin? -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Wei, Gang
2009-Mar-03 08:59 UTC
[Xen-devel] RE: [PATCH 4/4] ACPI: Enable THERM_CONTROL MSR write for dom0 even cpufreq=xen
On Tuesday, March 03, 2009 4:52 PM, Keir Fraser wrote:> On 03/03/2009 01:23, "Wei, Gang" <gang.wei@intel.com> wrote: > >>>> Enable THERM_CONTROL MSR write for dom0 even cpufreq=xen >>>> >>>> Signed-off-by: Wei Gang <gang.wei@intel.com> >>> >>> If dom0 is not the cpufreq controller then it is not pinned onto particular >>> physical CPUs and fiddling with MSRs is rather suspect. >> >> Yes, you are right. But what we really need is simply pinning dom0 vcpus, not >> dom0 acting as cpufreq controller, am I right? >> We do expect the MSR throttling still work while xen behaves as the cpufreq >> controller. > > Then should the patch be dependent on opt_dom0_vcpus_pin?Oh, yes. We should add a check for opt_dom0_vcpus_pin. Jimmy _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Wei, Gang
2009-Mar-05 06:16 UTC
RE: [Xen-devel] RE: [PATCH 4/4] ACPI: Enable THERM_CONTROL MSR write for dom0 even cpufreq=xen
Here is the updated patch. Added check for opt_dom0_vcpus_pin. Jimmy _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Seemingly Similar Threads
- [PATCH 0 of 2] [RFC] Patches to work with processor-passthru driver (v1).
- [PATCH][Retry 1] 1/4: cpufreq/PowerNow! in Xen: Xen timer changes
- Is: drivers/cpufreq/cpufreq-xen.c Was:Re: [PATCH 2 of 2] linux-xencommons: Load processor-passthru
- [PATCH V2 1/2] cpufreq, xenpm: fix cpufreq and xenpm mismatch
- Can not modprobe acpi-cpufreq.ko in CentOS 5.2