VB 7.0.12 - F16C and FMA (x86-64-v3) extensions are not supported

Discussions related to using VirtualBox on Linux hosts.
Post Reply
oso2276
Posts: 21
Joined: 11. Sep 2023, 15:58

VB 7.0.12 - F16C and FMA (x86-64-v3) extensions are not supported

Post by oso2276 »

Hi folks,
Just found that VB guest VMs is missing some x86-64-v3 instructions/extensions that are available in the host system.
In my case, host CPU is an Intel i7-1260P (Alder Lake) and it has the following extensions among others:
- fma
- f16c

But these are not available from within the guest VM running in the same host system. This can be reproduced with lscpu executed in the host and in the guest:

Code: Select all

$ lscpu | grep 'fma/|f16c'
This limits the guest VM to programs/code targeting generic CPU with 64-bit extensions x86-64-v2.

I noticed this when building a custom kernel optimized for the alderlake architecture using:

Code: Select all

-march=alderlake -mtune=alderlake
The new kernel would run flawless on the host (bare metal), but will fail miserably when attempting to boot the guest VM.

My workaround has been building the new kernel 6.1.x, with GCC12.3/13.1 (Ubuntu 22.04) with these settings:

Code: Select all

export KCFLAGS=' -march=sandybridge -mtune=sandybridge'
export KCPPFLAGS=' -march=sandybridge -mtune=sandybridge'
Resulting kernel was tested with VB 6.1.48 and 7.0.12, executing Ubuntu 22.04 Guest VM's on the following intel chips: SandyBridge, Cometlake (skylake) and Alderlake (Hosts tested with Win11 23H2, Ubuntu 23.10 (kernel 6.5/6.6) & MacOS 10.13)

Found a feature request for the same issue:
https://www.virtualbox.org/ticket/15471

Just keep these limitations in mind when building/testing software inside a VM.

Regards
Post Reply