Reputation: 719
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?
Upvotes: 0
Views: 77
Reputation: 719
The problem was the bugy virtual box, my code works greatly on a real hardware, and the newest virtualbox.
Upvotes: 2