Threadripper 2920X wrong core count

Discussions related to using VirtualBox on Linux hosts.
pickaname
Posts: 9
Joined: 19. Jan 2019, 10:12

Threadripper 2920X wrong core count

Post by pickaname »

I have 12 cores available in vbox using Ubuntu 18.04, I'm expecting 24 virtual cpus, as my CPU has 24 threads. In Windows 10 I have the full 24 available.

Relevant specs:

Code: Select all

$ lsb_release -a 
Description:	Ubuntu 18.04.1 LTS

Code: Select all

$ uname -a
Linux dev6 4.20.0-042000-generic #201812232030 SMP Mon Dec 24 01:32:58 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Code: Select all

$ lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              24
On-line CPU(s) list: 0-23
Thread(s) per core:  2
Core(s) per socket:  12
Socket(s):           1
NUMA node(s):        2
Vendor ID:           AuthenticAMD
CPU family:          23
Model:               8
Model name:          AMD Ryzen Threadripper 2920X 12-Core Processor
Stepping:            2
CPU MHz:             1687.314
CPU max MHz:         4100.0000
CPU min MHz:         2200.0000
BogoMIPS:            8199.09
Virtualization:      AMD-V
L1d cache:           32K
L1i cache:           64K
L2 cache:            512K
L3 cache:            8192K
NUMA node0 CPU(s):   0-5,12-17
NUMA node1 CPU(s):   6-11,18-23
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid amd_dcm aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx hw_pstate sme ssbd sev ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca
Downloaded: virtualbox-6.0_6.0.2-128162_Ubuntu_bionic_amd64.deb
Last edited by pickaname on 19. Jan 2019, 11:01, edited 5 times in total.
pickaname
Posts: 9
Joined: 19. Jan 2019, 10:12

Re: Threadripper 2920X wrong core count

Post by pickaname »

From dmesg, top 2 lines are shown in red:

Code: Select all

[    0.000000] [Firmware Bug]: AMD-Vi: IOAPIC[130] not in IVRS table
[    0.000000] AMD-Vi: Disabling interrupt remapping
Might be relevant, might not be.
Last edited by pickaname on 22. Mar 2019, 02:05, edited 1 time in total.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Threadripper 2920X wrong core count

Post by socratis »

pickaname wrote:I have 12 cores available in vbox using Ubuntu 18.04... In Windows 10 I have the full 24 available.
So, in VirtualBox » VM Settings » System » Processor » Processor(s), under Windows you see 24 CPUs, and in Ubuntu you see 12 CPUs? Do I understand it correctly to be the case?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
pickaname
Posts: 9
Joined: 19. Jan 2019, 10:12

Re: Threadripper 2920X wrong core count

Post by pickaname »

Yep, in windows the slider goes to 24 and in Ubuntu it goes to 12.
andyp73
Volunteer
Posts: 1631
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: Threadripper 2920X wrong core count

Post by andyp73 »

Can you post the output of running the following command running on your Ubuntu host:
ls /sys/devices/system/cpu/
-Andy.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Threadripper 2920X wrong core count

Post by socratis »

Andy, if you're around, we're having a live discussion on IRC as I type this, 10:00 UTC 2018-01-19. ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
pickaname
Posts: 9
Joined: 19. Jan 2019, 10:12

Re: Threadripper 2920X wrong core count

Post by pickaname »

Code: Select all

$ ls -al /sys/devices/system/cpu/
total 0
drwxr-xr-x 33 root root    0 Jan 19 11:05 .
drwxr-xr-x 10 root root    0 Jan 19 10:37 ..
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu0
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu1
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu10
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu11
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu12
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu13
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu14
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu15
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu16
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu17
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu18
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu19
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu2
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu20
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu21
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu22
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu23
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu3
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu4
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu5
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu6
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu7
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu8
drwxr-xr-x  8 root root    0 Jan 19 10:37 cpu9
drwxr-xr-x 27 root root    0 Jan 19 10:37 cpufreq
drwxr-xr-x  2 root root    0 Jan 19 10:37 cpuidle
drwxr-xr-x  2 root root    0 Jan 19 11:05 hotplug
-r--r--r--  1 root root 4096 Jan 19 10:37 isolated
-r--r--r--  1 root root 4096 Jan 19 11:05 kernel_max
drwxr-xr-x  2 root root    0 Jan 19 11:05 microcode
-r--r--r--  1 root root 4096 Jan 19 11:05 modalias
-r--r--r--  1 root root 4096 Jan 19 11:05 offline
-r--r--r--  1 root root 4096 Jan 19 10:37 online
-r--r--r--  1 root root 4096 Jan 19 11:05 possible
drwxr-xr-x  2 root root    0 Jan 19 11:05 power
-r--r--r--  1 root root 4096 Jan 19 11:05 present
drwxr-xr-x  2 root root    0 Jan 19 11:05 smt
-rw-r--r--  1 root root 4096 Jan 19 10:37 uevent
drwxr-xr-x  2 root root    0 Jan 19 11:05 vulnerabilities
Last edited by pickaname on 19. Jan 2019, 13:32, edited 1 time in total.
pickaname
Posts: 9
Joined: 19. Jan 2019, 10:12

