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

Re: [Xen-devel] [PATCH 4/8] x86/AMD: distinguish compute units from hyper-threads



>>> On 12.07.18 at 15:02, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 11/07/18 13:07, Jan Beulich wrote:
>> Fam17 replaces CUs by HTs, which we should reflect accordingly, even if
>> the difference is not very big. The most relevant change (requiring some
>> code restructuring) is that the topoext feature no longer means there is
>> a valid CU ID.
>>
>> Take the opportunity and convert wrongly plain int variables in
>> set_cpu_sibling_map() to unsigned int.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>>
>> --- a/xen/arch/x86/cpu/amd.c
>> +++ b/xen/arch/x86/cpu/amd.c
>> @@ -504,17 +504,23 @@ static void amd_get_topology(struct cpui
>>                  u32 eax, ebx, ecx, edx;
>>  
>>                  cpuid(0x8000001e, &eax, &ebx, &ecx, &edx);
>> -                c->compute_unit_id = ebx & 0xFF;
>>                  c->x86_num_siblings = ((ebx >> 8) & 0x3) + 1;
>> +
>> +            if (c->x86 < 0x17)
>> +                    c->compute_unit_id = ebx & 0xFF;
>> +            else {
>> +                    c->cpu_core_id = ebx & 0xFF;
>> +                    c->x86_max_cores /= c->x86_num_siblings;
>> +            }
> 
> The indentation here is odd.  It turns out the function uses entirely
> 8-spaces rather than tabs, like the rest of the file.

Ouch - didn't notice this.

> Would you mind either retaining spaces, or fixing up the entire function
> (probably easiest as a prereq patch) ?

I'll fix this up here, not in a prereq patch (for backporting's sake).
I'll consider adding a follow-up patch.

Jan



_______________________________________________
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®.