vcpu: Update EFER state for set/get_regs#214
Conversation
Co-authored-by: Jake Arveson <jarveson@gmail.com> Signed-off-by: Nick Renieris <velocityra@gmail.com>
|
Looks good to me. Thanks for the patch. Reviewed-by: Hang Yuan hang.yuan@intel.com |
Is there any specific failure if missing this? |
|
@coxuintel The guest I tested this on is really barebones (the entirety of the code is pretty close to this: https://wiki.osdev.org/Entering_Long_Mode_Directly) so I'm not entirely sure, but it seems like there's no failure guest-side without this, based on some testing by writing to registers after long mode is initialized. |
|
@coxuintel if missing this snapshot loading may not update EFER. But it doesn't work anyway (see #248). |
|
Bump? |
|
Sorry for late response. Do you remember that your test cases can be passed on WHPX but not on HAXM when invoking HAX_VCPU_SET_REGS? Furthermore, in your patch, we noticed that you updated the entire EFER bits on this occasion. But maybe some bits are not allowed to set according to HAXM current implementation. Meanwhile, we will consider to prepare full test on your pull request and then decide further solution. Thanks for your tracking. |
563eb1b to
6b942e3
Compare
b73a231 to
da1b8ec
Compare
HAXM didn't return the correct EFER value (tested on the same guest code against WHPX).
Without this you can only get it by reading the MSR directly.