]> git.proxmox.com Git - qemu.git/commitdiff
kvm: x86: Save/restore exception_index
authorJan Kiszka <jan.kiszka@siemens.com>
Tue, 8 Dec 2009 16:54:55 +0000 (17:54 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Sat, 12 Dec 2009 13:59:39 +0000 (07:59 -0600)
As KVM now makes use of exception_index to keep pending exceptions, we
have to save&restore this field as well.

NOTE: We have to nail the arch-independent exception_index down to a
certain bit width for proper vmstate processing, namely to 32 bit.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
cpu-defs.h
target-i386/machine.c

index 95068b530432ed38372d7eacfac50b7b015c52d8..51dc436b4f1172e6bbf22861bb5dd5812432b6c1 100644 (file)
@@ -179,7 +179,7 @@ typedef struct CPUWatchpoint {
                                                                         \
     /* Core interrupt code */                                           \
     jmp_buf jmp_env;                                                    \
-    int exception_index;                                                \
+    int32_t exception_index;                                            \
                                                                         \
     CPUState *next_cpu; /* next CPU sharing TB cache */                 \
     int cpu_index; /* CPU index (informative) */                        \
index cdc8898a6f899542ef17394a8b5ecad38dd3a3d5..ab4633e652783a0eae9034d4b93e6b134f95d531 100644 (file)
@@ -453,6 +453,7 @@ static const VMStateDescription vmstate_cpu = {
         VMSTATE_UINT8_V(nmi_pending, CPUState, 11),
         VMSTATE_UINT8_V(has_error_code, CPUState, 11),
         VMSTATE_UINT32_V(sipi_vector, CPUState, 11),
+        VMSTATE_INT32_V(exception_index, CPUState, 11),
         /* MCE */
         VMSTATE_UINT64_V(mcg_cap, CPUState, 10),
         VMSTATE_UINT64_V(mcg_status, CPUState, 10),