A bit of update.
09.09.2020 21:04, stsp пишет:
As for the original problem: there are at least
2 problems.
On OLD intel:
- KVM fails with invalid guest state unless
you set VMXE in guest's cr4, and do it from
the very first attempt!
This happens only on nested execution!
Under qemu/kvm.
On any CPU:
- If you set VMXE in guest's cr4, then guest
works in non-VME mode, as if cr4.VME was
cleared. But I didn't clear it - KVM did!
I tried to read them back with
KVM_GET_SREGS.
So if I initially set VMXE|VME, then I
indeed read back plain 0.
If I initially set just VMXE, then I read
back also 0.
If I initially set VME, then I read back
1 (VME - correct)