From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Juergen Gross <jgross@suse.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Wei Liu <wei.liu2@citrix.com>, Jan Beulich <JBeulich@suse.com>
Subject: [PATCH for-4.11 1/2] x86/cpu: get more information out from *_init_levelling
Date: Fri, 6 Apr 2018 10:36:44 +0100 [thread overview]
Message-ID: <20180406093645.6444-2-wei.liu2@citrix.com> (raw)
In-Reply-To: <20180406093645.6444-1-wei.liu2@citrix.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
xen/arch/x86/cpu/amd.c | 9 +++++----
xen/arch/x86/cpu/intel.c | 9 +++++----
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c
index fc9677f020..6e3d0ae2b0 100644
--- a/xen/arch/x86/cpu/amd.c
+++ b/xen/arch/x86/cpu/amd.c
@@ -265,7 +265,7 @@ static void __init noinline amd_init_levelling(void)
const struct cpuidmask *m = NULL;
if (probe_cpuid_faulting())
- return;
+ goto out;
probe_masking_msrs();
@@ -341,6 +341,10 @@ static void __init noinline amd_init_levelling(void)
cpuidmask_defaults._6c &= (~0ULL << 32) | ecx;
}
+ if (levelling_caps)
+ ctxt_switch_masking = amd_ctxt_switch_masking;
+
+out:
if (opt_cpu_info) {
printk(XENLOG_INFO "Levelling caps: %#x\n", levelling_caps);
printk(XENLOG_INFO
@@ -354,9 +358,6 @@ static void __init noinline amd_init_levelling(void)
(uint32_t)cpuidmask_defaults._7ab0,
(uint32_t)cpuidmask_defaults._6c);
}
-
- if (levelling_caps)
- ctxt_switch_masking = amd_ctxt_switch_masking;
}
/*
diff --git a/xen/arch/x86/cpu/intel.c b/xen/arch/x86/cpu/intel.c
index 9477965321..4be760788c 100644
--- a/xen/arch/x86/cpu/intel.c
+++ b/xen/arch/x86/cpu/intel.c
@@ -166,7 +166,7 @@ static void intel_ctxt_switch_masking(const struct vcpu *next)
static void __init noinline intel_init_levelling(void)
{
if (probe_cpuid_faulting())
- return;
+ goto out;
probe_masking_msrs();
@@ -207,6 +207,10 @@ static void __init noinline intel_init_levelling(void)
cpuidmask_defaults.Da1 &= (~0ULL << 32) | eax;
}
+ if (levelling_caps)
+ ctxt_switch_masking = intel_ctxt_switch_masking;
+
+out:
if (opt_cpu_info) {
printk(XENLOG_INFO "Levelling caps: %#x\n", levelling_caps);
@@ -220,9 +224,6 @@ static void __init noinline intel_init_levelling(void)
(uint32_t)cpuidmask_defaults.e1cd,
(uint32_t)cpuidmask_defaults.Da1);
}
-
- if (levelling_caps)
- ctxt_switch_masking = intel_ctxt_switch_masking;
}
static void early_init_intel(struct cpuinfo_x86 *c)
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-04-06 9:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-06 9:36 [PATCH for-4.11 0/2] x86: two small cleanup patches Wei Liu
2018-04-06 9:36 ` Wei Liu [this message]
2018-04-06 9:40 ` [PATCH for-4.11 1/2] x86/cpu: get more information out from *_init_levelling Andrew Cooper
2018-04-06 9:43 ` Wei Liu
2018-04-06 9:36 ` [PATCH for-4.11 2/2] x86: remove unused parameter from smp_prepare_cpus Wei Liu
2018-04-06 9:40 ` Andrew Cooper
2018-04-06 16:49 ` Juergen Gross
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=20180406093645.6444-2-wei.liu2@citrix.com \
--to=wei.liu2@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=jgross@suse.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.