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'
I noticed this when building a custom kernel optimized for the alderlake architecture using:
Code: Select all
-march=alderlake -mtune=alderlake
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'
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