Re: [PATCH v2 1/2] x86/cpufeatures: Combine word 11 and 12 into new scattered features word 11
From: Borislav Petkov
Date: Wed Jun 19 2019 - 13:41:45 EST
On Mon, Jun 17, 2019 at 11:00:15AM -0700, Fenghua Yu wrote:
> @@ -832,33 +857,6 @@ void get_cpu_cap(struct cpuinfo_x86 *c)
> c->x86_capability[CPUID_D_1_EAX] = eax;
> }
>
> - /* Additional Intel-defined flags: level 0x0000000F */
> - if (c->cpuid_level >= 0x0000000F) {
> -
> - /* QoS sub-leaf, EAX=0Fh, ECX=0 */
> - cpuid_count(0x0000000F, 0, &eax, &ebx, &ecx, &edx);
> - c->x86_capability[CPUID_F_0_EDX] = edx;
> -
> - if (cpu_has(c, X86_FEATURE_CQM_LLC)) {
> - /* will be overridden if occupancy monitoring exists */
> - c->x86_cache_max_rmid = ebx;
> -
> - /* QoS sub-leaf, EAX=0Fh, ECX=1 */
> - cpuid_count(0x0000000F, 1, &eax, &ebx, &ecx, &edx);
> - c->x86_capability[CPUID_F_1_EDX] = edx;
> -
> - if ((cpu_has(c, X86_FEATURE_CQM_OCCUP_LLC)) ||
> - ((cpu_has(c, X86_FEATURE_CQM_MBM_TOTAL)) ||
> - (cpu_has(c, X86_FEATURE_CQM_MBM_LOCAL)))) {
> - c->x86_cache_max_rmid = ecx;
> - c->x86_cache_occ_scale = ebx;
> - }
> - } else {
> - c->x86_cache_max_rmid = -1;
> - c->x86_cache_occ_scale = -1;
> - }
> - }
> -
> /* AMD-defined flags: level 0x80000001 */
> eax = cpuid_eax(0x80000000);
> c->extended_cpuid_level = eax;
What I meant with having a separate patch doing the carve out is to have
a single patch doing *only* code movement - no changes, no nothing. So
that it is clear what happens. Intermixing code movement and changes is
a bad idea and hard to review.
IOW, I did this:
---