Re: [PATCH] x86/cpu: Avoid endless loop to get the number of cache leaves

From: Borislav Petkov
Date: Sat Dec 08 2018 - 06:12:43 EST


On Sat, Dec 08, 2018 at 10:46:54AM +0800, Pu Wen wrote:
> How about define CTYPE_MAX like this:
> #define CTYPE_MAX 4

How about you look at the definition of CPUID leaf 4 and think about it
a bit and realize that this is the wrong thing to do?

> It will return CTYPE_NULL when accessing the 4th CPUID leaf in most of
> the cases, but in certain case it will not.

Well, that's certain cases' problem, isn't it? How about fixing xen
instead?

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.