Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
1078 Discussions

To get number of logical processors using CPUID instruction

hyunsoo
New Contributor I
577 Views

Hi all,

I have Intel i9-10900 CPU equipped with 20 logical processors. It shows exactly 20 cores in 'htop' command but, `cpuid` instruction says that I have only 16 logical processors.

I ran the cpuid instruction like below.

```

...

asm volatile
("cpuid" : "=a" (regs[0]), "=b" (regs[1]), "=c" (regs[2]), "=d" (regs[3])
: "a" (i), "c" (0));

...

```

Could you give any comment?

Thanks

 

0 Kudos
1 Solution
McCalpinJohn
Black Belt
562 Views

To make sure you are using the CPUID instruction correctly, I recommend http://www.etallen.com/cpuid.html as a reference.  

View solution in original post

1 Reply
McCalpinJohn
Black Belt
563 Views

To make sure you are using the CPUID instruction correctly, I recommend http://www.etallen.com/cpuid.html as a reference.  

Reply