Fedora 33 Guest does not see AVX/AVX2 Support

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Sargrad
Posts: 7
Joined: 5. Mar 2021, 23:01

Fedora 33 Guest does not see AVX/AVX2 Support

Post by Sargrad »

I have a windows 10 host. It has an i7-8850H cpu. I've used coreinfo to verify support for AVX/AVX2.

I am running virtualbox 6.1

My guest Fedora 33 machine does not see support for AVX/AVX2 when I look at /proc/cpuinfo.

I have a separate machine also running virtualbox 6.1 that successfully creates a fedora guest that sees support for the AVX/AVX2 instructions.

How can I figure out why virtualbox running on a host that has an intel I7 chip that supports AVX/AVX2 creates a linux VM without support for this critical instruction set?

Here is the cpuinfo from /proc/cpuinfo .
procinfo on fedora
procinfo on fedora
Capture.PNG (86.25 KiB) Viewed 3996 times
Here is the output from coreinfo:

Coreinfo v3.52 - Dump information on system CPU and memory topology

Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
Microcode signature: 000000CA
HTT             *       Hyperthreading enabled

Administrator rights are required to query information.
Querying CET support requires admin rights
HYPERVISOR      *       Hypervisor is present
VMX             -       Supports Intel hardware-assisted virtualization
SVM             -       Supports AMD hardware-assisted virtualization
X64             *       Supports 64-bit mode

SMX             -       Supports Intel trusted execution
SKINIT          -       Supports AMD SKINIT
SGX             -       Supports Intel SGX

NX              *       Supports no-execute page protection
SMEP            *       Supports Supervisor Mode Execution Prevention
SMAP            *       Supports Supervisor Mode Access Prevention
PAGE1GB         *       Supports 1 GB large pages
PAE             *       Supports > 32-bit physical addresses
PAT             *       Supports Page Attribute Table
PSE             *       Supports 4 MB pages
PSE36           *       Supports > 32-bit address 4 MB pages
PGE             *       Supports global bit in page tables
SS              *       Supports bus snooping for cache operations
VME             *       Supports Virtual-8086 mode
RDWRFSGSBASE    *       Supports direct GS/FS base access

FPU             *       Implements i387 floating point instructions
MMX             *       Supports MMX instruction set
MMXEXT          -       Implements AMD MMX extensions
3DNOW           -       Supports 3DNow! instructions
3DNOWEXT        -       Supports 3DNow! extension instructions
SSE             *       Supports Streaming SIMD Extensions
SSE2            *       Supports Streaming SIMD Extensions 2
SSE3            *       Supports Streaming SIMD Extensions 3
SSSE3           *       Supports Supplemental SIMD Extensions 3
SSE4a           -       Supports Streaming SIMDR Extensions 4a
SSE4.1          *       Supports Streaming SIMD Extensions 4.1
SSE4.2          *       Supports Streaming SIMD Extensions 4.2

AES             *       Supports AES extensions
AVX             *       Supports AVX instruction extensions
AVX2            *       Supports AVX2 instruction extensions
AVX-512-F       -       Supports AVX-512 Foundation instructions
AVX-512-DQ      -       Supports AVX-512 double and quadword instructions
AVX-512-IFAMA   -       Supports AVX-512 integer Fused multiply-add instructions
AVX-512-PF      -       Supports AVX-512 prefetch instructions
AVX-512-ER      -       Supports AVX-512 exponential and reciprocal instructions
AVX-512-CD      -       Supports AVX-512 conflict detection instructions
AVX-512-BW      -       Supports AVX-512 byte and word instructions
AVX-512-VL      -       Supports AVX-512 vector length instructions
FMA             *       Supports FMA extensions using YMM state
MSR             *       Implements RDMSR/WRMSR instructions
MTRR            *       Supports Memory Type Range Registers
XSAVE           *       Supports XSAVE/XRSTOR instructions
OSXSAVE         *       Supports XSETBV/XGETBV instructions
RDRAND          *       Supports RDRAND instruction
RDSEED          *       Supports RDSEED instruction

