From 5e992a8e337e710ea2d02f35668ac55a80e15f99 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Fri, 24 Apr 2015 15:49:15 -0300 Subject: target-i386: Add a marker to end of the region zeroed on reset Instead of using cpuid_level, use an empty struct as a marker (like we already did with {start,end}_init_save). This will avoid accidentaly resetting the wrong fields if we change the field ordering on CPUX86State. Reviewed-by: Richard Henderson Signed-off-by: Eduardo Habkost --- target-i386/cpu.h | 1 + 1 file changed, 1 insertion(+) (limited to 'target-i386/cpu.h') diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 27af9c3f9a..604d591829 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -1108,6 +1108,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; -- cgit v1.2.1