Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.
1122 Discussions

Emulating missing instructions in Virtualbox

ConorOR
Employee
3,260 Views

Using Virtualbox under Windows 11 with HyperV enabled (GPO enforced unfortunately), /proc/cpuinfo specifies that the CPU I'm using is:

model name : Intel(R) Core(TM) i7-10610U CPU @ 1.80GHz

However some flags are missing, mainly the AVX instructions. This is because Virtualbox cannot use nested paging while running simultaneously with HyperV. I tried running SDE but I believe (I'm not 100% sure) that SDE is trusting the result of CPUID in order to decide which instructions to emulate.

So perhaps SDE thinks this particular core supports AVX without realising that the Virtual environment cannot support certain instructions.

I'm curious as to whether SDE can be requested to emulate instructions like the AVX set even if it thinks the underlying processor already supports them?

 

0 Kudos
1 Solution
AdyT_Intel
Moderator
3,248 Views

Intel SDE provides multiple knobs to force the emulation of features that are supported by the host's CPUID.

This include:

-aes

-avx

-avx2

-avx512

-bdwni

-bmi1

-bmi2

-clmul

-f16c

-fma

 

Intel SDE also provides an option to force the emulation of CPU features. Use -force-emulate with one of the supported CPU names:

skx, clx, cpx, icl, icx, tgl, spr, adl

View solution in original post

0 Kudos
3 Replies
AdyT_Intel
Moderator
3,249 Views

Intel SDE provides multiple knobs to force the emulation of features that are supported by the host's CPUID.

This include:

-aes

-avx

-avx2

-avx512

-bdwni

-bmi1

-bmi2

-clmul

-f16c

-fma

 

Intel SDE also provides an option to force the emulation of CPU features. Use -force-emulate with one of the supported CPU names:

skx, clx, cpx, icl, icx, tgl, spr, adl

0 Kudos
ConorOR
Employee
3,235 Views

Thanks Ady. That makes sense - I had tried something like:

./sde64 -avx -avx2 -fma -avx512 -- /bin/bash

 

but I think I'm being too hasty in my approach. I just blithely assumed that doing that would cause

cat /proc/cpuinfo

to show the flags. But it doesn't. But that doesn't mean they aren't working so I need to do some more intelligent testing.

(I'm playing with later versions Simics - it wants AVX, AVX2, FMA and sulks if it doesn't see them).

 

Cheers,

Conor.

0 Kudos
AdyT_Intel
Moderator
3,172 Views

Intel SDE emulates the ring3 instructions and therefore if your applications executes the CPUID instruction it will return the emulated value. This is not what you are getting with:

% cat /proc/cpuinfo

These are the values used by the OS and therefore does not pass through the emulation.

Reply