Intel® ISA Extensions
Use hardware-based isolation and memory encryption to provide more code protection in your solutions.
1099 ディスカッション

Emulating missing instructions in Virtualbox

ConorOR
従業員
1,884件の閲覧回数

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 件の賞賛
1 解決策
AdyT_Intel
モデレーター
1,872件の閲覧回数

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

元の投稿で解決策を見る

3 返答(返信)
AdyT_Intel
モデレーター
1,873件の閲覧回数

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

ConorOR
従業員
1,859件の閲覧回数

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.

AdyT_Intel
モデレーター
1,796件の閲覧回数

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.

返信