From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
Keir Fraser <keir@xen.org>,
Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.com>,
suravee.suthikulpanit@amd.com
Subject: Re: [PATCH v2 2/3] x86/AMD: support further feature masking MSRs
Date: Mon, 7 Apr 2014 13:09:08 +0100 [thread overview]
Message-ID: <53429564.70102@citrix.com> (raw)
In-Reply-To: <5342ADEE0200007800006219@nat28.tlf.novell.com>
On 07/04/14 12:53, Jan Beulich wrote:
>>>> On 07.04.14 at 12:23, <andrew.cooper3@citrix.com> wrote:
>> On 07/04/14 10:43, Jan Beulich wrote:
>>> /* AMD processors prior to family 10h required a 32-bit password */
>>> if (c->x86 >= 0x10) {
>>> wrmsr(MSR_K8_FEATURE_MASK, feat_edx, feat_ecx);
>>> wrmsr(MSR_K8_EXT_FEATURE_MASK, extfeat_edx, extfeat_ecx);
>>> + if (!skip_l7s0_eax_ebx)
>>> + wrmsr(MSR_AMD_L7S0_FEATURE_MASK, l7s0_ebx, l7s0_eax);
>>> + if (!skip_thermal_ecx) {
>>> + rdmsr(MSR_AMD_THRM_FEATURE_MASK, eax, edx);
>>> + wrmsr(MSR_AMD_THRM_FEATURE_MASK, thermal_ecx, edx);
>>> + }
>>> } else {
>>> wrmsr_amd(MSR_K8_FEATURE_MASK, feat_edx, feat_ecx);
>>> wrmsr_amd(MSR_K8_EXT_FEATURE_MASK, extfeat_edx, extfeat_ecx);
>> While editing this, can we remove this crazy split between wrmsr and
>> wrmsr_amd ? It is safe to use wrmsr_amd in all cases where wrmsr is needed.
> I'm against this - the way it is now makes it very explicit where the
> extra input is required.
>
> Jan
>
It bloats the function, which would be less bad if it were an __init
function.
A comment can perfectly easily say /* Password required for fam 10h and
older */
~Andrew
next prev parent reply other threads:[~2014-04-07 12:09 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-07 9:36 [PATCH v2 0/3] x86/AMD: feature masking adjustments Jan Beulich
2014-04-07 9:41 ` [PATCH v2 1/3] x86/AMD: feature masking is unavailable on Fam11 Jan Beulich
2014-04-07 10:14 ` Andrew Cooper
2014-04-07 9:43 ` [PATCH v2 2/3] x86/AMD: support further feature masking MSRs Jan Beulich
2014-04-07 10:23 ` Andrew Cooper
2014-04-07 11:53 ` Jan Beulich
2014-04-07 12:09 ` Andrew Cooper [this message]
2014-04-07 15:21 ` Boris Ostrovsky
2014-04-08 7:15 ` Jan Beulich
2014-04-08 13:50 ` Boris Ostrovsky
2014-04-08 14:02 ` Jan Beulich
2014-04-08 14:14 ` Boris Ostrovsky
2014-04-08 14:33 ` Jan Beulich
2014-04-08 15:14 ` Boris Ostrovsky
2014-04-09 15:39 ` Aravind Gopalakrishnan
2014-04-09 15:50 ` Jan Beulich
2014-04-07 9:43 ` [PATCH v2 3/3] x86/AMD: clean up pre-canned family/revision handling for CPUID masking Jan Beulich
2014-04-07 10:48 ` Andrew Cooper
2014-04-07 11:55 ` 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=53429564.70102@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=aravind.gopalakrishnan@amd.com \
--cc=keir@xen.org \
--cc=suravee.suthikulpanit@amd.com \
--cc=xen-devel@lists.xenproject.org \
/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.