From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: ke.yu@intel.com, kevin.tian@intel.com, lenb@kernel.org,
xen-devel@lists.xensource.com, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] processor passthru - upload _Cx and _Pxx data to hypervisor (v5).
Date: Fri, 24 Feb 2012 10:08:07 -0500 [thread overview]
Message-ID: <20120224150807.GA17879@phenom.dumpdata.com> (raw)
In-Reply-To: <4F47733E020000780007497D@nat28.tlf.novell.com>
On Fri, Feb 24, 2012 at 10:23:42AM +0000, Jan Beulich wrote:
> >>> On 23.02.12 at 23:31, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> wrote:
> > This module (processor-passthru) collects the information that the cpufreq
> > drivers and the ACPI processor code save in the 'struct acpi_processor' and
> > then uploads it to the hypervisor.
>
> Thus looks conceptually wrong to me - there shouldn't be a need for a
> CPUFreq driver to be loaded in Dom0 (or your module should masquerade
> as the one and only suitable one).
I piggyback on the generic cpufreq drivers to collect the information they
have evaluated.
I can make the driver a cpufreq one but there does not seem to be a way
from the kernel to force a specific driver to say "use me". I could write
it naturally, but not sure what the usage case is except for the driver
I wrote. But perhaps there is also for the cpufreq powernow-k8 and acpi-processor
so that they can function without the need for strict compile order
(where powernow-k8 MUST be loaded before acpi-processor).
>
> > On the hypervisor side, it requires this patch on AMD:
> > # HG changeset patch
> > # Parent aea8cfac8cf1afe397f2e1d422a852008d8a83fe
> > traps: AMD PM RDMSRs (MSR_K8_PSTATE_CTRL, etc)
> >
> > The restriction to read and write the AMD power management MSRs is gated if
> > the
> > domain 0 is the PM domain (so FREQCTL_dom0_kernel is set). But we can
> > relax this restriction and allow the privileged domain to read the MSRs
> > (but not write). This allows the priviliged domain to harvest the power
> > management information (ACPI _PSS states) and send it to the hypervisor.
>
> Why would accessing these MSRs be necessary here, when it isn't
> for non-pvops? Perhaps only because you want a CPUFreq driver
> loaded?
Correct. The powernow-k8
>
> Jan
>
> > This patch works fine with older classic dom0 (2.6.32) and with
> > AMD K7 and K8 boxes.
> >
> > Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> > diff -r aea8cfac8cf1 xen/arch/x86/traps.c
> > --- a/xen/arch/x86/traps.c Thu Feb 23 13:23:02 2012 -0500
> > +++ b/xen/arch/x86/traps.c Thu Feb 23 13:29:00 2012 -0500
> > @@ -2484,7 +2484,7 @@ static int emulate_privileged_op(struct
> > case MSR_K8_PSTATE7:
> > if ( boot_cpu_data.x86_vendor != X86_VENDOR_AMD )
> > goto fail;
> > - if ( !is_cpufreq_controller(v->domain) )
> > + if ( !is_cpufreq_controller(v->domain) && !IS_PRIV(v->domain) )
> > {
> > regs->eax = regs->edx = 0;
> > break;
>
>
next prev parent reply other threads:[~2012-02-24 15:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-23 22:31 [PATCH] processor passthru - upload _Cx and _Pxx data to hypervisor (v5) Konrad Rzeszutek Wilk
2012-02-23 22:31 ` [PATCH 1/3] xen/setup/pm/acpi: Remove the call to boot_option_idle_override Konrad Rzeszutek Wilk
2012-02-23 22:31 ` [PATCH 2/3] xen/enlighten: Expose MWAIT and MWAIT_LEAF if hypervisor OKs it Konrad Rzeszutek Wilk
2012-02-24 10:32 ` Jan Beulich
2012-02-24 10:32 ` Jan Beulich
2012-02-24 23:52 ` Konrad Rzeszutek Wilk
2012-02-27 8:14 ` Jan Beulich
2012-02-27 8:14 ` Jan Beulich
2012-02-23 22:31 ` [PATCH 3/3] xen/processor-passthru: Provide an driver that passes struct acpi_processor data to the hypervisor Konrad Rzeszutek Wilk
2012-02-24 10:23 ` [PATCH] processor passthru - upload _Cx and _Pxx data to hypervisor (v5) Jan Beulich
2012-02-24 10:23 ` Jan Beulich
2012-02-24 15:08 ` Konrad Rzeszutek Wilk [this message]
2012-02-25 0:21 ` Konrad Rzeszutek Wilk
2012-02-27 8:19 ` Jan Beulich
2012-02-27 8:19 ` Jan Beulich
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=20120224150807.GA17879@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=JBeulich@suse.com \
--cc=ke.yu@intel.com \
--cc=kevin.tian@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xensource.com \
/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.