qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/3] target-i386: Add a marker to the end of region


From: Eduardo Habkost
Subject: [Qemu-devel] [PATCH 2/3] target-i386: Add a marker to the end of region zeroed on reset
Date: Fri, 24 Apr 2015 16:37:31 -0300

Instead of using the next field in the struct (that's a moving target
because we are gradually moving fields to X86CPU), add an empty struct
as a marker (like we already did with {start,end}_init_save).

Signed-off-by: Eduardo Habkost <address@hidden>
---
 target-i386/cpu.c | 2 +-
 target-i386/cpu.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 11da4b5..928e2be 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -2595,7 +2595,7 @@ static void x86_cpu_reset(CPUState *s)
 
     xcc->parent_reset(s);
 
-    memset(env, 0, offsetof(CPUX86State, cpuid_level));
+    memset(env, 0, offsetof(CPUX86State, end_reset_fields));
 
     tlb_flush(s, 1);
 
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index 1d9f1d7..750b5b7 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -931,6 +931,7 @@ typedef struct CPUX86State {
     CPU_COMMON
 
     /* Fields from here on are preserved across CPU reset. */
+    struct {} end_reset_fields;
 
     /* processor features (e.g. for CPUID insn) */
     uint32_t cpuid_level;
-- 
2.1.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]