All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [FOR 0.12][PATCH] kvm: x86: Save/restore exception_index
@ 2009-12-08 16:54 Jan Kiszka
  0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2009-12-08 16:54 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Marcelo Tosatti, qemu-devel, Avi Kivity

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>
---

 cpu-defs.h            |    2 +-
 target-i386/machine.c |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/cpu-defs.h b/cpu-defs.h
index 95068b5..51dc436 100644
--- a/cpu-defs.h
+++ b/cpu-defs.h
@@ -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) */                        \
diff --git a/target-i386/machine.c b/target-i386/machine.c
index cdc8898..ab4633e 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -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),

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-12-08 16:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-08 16:54 [Qemu-devel] [FOR 0.12][PATCH] kvm: x86: Save/restore exception_index Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.