CMOV            *       Supports CMOVcc instruction
CLFSH           *       Supports CLFLUSH instruction
CX8             *       Supports compare and exchange 8-byte instructions
CX16            *       Supports CMPXCHG16B instruction
BMI1            *       Supports bit manipulation extensions 1
BMI2            *       Supports bit manipulation extensions 2
ADX             *       Supports ADCX/ADOX instructions
DCA             -       Supports prefetch from memory-mapped device
F16C            *       Supports half-precision instruction
FXSR            *       Supports FXSAVE/FXSTOR instructions
FFXSR           -       Supports optimized FXSAVE/FSRSTOR instruction
MONITOR         -       Supports MONITOR and MWAIT instructions
MOVBE           *       Supports MOVBE instruction
ERMSB           *       Supports Enhanced REP MOVSB/STOSB
PCLMULDQ        *       Supports PCLMULDQ instruction
POPCNT          *       Supports POPCNT instruction
LZCNT           *       Supports LZCNT instruction
SEP             *       Supports fast system call instructions
LAHF-SAHF       *       Supports LAHF/SAHF instructions in 64-bit mode
HLE             *       Supports Hardware Lock Elision instructions
RTM             *       Supports Restricted Transactional Memory instructions

DE              *       Supports I/O breakpoints including CR4.DE
DTES64          *       Can write history of 64-bit branch addresses
DS              *       Implements memory-resident debug buffer
DS-CPL          -       Supports Debug Store feature with CPL
PCID            *       Supports PCIDs and settable CR4.PCIDE
INVPCID         *       Supports INVPCID instruction
PDCM            *       Supports Performance Capabilities MSR
RDTSCP          *       Supports RDTSCP instruction
TSC             *       Supports RDTSC instruction
TSC-DEADLINE    -       Local APIC supports one-shot deadline timer
TSC-INVARIANT   *       TSC runs at constant rate
xTPR            *       Supports disabling task priority messages

EIST            *       Supports Enhanced Intel Speedstep
ACPI            *       Implements MSR for power management
TM              *       Implements thermal monitor circuitry
TM2             *       Implements Thermal Monitor 2 control
APIC            *       Implements software-accessible local APIC
x2APIC          *       Supports x2APIC

CNXT-ID         -       L1 data cache mode adaptive or BIOS

MCE             *       Supports Machine Check, INT18 and CR4.MCE
MCA             *       Implements Machine Check Architecture
PBE             *       Supports use of FERR#/PBE# pin

PSN             -       Implements 96-bit processor serial number

PREFETCHW       *       Supports PREFETCHW instruction

Maximum implemented CPUID leaves: 00000016 (Basic), 80000008 (Extended).
Maximum implemented address width: 48 bits (virtual), 39 bits (physical).

Processor signature: 000906EA

Logical to Physical Processor Map:
**----------  Physical Processor 0 (Hyperthreaded)
--**--------  Physical Processor 1 (Hyperthreaded)
----**------  Physical Processor 2 (Hyperthreaded)
------**----  Physical Processor 3 (Hyperthreaded)
--------**--  Physical Processor 4 (Hyperthreaded)
----------**  Physical Processor 5 (Hyperthreaded)

Logical Processor to Socket Map:
************  Socket 0

Logical Processor to NUMA Node Map:
************  NUMA Node 0

No NUMA nodes.

