VirtualBox

Opened 8 years ago

Last modified 7 months ago

#15471 new enhancement

F16C, FMA and BMI extensions are not supported.

Reported by: KlausErz Owned by:
Component: other Version: VirtualBox 5.0.20
Keywords: F16C FMA BMI AVX2 Cc:
Guest type: all Host type: all

Description

Programs compiled with the Intel Compiler (C or Fortran) for >= Haswell do not run inside a VirtualBox VM (with AVX2 enabled), and immediately exit with the following error message:

Please verify that both the operating system and the processor support Intel(R) F16C, FMA and BMI instructions.

Of course, you can tell the Intel Compiler to generate fallback code, but then AVX2 instructions aren't used either, and the (scientific) program runs much slower.

The AVX2 support in VirtualBox would be even more useful if it was possible to run AVX2 optimized code produced by the Intel Compiler suite.

Attachments (1)

VBox.log (110.2 KB ) - added by KlausErz 8 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by Frank Mehnert, 8 years ago

I'm not so sure that this is not possible in general but I didn't check. Please attach a VBox.log file of a VM session where you tested that.

by KlausErz, 8 years ago

Attachment: VBox.log added

in reply to:  1 comment:2 by KlausErz, 8 years ago

Replying to frank:

I'm not so sure that this is not possible in general but I didn't check. Please attach a VBox.log file of a VM session where you tested that.

Thank you for the quick reply! Attached you find a VBox.log for a 64-bit Linux guest running on a 64-bit Linux host (Broadwell). Here are the CPU flags as seen from the host:

flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb intel_pt tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap xsaveopt dtherm ida arat pln pts

and from the guest:

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 rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx rdrand hypervisor lahf_lm abm 3dnowprefetch avx2 rdseed

comment:3 by Geraldine, 6 years ago

Any plans to implement the missing instructions? It would be useful for scientific software.

comment:4 by MikhailRokhin, 6 years ago

Please, add full CPU IvyBridge features support for guests (F16c , FMA , BMI , etc).

comment:5 by JoeHellmers, 3 years ago

Any update on this? Or perhaps there is a way to change Motherboard/Procesor/Acceleration options to allow this?

comment:6 by jbarr, 3 years ago

with virtualbox 6.1.22 FMA, BMI, F16C features are still absent in guest.

when typing cat /proc/cpuinfo on my linux host (on a i7 4790K) I have bmi1, bmi2, fma, f16c

but when typing this on various linux guests these features are always missing (tried to play with processor and acceleration options, no change)

this ticket has been opened 5 years ago!! how come nothing was done about it?! there is not even some kind of acknowledgement, is this ticket to be processed (or rejected) one day or will it continue to be ignored?...

[edit] forgotten to say that, even if fma is not in guest cpuid features, I still can execute code using fma instructions equally well on host and guest.
that's a relief at least
I also have no issue with executing bmi/f16c code in guest even if all these features are not in guest cpuid features.
only issue I have is when a program explicitly check for those features and do not find them, that can be quite annoying...

Last edited 3 years ago by jbarr (previous) (diff)

comment:7 by fabnicol, 3 years ago

In support of the bug report, you will find below a link to a hands-on, documented case of consequences of CPU feature support limitations and the severe issues raised for OS building (down the page, "VirtualBox limitations"): https://github.com/fabnicol/mkg/wiki/4.-Warnings-and-limitations

Yes, it is quite surprising that nothing should have been done on the issue, considering the far-ranging consequences of these limitations, notably for all embedded virtualization processes.

Last edited 3 years ago by fabnicol (previous) (diff)

comment:8 by manticore, 18 months ago

This seems to be a pity and it is affecting us badly. Our Accounting Applications makes heavy use of Java 11 Math.Fma(), which unfortunately falls back to very slow BigDecimal Math when FMA is not supported.

1) Running the code on the host itself execute the calculation in 1 minute (AMD Zen 2, 16 cores).

2) Running the code on a VirtualBox Linux guest, the same execution needs more than 30 minutes!

Confirmation that FMA is to blame:

3) Running the code with the same VM Image, but using QEmu without setting the CPU takes the same 30 minutes.

4) But running the code on QEmu setting CPU=HOST enables FMA and so takes the original 1 minute.

That's quite dramatic, because first of all I wasted 3 days to figure out what was going on. Secondly, it renders VirtualBox useless/dangerous fro any finance mathematical application.

For affected users, our recommend workaround using Qemu is (ensure setting CPU to HOST for getting FMA support): qemu-system-x86_64 -m 8G --drive file='myImage.vdi' -smp cores=4 -enable-kvm -cpu host

comment:9 by mandelbrot, 7 months ago

Any updates or workarounds for this issue? Still seeing this limitation using the latest VirtualBox 7.0.10 on a Windows 10 host with Ubuntu 22.04 LTS guest.

Here are the flags that I see in /proc/cpuinfo on the guest. Other SIMD extensions like avx2 are present, but curiously no fma...

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 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 3dnowprefetch invpcid_single fsgsbase bmi1 avx2 bmi2 invpcid rdseed clflushopt md_clear flush_l1d arch_capabilities

If the x86-64 FMA instructions still aren't supported in VirtualBox as of 2023 that is really surprising... These instructions have been around for over a decade, having been introduced in AMD Piledriver (2012) and Intel Haswell (2013) microarchitectures!

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use