Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
1058 Discussions

To get number of logical processors using CPUID instruction

hyunsoo
New Contributor I
358 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
343 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
344 Views

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

Reply