]> git.proxmox.com Git - mirror_qemu.git/commit - target-i386/cpu.h
target-i386: preserve FPU and MSR state on INIT
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 12 Mar 2013 12:16:28 +0000 (13:16 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 13 May 2014 11:12:40 +0000 (13:12 +0200)
commit43175fa96add507afee6c0a83ec9ffe0ca130fc3
tree3b720e0bcd3c0d806f0276bf8e38f9943bb38ee2
parent05e7e819d7d159a75a46354aead95e1199b8f168
target-i386: preserve FPU and MSR state on INIT

Most MSRs, plus the FPU, MMX, MXCSR, XMM and YMM registers should not
be zeroed on INIT (Table 9-1 in the Intel SDM).  Copy them out of
CPUX86State and back in, instead of special casing env->pat.

The relevant fields are already consecutive except PAT and SMBASE.
However:

- KVM and Hyper-V MSRs should be reset because they include memory
locations written by the hypervisor.  These MSRs are moved together
at the end of the preserved area.

- SVM state can be moved out of the way since it is written by VMRUN.

Cc: Andreas Faerber <afaerber@suse.de>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target-i386/cpu.c
target-i386/cpu.h
target-i386/helper.c