Logical Processor to Cache Map:
**----------  Data Cache          0, Level 1,   32 KB, Assoc   8, LineSize  64
**----------  Instruction Cache   0, Level 1,   32 KB, Assoc   8, LineSize  64
**----------  Unified Cache       0, Level 2,  256 KB, Assoc   4, LineSize  64
************  Unified Cache       1, Level 3,    9 MB, Assoc  12, LineSize  64
--**--------  Data Cache          1, Level 1,   32 KB, Assoc   8, LineSize  64
--**--------  Instruction Cache   1, Level 1,   32 KB, Assoc   8, LineSize  64
--**--------  Unified Cache       2, Level 2,  256 KB, Assoc   4, LineSize  64
----**------  Data Cache          2, Level 1,   32 KB, Assoc   8, LineSize  64
----**------  Instruction Cache   2, Level 1,   32 KB, Assoc   8, LineSize  64
----**------  Unified Cache       3, Level 2,  256 KB, Assoc   4, LineSize  64
------**----  Data Cache          3, Level 1,   32 KB, Assoc   8, LineSize  64
------**----  Instruction Cache   3, Level 1,   32 KB, Assoc   8, LineSize  64
------**----  Unified Cache       4, Level 2,  256 KB, Assoc   4, LineSize  64
--------**--  Data Cache          4, Level 1,   32 KB, Assoc   8, LineSize  64
--------**--  Instruction Cache   4, Level 1,   32 KB, Assoc   8, LineSize  64
--------**--  Unified Cache       5, Level 2,  256 KB, Assoc   4, LineSize  64
----------**  Data Cache          5, Level 1,   32 KB, Assoc   8, LineSize  64
----------**  Instruction Cache   5, Level 1,   32 KB, Assoc   8, LineSize  64
----------**  Unified Cache       6, Level 2,  256 KB, Assoc   4, LineSize  64

Logical Processor to Group Map:
************  Group 0
multiOS
Volunteer
Posts: 832
Joined: 14. Sep 2019, 16:51
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WIN11,10, 7, Linux (various)
Location: United Kingdom

Re: Fedora 33 Guest does not see AVX/AVX2 Support

Post by multiOS »

I suggest you have a read through Para "13.4 Security Recommendations" of the VirtualBox User Manual (Page 331 in the 6.1.18 Version). Hopefully that will help.
Sargrad
Posts: 7
Joined: 5. Mar 2021, 23:01

Re: Fedora 33 Guest does not see AVX/AVX2 Support

Post by Sargrad »

multiOS wrote:I suggest you have a read through Para "13.4 Security Recommendations" of the VirtualBox User Manual (Page 331 in the 6.1.18 Version). Hopefully that will help.

Thanks. I'll take a look at that. I was actually peeking at a section on security earlier.. I'll do so again.
Sargrad
Posts: 7
Joined: 5. Mar 2021, 23:01

Re: Fedora 33 Guest does not see AVX/AVX2 Support

Post by Sargrad »

Sargrad wrote:
multiOS wrote:I suggest you have a read through Para "13.4 Security Recommendations" of the VirtualBox User Manual (Page 331 in the 6.1.18 Version). Hopefully that will help.

Thanks. I'll take a look at that. I was actually peeking at a section on security earlier.. I'll do so again.
I just looked at the section you recommended. It is indeed the section I looked at earlier. All it seemed to suggest is that I should not disable nested paging. This is a flag I switched off and on to see if it would help... to no avail. In short, there is nothing in that section that seems helpful.

I cant' imagine that I'm the first person to struggle with this. I'd expect to see a wealth of material online relative to getting AVX to be seen by a fedora guest. Yet my searches turn up largely empty.

Any other thoughts? Devs?
Sargrad
Posts: 7
Joined: 5. Mar 2021, 23:01

Re: Fedora 33 Guest does not see AVX/AVX2 Support

Post by Sargrad »

I've tried the following. It does not help

Code: Select all

VBoxManage.exe setextradata "dev1" VBoxInternal/CPUM/IsaExts/AVX 1

Code: Select all

VBoxManage.exe setextradata "dev1" VBoxInternal/CPUM/IsaExts/AVX2 1
Sargrad
Posts: 7
Joined: 5. Mar 2021, 23:01

Re: Fedora 33 Guest does not see AVX/AVX2 Support

Post by Sargrad »

Looking at the virtual machine log and searching for AVX . i see the following:
VM VirtualBox Log
VM VirtualBox Log
Capture1.PNG (46.08 KiB) Viewed 3976 times
Virtualbox seems to indicate that the guest will not support AVX even though the host does (1 in parentheses is the host support)

