Enable AVX and AVX2 instruction sets on Ubuntu
Posted: 24. Aug 2022, 09:26
Hi,
I'm trying to enable AVX and AVX2 instruction sets on Ubuntu 22.04 guest, Windows host.
I can't see avx or avx2 when I run
on the guest.
I have tried to enable AVX and AVX2 instruction sets with:
I also have read that Hyper-V and AVX are mutually exclusive in Windows, so I tried to disable Hyper-V on Windows: control panel -> programs and features -> turn windows features on or off -> unchecked Hyper-V. Then opened services.msc and stopped and disabled "HV Host Service". Then rebooted.
I have not disabled virtualization in BIOS, because I can't access it (this is a work laptop with BitLocker).
Hyper-V still seems to be enabled, because I can still see these entries in the log:
I'm trying to enable AVX and AVX2 instruction sets on Ubuntu 22.04 guest, Windows host.
I can't see avx or avx2 when I run
Code: Select all
grep avx /proc/cpuinfoI have tried to enable AVX and AVX2 instruction sets with:
Code: Select all
VBoxManage setextradata "guest_name" VBoxInternal/CPUM/IsaExts/AVX 1
VBoxManage setextradata "guest_name" VBoxInternal/CPUM/IsaExts/AVX2 1
I have not disabled virtualization in BIOS, because I can't access it (this is a work laptop with BitLocker).
Hyper-V still seems to be enabled, because I can still see these entries in the log:
And the log entries concerning AVX seem to indicate that that extradata is set ok, but AVX instruction sets are still not enabled (on the guest):00:00:01.021895 NEM: WHvCapabilityCodeHypervisorPresent is TRUE, so this might work...
...
00:00:01.023706 NEM: Disable Hyper-V if you need X2APIC for your guests!
...
00:00:01.069075 CPUM: SetGuestCpuIdFeature: Enabled Hypervisor Present bit
...
00:00:02.072380 HTT - Hyper-Threading Technology = 1 (1)
...
00:00:02.072410 HVP - Hypervisor Present (we're a guest) = 1 (1)
...
00:00:02.072511 Raw Hypervisor CPUID Leaves
00:00:02.072512 Leaf/sub-leaf eax ebx ecx edx
00:00:02.072513 Gst: 40000000/0000 40000001 4b4d564b 564b4d56 0000004d
00:00:02.072514 Hst: 4000000b 7263694d 666f736f 76482074
00:00:02.072516 Gst: 40000001/0000 01000089 00000000 00000000 00000000
00:00:02.072517 Hst: 31237648 00000000 00000000 00000000
...
Any tips on disabling HTT and enabling AVX on my virtual machine?00:00:00.917638 Extradata overrides:
00:00:00.917647 VBoxInternal/CPUM/IsaExts/AVX="1"
00:00:00.917679 VBoxInternal/CPUM/IsaExts/AVX2="1"
...
00:00:00.918005 [/CPUM/IsaExts/] (level 2)
00:00:00.918006 AVX <integer> = 0x0000000000000001 (1)
00:00:00.918006 AVX2 <integer> = 0x0000000000000001 (1)
...
00:00:02.072407 AVX - AVX support = 0 (1)
...
00:00:02.072416 AVX2 - Advanced Vector Extensions 2 = 0 (1)