Re: CURRENT: FreeBSD not reporting AES-NI on Intel(R) Xeon(R) CPU E5-1650 v3

From: Slawa Olhovchenkov <slw_at_zxy.spb.ru>
Date: Sun, 19 Mar 2017 19:16:44 +0300
On Sun, Mar 19, 2017 at 06:07:33PM +0200, Konstantin Belousov wrote:

> On Sun, Mar 19, 2017 at 04:58:40PM +0100, Dimitry Andric wrote:
> > On 19 Mar 2017, at 13:36, Rozhuk Ivan <rozhuk.im_at_gmail.com> wrote:
> > > 
> > > On Fri, 17 Mar 2017 17:53:24 +0100
> > > "O. Hartmann" <ohartmann_at_walstatt.org> wrote:
> > > 
> > >>> Other OS detect AES-NI on this server?
> > >> 
> > >> I havn't ried so far, the box is in heavy use. I'd like to check with
> > >> some live USB drive versions and report later.
> > >> 
> > > 
> > > You can write or find some program that read and decode CPUID and check
> > > AES-NI support without reboot.
> > 
> > The kernel already does this at boot time, and show the results, e.g.:
> > 
> > CPU: Intel(R) Core(TM) i7-3770 CPU _at_ 3.40GHz (3391.68-MHz 686-class CPU)
> >   Origin="GenuineIntel"  Id=0x306a9  Family=0x6  Model=0x3a  Stepping=9
> >   Features=0xfa3fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,DTS,MMX,FXSR,SSE,SSE2,SS>
> >   Features2=0xffba2203<SSE3,PCLMULQDQ,SSSE3,CX16,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND,HV>
> >   AMD Features=0x28100000<NX,RDTSCP,LM>
> >   AMD Features2=0x1<LAHF>
> >   Structured Extended Features=0x202<TSCADJ,ERMS>
> >   TSC: P-state invariant
> > 
> > Unfortunately the kernel does not expose this information via any
> > sysctl, so some time after booting it may have "scrolled away" in
> > dmesg.
> It is quite pointless to expose the information through a sysctl, because
> it is non-privileged and is available to usermode via execution of the
> CPUID instruction, which is utilized by utilities listed below.
> 
> Also, look at cpucontrol -i.

% cpucontrol -i 0x1 /dev/cpuctl1
cpucontrol: error opening /dev/cpuctl1 for reading: Permission denied

> > 
> > In that case, you can use either the misc/cpuid or the sysutils/cpuid
> > ports to show this information, and even quite a lot more.
> Or better, sysutils/x86info.

% x86info
x86info v1.31pre
/dev/cpuctl0: Permission denied
Found 24 identical CPUs
Extended Family: 0 Extended Model: 4 Family: 6 Model: 79 Stepping: 1
Type: 0 (Original OEM)
CPU Model (x86info's best guess): Unknown model.
Processor name string (BIOS programmed): Intel(R) Xeon(R) CPU E5-2650 v4 _at_ 2.20GHz

Total processor threads: 24
This system has 2 six-core processors with hyper-threading (2 threads per core) running at an estimated 2.20GHz
Received on Sun Mar 19 2017 - 15:16:47 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:10 UTC