Re: Threadripper 2920X wrong core count

Post by pickaname »

Vbox logs starting an empty VM on both Ubuntu and Windows.
Attachments
vboxlogs.tar.gz
(73.47 KiB) Downloaded 29 times
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Threadripper 2920X wrong core count

Post by socratis »

Windows 10:
00:00:03.573561 CPUM: Logical host processors: 24 present, 24 max, 24 online, online mask: 0000000000ffffff
00:00:03.573563 CPUM: Physical host cores: 12
Ubuntu 18.04.1:
00:00:24.623875 CPUM: Logical host processors: 24 present, 24 max, 24 online, online mask: 0000000000ffffff
00:00:24.624100 CPUM: Physical host cores: 6
There's something definitely wrong here with the detection on Ubuntu, unless AMD has now 4 threads per core!!!
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
pickaname
Posts: 9
Joined: 19. Jan 2019, 10:12

Re: Threadripper 2920X wrong core count

Post by pickaname »

https://www.virtualbox.org/browser/vbox ... 76553#L198

Code: Select all

$ grep "" /sys/devices/system/cpu/cpu*/topology/* 
/sys/devices/system/cpu/cpu0/topology/core_id:0
/sys/devices/system/cpu/cpu0/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu0/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu0/topology/physical_package_id:0
/sys/devices/system/cpu/cpu0/topology/thread_siblings:00000000,00000000,00000000,00001001
/sys/devices/system/cpu/cpu0/topology/thread_siblings_list:0,12
/sys/devices/system/cpu/cpu10/topology/core_id:5
/sys/devices/system/cpu/cpu10/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu10/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu10/topology/physical_package_id:0
/sys/devices/system/cpu/cpu10/topology/thread_siblings:00000000,00000000,00000000,00400400
/sys/devices/system/cpu/cpu10/topology/thread_siblings_list:10,22
/sys/devices/system/cpu/cpu11/topology/core_id:6
/sys/devices/system/cpu/cpu11/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu11/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu11/topology/physical_package_id:0
/sys/devices/system/cpu/cpu11/topology/thread_siblings:00000000,00000000,00000000,00800800
/sys/devices/system/cpu/cpu11/topology/thread_siblings_list:11,23
/sys/devices/system/cpu/cpu12/topology/core_id:0
/sys/devices/system/cpu/cpu12/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu12/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu12/topology/physical_package_id:0
/sys/devices/system/cpu/cpu12/topology/thread_siblings:00000000,00000000,00000000,00001001
/sys/devices/system/cpu/cpu12/topology/thread_siblings_list:0,12
/sys/devices/system/cpu/cpu13/topology/core_id:1
/sys/devices/system/cpu/cpu13/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu13/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu13/topology/physical_package_id:0
/sys/devices/system/cpu/cpu13/topology/thread_siblings:00000000,00000000,00000000,00002002
/sys/devices/system/cpu/cpu13/topology/thread_siblings_list:1,13
/sys/devices/system/cpu/cpu14/topology/core_id:2
/sys/devices/system/cpu/cpu14/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu14/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu14/topology/physical_package_id:0
/sys/devices/system/cpu/cpu14/topology/thread_siblings:00000000,00000000,00000000,00004004
/sys/devices/system/cpu/cpu14/topology/thread_siblings_list:2,14
/sys/devices/system/cpu/cpu15/topology/core_id:4
/sys/devices/system/cpu/cpu15/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu15/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu15/topology/physical_package_id:0
/sys/devices/system/cpu/cpu15/topology/thread_siblings:00000000,00000000,00000000,00008008
/sys/devices/system/cpu/cpu15/topology/thread_siblings_list:3,15
/sys/devices/system/cpu/cpu16/topology/core_id:5
/sys/devices/system/cpu/cpu16/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu16/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu16/topology/physical_package_id:0
/sys/devices/system/cpu/cpu16/topology/thread_siblings:00000000,00000000,00000000,00010010
/sys/devices/system/cpu/cpu16/topology/thread_siblings_list:4,16
/sys/devices/system/cpu/cpu17/topology/core_id:6
/sys/devices/system/cpu/cpu17/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu17/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu17/topology/physical_package_id:0
/sys/devices/system/cpu/cpu17/topology/thread_siblings:00000000,00000000,00000000,00020020
/sys/devices/system/cpu/cpu17/topology/thread_siblings_list:5,17
/sys/devices/system/cpu/cpu18/topology/core_id:0
/sys/devices/system/cpu/cpu18/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu18/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu18/topology/physical_package_id:0
/sys/devices/system/cpu/cpu18/topology/thread_siblings:00000000,00000000,00000000,00040040
/sys/devices/system/cpu/cpu18/topology/thread_siblings_list:6,18
/sys/devices/system/cpu/cpu19/topology/core_id:1
/sys/devices/system/cpu/cpu19/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu19/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu19/topology/physical_package_id:0
/sys/devices/system/cpu/cpu19/topology/thread_siblings:00000000,00000000,00000000,00080080
/sys/devices/system/cpu/cpu19/topology/thread_siblings_list:7,19
/sys/devices/system/cpu/cpu1/topology/core_id:1
/sys/devices/system/cpu/cpu1/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu1/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu1/topology/physical_package_id:0
/sys/devices/system/cpu/cpu1/topology/thread_siblings:00000000,00000000,00000000,00002002
/sys/devices/system/cpu/cpu1/topology/thread_siblings_list:1,13
/sys/devices/system/cpu/cpu20/topology/core_id:2
/sys/devices/system/cpu/cpu20/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu20/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu20/topology/physical_package_id:0
/sys/devices/system/cpu/cpu20/topology/thread_siblings:00000000,00000000,00000000,00100100
/sys/devices/system/cpu/cpu20/topology/thread_siblings_list:8,20
/sys/devices/system/cpu/cpu21/topology/core_id:4
/sys/devices/system/cpu/cpu21/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu21/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu21/topology/physical_package_id:0
/sys/devices/system/cpu/cpu21/topology/thread_siblings:00000000,00000000,00000000,00200200
/sys/devices/system/cpu/cpu21/topology/thread_siblings_list:9,21
/sys/devices/system/cpu/cpu22/topology/core_id:5
/sys/devices/system/cpu/cpu22/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu22/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu22/topology/physical_package_id:0
/sys/devices/system/cpu/cpu22/topology/thread_siblings:00000000,00000000,00000000,00400400
/sys/devices/system/cpu/cpu22/topology/thread_siblings_list:10,22
/sys/devices/system/cpu/cpu23/topology/core_id:6
/sys/devices/system/cpu/cpu23/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu23/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu23/topology/physical_package_id:0
/sys/devices/system/cpu/cpu23/topology/thread_siblings:00000000,00000000,00000000,00800800
/sys/devices/system/cpu/cpu23/topology/thread_siblings_list:11,23
/sys/devices/system/cpu/cpu2/topology/core_id:2
/sys/devices/system/cpu/cpu2/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu2/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu2/topology/physical_package_id:0
/sys/devices/system/cpu/cpu2/topology/thread_siblings:00000000,00000000,00000000,00004004
/sys/devices/system/cpu/cpu2/topology/thread_siblings_list:2,14
/sys/devices/system/cpu/cpu3/topology/core_id:4
/sys/devices/system/cpu/cpu3/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu3/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu3/topology/physical_package_id:0
/sys/devices/system/cpu/cpu3/topology/thread_siblings:00000000,00000000,00000000,00008008
/sys/devices/system/cpu/cpu3/topology/thread_siblings_list:3,15
/sys/devices/system/cpu/cpu4/topology/core_id:5
/sys/devices/system/cpu/cpu4/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu4/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu4/topology/physical_package_id:0
/sys/devices/system/cpu/cpu4/topology/thread_siblings:00000000,00000000,00000000,00010010
/sys/devices/system/cpu/cpu4/topology/thread_siblings_list:4,16
/sys/devices/system/cpu/cpu5/topology/core_id:6
/sys/devices/system/cpu/cpu5/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu5/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu5/topology/physical_package_id:0
/sys/devices/system/cpu/cpu5/topology/thread_siblings:00000000,00000000,00000000,00020020
/sys/devices/system/cpu/cpu5/topology/thread_siblings_list:5,17
/sys/devices/system/cpu/cpu6/topology/core_id:0
/sys/devices/system/cpu/cpu6/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu6/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu6/topology/physical_package_id:0
/sys/devices/system/cpu/cpu6/topology/thread_siblings:00000000,00000000,00000000,00040040
/sys/devices/system/cpu/cpu6/topology/thread_siblings_list:6,18
/sys/devices/system/cpu/cpu7/topology/core_id:1
/sys/devices/system/cpu/cpu7/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu7/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu7/topology/physical_package_id:0
/sys/devices/system/cpu/cpu7/topology/thread_siblings:00000000,00000000,00000000,00080080
/sys/devices/system/cpu/cpu7/topology/thread_siblings_list:7,19
/sys/devices/system/cpu/cpu8/topology/core_id:2
/sys/devices/system/cpu/cpu8/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu8/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu8/topology/physical_package_id:0
/sys/devices/system/cpu/cpu8/topology/thread_siblings:00000000,00000000,00000000,00100100
/sys/devices/system/cpu/cpu8/topology/thread_siblings_list:8,20
/sys/devices/system/cpu/cpu9/topology/core_id:4
/sys/devices/system/cpu/cpu9/topology/core_siblings:00000000,00000000,00000000,00ffffff
/sys/devices/system/cpu/cpu9/topology/core_siblings_list:0-23
/sys/devices/system/cpu/cpu9/topology/physical_package_id:0
/sys/devices/system/cpu/cpu9/topology/thread_siblings:00000000,00000000,00000000,00200200
/sys/devices/system/cpu/cpu9/topology/thread_siblings_list:9,21
Last edited by socratis on 19. Jan 2019, 14:33, edited 1 time in total.
Reason: Added missing URL.
andyp73
Volunteer
Posts: 1631
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: Threadripper 2920X wrong core count

Post by andyp73 »

Have been doing some reading of the AMD architecture (such as I can find it on the web).

The 12C/24T devices are quite interesting - they are actually 16C/32T parts with 4 cores disabled hence there not being a core_id:3 (and core_id:7). Internally they are made up of multiple Core Complex (CCX) which each appear to contain two CPU cores which can perform simultaneous multithreading. The 2920X contains six such core complex - therefore 6 CCX * 2 cores * 2 threads gets you to 24 threads.

If we look at the listing from the /sys/devices/system/cpu/cpu*/topology/* directories we find that cpu0, cpu6, cpu12 and cpu18 exist in core_id: 0 and so on.

I think this one for the VirtualBox devs on Monday. It may be that they need to revise the way that they determine the number of cores / threads on Linux. My only other thought is that it may be something down to how the NUMA nodes are defined.

-Andy.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
pickaname
Posts: 9
Joined: 19. Jan 2019, 10:12

Re: Threadripper 2920X wrong core count

Post by pickaname »

Thanks for looking that up Andy.

I believe I found report on the tracker that looks like this issue: https://www.virtualbox.org/ticket/17131

AMD 1920x is 1st generation of threadripper CPUs, I have 2nd generation and there are most likely resemblances between them.
klaus
Oracle Corporation
Posts: 1110
Joined: 10. May 2007, 14:57

Re: Threadripper 2920X wrong core count

Post by klaus »

VirtualBox essentially counts the number of unique core_id entries to figure out the core count (which isn't reported separately), and for some reason which is totally beyond me Linux reports that there are 6 unique core_ids, from 0 to 5. How should VirtualBox find the right core count if Linux reports things in a way which could be called strange, misleading or unusable?

The thread count is detected correctly, because Linux reports that one in a sensible way.
pickaname
Posts: 9
Joined: 19. Jan 2019, 10:12

Re: Threadripper 2920X wrong core count

Post by pickaname »

For people that have AMD 1920X or 2920X and want to assign more cores to a VM.

Code: Select all

$ /usr/lib/virtualbox# readelf -a /usr/lib/virtualbox/VBoxRT.so | grep GetOnlineCoreCount
  2728: 0000000000223710   428 FUNC    GLOBAL DEFAULT   12 RTMpGetOnlineCoreCount
Address of function 'RTMpGetOnlineCoreCount' is 223710 for me. Open VBoxRT.so in hexedit:

Code: Select all

$ hexedit /usr/lib/virtualbox/VBoxRT.so
Ctrl+G -> Enter "223710"
Paste from clipboard: "48c7c018000000c3"
Ctrl+X (Save file)
This patches the function so it does "return 24;". assembly equivalent:

Code: Select all

mov rax, 24
ret
After this the GUI allows me to pick more cores. Obviously not a real solution but works fine for VM's.
Last edited by pickaname on 26. Feb 2019, 06:43, edited 1 time in total.
michaelrobbins
Posts: 2
Joined: 25. Feb 2019, 04:49

Re: Threadripper 2920X wrong core count

Post by michaelrobbins »

I am also having this problem. Ticket #17131 (cannot post a site apparently), 17 months old, shows the same issues with no response.

I have a Threadripper 2970WX. I have 24 cores / 48 threads, Virtualbox only shows a slider up to 6 processors in the green, max 12 processors (6+ shows invalid settings).

Command line outputs below from Ubuntu 18.04.2 LTS. Has there been any progress on this beyond the "patch" submitted in this thread?

I'd post an image of my Virtualbox console but the forum won't allow it: imgur -> 2lsvOwF will show you my Virtualbox console (again, no sites).

Code: Select all

threadripper@cerberus:~$ lsb_release -a 
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.2 LTS
Release:        18.04
Codename:       bionic

Code: Select all

threadripper@cerberus:~$ uname -a
Linux cerberus 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Code: Select all

threadripper@cerberus:~$ lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              48
On-line CPU(s) list: 0-47
Thread(s) per core:  2
Core(s) per socket:  24
Socket(s):           1
NUMA node(s):        4
Vendor ID:           AuthenticAMD
CPU family:          23
Model:               8
Model name:          AMD Ryzen Threadripper 2970WX 24-Core Processor
Stepping:            2
CPU MHz:             2194.238
CPU max MHz:         3000.0000
CPU min MHz:         2200.0000
BogoMIPS:            5988.00
Virtualization:      AMD-V
L1d cache:           32K
L1i cache:           64K
L2 cache:            512K
L3 cache:            8192K
NUMA node0 CPU(s):   0-5,24-29
NUMA node1 CPU(s):   12-17,36-41
NUMA node2 CPU(s):   6-11,30-35
NUMA node3 CPU(s):   18-23,42-47
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid amd_dcm aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb hw_pstate sme ssbd ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca

Code: Select all

threadripper@cerberus:~$ ls -al /sys/devices/system/cpu/
total 0
drwxr-xr-x 57 root root    0 Feb 24 18:53 .
drwxr-xr-x 10 root root    0 Feb 24 00:51 ..
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu0
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu1
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu10
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu11
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu12
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu13
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu14
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu15
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu16
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu17
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu18
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu19
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu2
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu20
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu21
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu22
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu23
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu24
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu25
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu26
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu27
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu28
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu29
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu3
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu30
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu31
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu32
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu33
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu34
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu35
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu36
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu37
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu38
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu39
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu4
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu40
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu41
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu42
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu43
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu44
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu45
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu46
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu47
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu5
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu6
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu7
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu8
drwxr-xr-x  8 root root    0 Feb 24 00:51 cpu9
drwxr-xr-x 51 root root    0 Feb 24 00:52 cpufreq
drwxr-xr-x  2 root root    0 Feb 24 00:52 cpuidle
drwxr-xr-x  2 root root    0 Feb 24 18:53 hotplug
-r--r--r--  1 root root 4096 Feb 24 00:52 isolated
-r--r--r--  1 root root 4096 Feb 24 18:52 kernel_max
drwxr-xr-x  2 root root    0 Feb 24 18:53 microcode
-r--r--r--  1 root root 4096 Feb 24 18:53 modalias
-r--r--r--  1 root root 4096 Feb 24 18:53 offline
-r--r--r--  1 root root 4096 Feb 24 00:52 online
-r--r--r--  1 root root 4096 Feb 24 18:52 possible
drwxr-xr-x  2 root root    0 Feb 24 18:53 power
-r--r--r--  1 root root 4096 Feb 24 00:54 present
drwxr-xr-x  2 root root    0 Feb 24 18:53 smt
-rw-r--r--  1 root root 4096 Feb 24 00:51 uevent
drwxr-xr-x  2 root root    0 Feb 24 18:53 vulnerabilities
Last edited by socratis on 26. Feb 2019, 06:50, edited 1 time in total.
Reason: Added missing URL.
Post Reply