[Devel] [PATCH RHEL7 COMMIT] arch/x86: report cpuid:0000000d_1 in cpuinfo

Konstantin Khorenko khorenko at virtuozzo.com
Tue Oct 20 09:00:20 PDT 2015


The commit is pushed to "branch-rh7-3.10.0-229.7.2.vz7.9.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-229.7.2.vz7.8.9
------>
commit c72248f847cd4d933ce192eadc4265841fb65b84
Author: Vladimir Davydov <vdavydov at virtuozzo.com>
Date:   Tue Oct 20 20:00:20 2015 +0400

    arch/x86: report cpuid:0000000d_1 in cpuinfo
    
    Port diff-arch-x86-report-cpuid-0000000d_1-in-cpuinfo
    
    We want to mask it, therefore we should obtain it with raw cpuid
    instruction while reporting /proc/cpuinfo.
    
    https://jira.sw.ru/browse/PSBM-30577
    
    Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
    
    Acked-by: Cyrill Gorcunov <gorcunov at openvz.org>
    =============================================================================
    
    https://jira.sw.ru/browse/PSBM-33638
    
    Signed-off-by: Vladimir Davydov <vdavydov at virtuozzo.com>
---
 arch/x86/kernel/cpu/proc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/proc.c b/arch/x86/kernel/cpu/proc.c
index 77c7c82..1a95a06 100644
--- a/arch/x86/kernel/cpu/proc.c
+++ b/arch/x86/kernel/cpu/proc.c
@@ -67,7 +67,7 @@ static void init_cpu_flags(void *dummy)
 	int cpu = smp_processor_id();
 	struct cpu_flags *flags = &per_cpu(cpu_flags, cpu);
 	struct cpuinfo_x86 *c = &cpu_data(cpu);
-	unsigned int tmp1, tmp2;
+	unsigned int tmp1, tmp2, tmp3;
 	int i;
 
 	bitmap_zero((unsigned long *)flags, 32*NCAPINTS);
@@ -83,6 +83,10 @@ static void init_cpu_flags(void *dummy)
 	    c->extended_cpuid_level >= 0x80000001)
 		__do_cpuid_fault(0x80000001, 0, &tmp1, &tmp2,
 				 &flags->val[6], &flags->val[1]);
+
+	if (c->cpuid_level >= 0x0000000d)
+		__do_cpuid_fault(0x0000000d, 1, &flags->val[10],
+				 &tmp1, &tmp2, &tmp3);
 }
 
 static int show_cpuinfo(struct seq_file *m, void *v)



More information about the Devel mailing list