I've read and re-read and re-read the virtualbox section on security. I think the settings that I currently have are consistent with a configuration that should not result in disabling of AVX/AVX2 support. Specifically I still have nested paging enabled (though I've toggled this to see if I can get AVX working) and the documentation says that disabling nested paging would result in AVX/AVX2 support not being passed to the guest. I've toggled every system option that virtualbox gives me control over in the creation of the guest.

Can someone help me to understand how to get virtualbox to create a guest with the AVX/AVX2 support?
Sargrad
Posts: 7
Joined: 5. Mar 2021, 23:01

Re: Fedora 33 Guest does not see AVX/AVX2 Support

Post by Sargrad »

I've attached the full log.
Attachments
dev1-2021-03-06-05-33-05.zip
(34.68 KiB) Downloaded 8 times
multiOS
Volunteer
Posts: 832
Joined: 14. Sep 2019, 16:51
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: WIN11,10, 7, Linux (various)
Location: United Kingdom

Re: Fedora 33 Guest does not see AVX/AVX2 Support

Post by multiOS »

Not sure I can add anything. My Fedora installation reports that AVX and AVX2 features are present:

Code: Select all

$ hwinfo --cpu
01: None 00.0: 10103 CPU                                        
  [Created at cpu.462]
  Unique ID: rdCR.j8NaKXDZtZ6
  Hardware Class: cpu
  Arch: X86-64
  Vendor: "GenuineIntel"
  Model: 6.70.1 "Intel(R) Core(TM) i7-4960HQ CPU @ 2.60GHz"
  Features: 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,rdtscp,lm,constant_tsc,rep_good,nopl,xtopology,nonstop_tsc,cpuid,tsc_known_freq,pni,pclmulqdq,ssse3,cx16,pcid,sse4_1,sse4_2,x2apic,movbe,popcnt,aes,xsave,avx,rdrand,hypervisor,lahf_lm,abm,invpcid_single,pti,fsgsbase,avx2,invpcid,md_clear,flush_l1d
  Clock: 2593 MHz
  BogoMips: 5187.98
  Cache: 6144 kb
  Units/Processor: 2
  Config Status: cfg=new, avail=yes, need=no, active=unknown

02: None 01.0: 10103 CPU
  [Created at cpu.462]
  Unique ID: wkFv.j8NaKXDZtZ6
  Hardware Class: cpu
  Arch: X86-64
  Vendor: "GenuineIntel"
  Model: 6.70.1 "Intel(R) Core(TM) i7-4960HQ CPU @ 2.60GHz"
  Features: 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,rdtscp,lm,constant_tsc,rep_good,nopl,xtopology,nonstop_tsc,cpuid,tsc_known_freq,pni,pclmulqdq,ssse3,cx16,pcid,sse4_1,sse4_2,x2apic,movbe,popcnt,aes,xsave,avx,rdrand,hypervisor,lahf_lm,abm,invpcid_single,pti,fsgsbase,avx2,invpcid,md_clear,flush_l1d
  Clock: 2593 MHz
  BogoMips: 5187.98
  Cache: 6144 kb
  Units/Processor: 2
  Config Status: cfg=new, avail=yes, need=no, active=unknown
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Fedora 33 Guest does not see AVX/AVX2 Support

Post by fth0 »

Sargrad wrote:Can someone help me to understand how to get virtualbox to create a guest with the AVX/AVX2 support?
Please take a look at AVX and VirtualBox v6.1.18 r142142, an follow my link there to the ubiquitous "Get-rid-of-Hyper-V" post.
Sargrad
Posts: 7
Joined: 5. Mar 2021, 23:01

Re: Fedora 33 Guest does not see AVX/AVX2 Support

Post by Sargrad »

Thanks to both of you. I am very bullish about the "hyper-v" blocking things. I will pursue that, and either way I'll post my results back to this thread.

Thanks again.
Post Reply