diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-06-15 15:17:26 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-06-19 15:57:56 +0300 |
commit | 42cc8fa620cbc73e349e96d84cf46469e828ec34 (patch) | |
tree | e17f4c3bd50bed2edb0791b6b8fc4faa18658f9c /target-i386/cpu.h | |
parent | eb47d7c5d96060040931c42773ee07e61e547af9 (diff) | |
download | qemu-42cc8fa620cbc73e349e96d84cf46469e828ec34.zip qemu-42cc8fa620cbc73e349e96d84cf46469e828ec34.tar.gz qemu-42cc8fa620cbc73e349e96d84cf46469e828ec34.tar.bz2 |
kvm: x86: Save/restore FPU OP, IP and DP
These FPU states are properly maintained by KVM but not yet by TCG. So
far we unconditionally set them to 0 in the guest which may cause
state corruptions, though not with modern guests.
To avoid breaking backward migration, use a conditional subsection that
is only written if any of the three fields is non-zero. The guest's
FNINIT clears them frequently, and cleared IA32_MISC_ENABLE MSR[2]
reduces the probability of non-zero values further so that this
subsection is not expected to restrict migration in any common scenario.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'target-i386/cpu.h')
-rw-r--r-- | target-i386/cpu.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 9c3340d..cdf68ff 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -641,6 +641,10 @@ typedef struct CPUX86State { uint16_t fpuc; uint8_t fptags[8]; /* 0 = valid, 1 = empty */ FPReg fpregs[8]; + /* KVM-only so far */ + uint16_t fpop; + uint64_t fpip; + uint64_t fpdp; /* emulator internal variables */ float_status fp_status; |