Re: [Xen-devel] [PATCH 1/6] xen/x86: Add a helper to calculate family/model/stepping information

2016-11-16 Thread Andrew Cooper
On 16/11/16 12:49, Jan Beulich wrote: On 16.11.16 at 13:31, wrote: >> --- a/xen/arch/x86/cpu/common.c >> +++ b/xen/arch/x86/cpu/common.c >> @@ -183,6 +183,25 @@ int get_cpu_vendor(const char v[], enum get_cpu_vendor >> mode) >> return X86_VENDOR_UNKNOWN; >> } >> >> +u8 get_cpu_family

Re: [Xen-devel] [PATCH 1/6] xen/x86: Add a helper to calculate family/model/stepping information

2016-11-16 Thread Jan Beulich
>>> On 16.11.16 at 13:31, wrote: > --- a/xen/arch/x86/cpu/common.c > +++ b/xen/arch/x86/cpu/common.c > @@ -183,6 +183,25 @@ int get_cpu_vendor(const char v[], enum get_cpu_vendor > mode) > return X86_VENDOR_UNKNOWN; > } > > +u8 get_cpu_family(uint32_t raw, u8 *model, u8 *stepping) > +{ >

[Xen-devel] [PATCH 1/6] xen/x86: Add a helper to calculate family/model/stepping information

2016-11-16 Thread Andrew Cooper
And replace the existing opencoded calculations. Signed-off-by: Andrew Cooper --- CC: Jan Beulich --- xen/arch/x86/cpu/common.c | 36 ++-- xen/arch/x86/domctl.c | 7 +-- xen/include/asm-x86/processor.h | 2 ++ 3 files changed, 25 insertions(