[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH for-4.11 1/2] x86/cpu: get more information out from *_init_levelling



Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.