简体   繁体   中英

XSetgv crashes in my bare metal software

I am developing a bare metal program. The platform is x86, 32 bit, protected mode, I am at ring 0. I would like to enable AVX by using xsetgv instruction. 18th bit of CR4 is 1, if I use xgetgv then nothing wrong happens, but the xsetgv crashes (the virtualbox reports fatal error). The problematic code is the following:

mov ecx, 0
mov eax, 0x7
mov edx, 0
xsetbv

What is the problem?

问题出在虚假的虚拟盒子上,我的代码在真正的硬件和最新的虚拟盒子上都可以很好地工作。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM