Ticket #20005 (new defect)
POPCNT cpu flag not supported in 6.1 Ubuntu 16 guest
Reported by: | eben | Owned by: | |
---|---|---|---|
Component: | VMM | Version: | VirtualBox 6.1.16 |
Keywords: | Cc: | ||
Guest type: | other | Host type: | other |
Description
Ubuntu 16 guest with Enable Nested Paging enabled. On VirtualBox 6.0 guest Ubuntu 16.04 reports having the POPCNT CPU flag. On 6.1 POPCNT is no longer there (causing my OpenCV app to fail). I downgraded back to 6.0 and it runs again. If this is in the release notes I didn't find it.
Change History
comment:2 Changed 21 months ago by Stevn
Found a solution. On the guest Ubuntu OS, check the flags in cpuinfo, note popcnt is not available
cat /proc/cpuinfo
On the Host OS (in my case Windows10 console):
cd C:\Program Files\Oracle\VirtualBox VBoxManage.exe setextradata <Your VM's name> VBoxInternal/CPUM/IsaExts/POPCNT 1
confirm on guest after restart:
cat /proc/cpuinfo | grep popcnt
comment:3 Changed 21 months ago by klaus
POPCNT is enabled when it's known safe with the current VM execution code, which currently is the case when nested paging is enabled (should be always the case on a reasonably recent CPU, anything else kills performance) and unrestricted guest execution is available (again recent CPU). Your tweak is probably reasonably safe, but it shows that your CPU is not considered recent enough.
It's possible that the condition could be relaxed, but that needs careful analysis.
comment:4 Changed 15 months ago by AnssiH
It seems like "Nested Paging" and "Unrestricted Execution" are always reported as "Inactive" when running under Hyper-V, resulting in POPCNT and some other extensions getting disabled by default.
Checked with i7-8550U and i7-10750H, of which at least the latter is "reasonably recent".
+1, same issue
OpenCV running on Ubuntu 18.04.5LTS 64-bit Guest OS (VB 6.1.22 r144080) reports: