savevm with hax saves wrong register state

This bug has been copied automatically from: https://bugs.launchpad.net/qemu/+bug/1855617
Reported by 'Alex' on 2019-12-08 :

I use qemu-i386 with IntelHaxm on Windows 10 x64 host with Windows 7 x86
guest. I run the guest till OS loads and create a snapshot with savevm,
then close qemu, run it again and try to load the snapshot with loadvm.
The guest crashes or freezes. I dumped registers on snapshot creation and
loading (in Haxm) and found that they are different.
When returning from Haxm in hax_vcpu_hax_exec, there is no regular
register read. I found hax_arch_get_registers function which reads
registers from Haxm and is called from a synchronization procedure. I
placed a breakpoint on it, ran qemu and found that it is hit one time
during guest OS boot. Exactly these registers where saved in the snapshot.