whpx_get_registers_for_vmexit only refreshes GPRs, RIP and RFLAGS. x86_update_hflags() depends on state not refreshed here, while the code using the fast runtime state does not depend on the hflags it recomputes.
Signed-off-by: Boden Randin <[email protected]> --- Notes: I opted to remove x86_update_hflags() in this patch instead of changing whpx_get_registers_for_vmexit to refresh the registers it requires because I couldn't find any code that depends on hflags after it calls the whpx_get_registers fast path. Please let me know if I missed something or if maintaining the x86_update_hflags call would be preferable. This is my first open-source contribution, so please also let me know if I made any mistakes in the submission process. target/i386/whpx/whpx-all.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index 113f79afb9..79a5256b20 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -744,8 +744,6 @@ static void whpx_get_registers_for_vmexit(CPUState *cpu, WHPXStateLevel level) rflags_to_lflags(env); assert(idx == RTL_NUMBER_OF(whpx_register_names_for_vmexit)); - - x86_update_hflags(env); } static void whpx_get_legacy_fp_registers(CPUState *cpu, WHPXStateLevel level) -- 2.53.0.windows.1
