Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.
1120 Discussions

To get number of logical processors using CPUID instruction

hyunsoo
New Contributor I
1,239 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
Honored Contributor III
1,224 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

0 Kudos
1 Reply
McCalpinJohn
Honored Contributor III
1,225 Views

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

0 Kudos
Reply