From patchwork Fri Apr 24 19:37:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 464393 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id E6602140079 for ; Sat, 25 Apr 2015 05:40:50 +1000 (AEST) Received: from localhost ([::1]:46257 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YljSy-0001Gd-Eg for incoming@patchwork.ozlabs.org; Fri, 24 Apr 2015 15:40:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YljQ0-0004hO-5v for qemu-devel@nongnu.org; Fri, 24 Apr 2015 15:37:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YljPz-0001pr-9E for qemu-devel@nongnu.org; Fri, 24 Apr 2015 15:37:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39738) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YljPz-0001ox-2X for qemu-devel@nongnu.org; Fri, 24 Apr 2015 15:37:43 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t3OJbfko023208 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 24 Apr 2015 15:37:41 -0400 Received: from localhost (ovpn-113-180.phx2.redhat.com [10.3.113.180]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3OJbeCw002548; Fri, 24 Apr 2015 15:37:40 -0400 From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Fri, 24 Apr 2015 16:37:31 -0300 Message-Id: <1429904252-9841-3-git-send-email-ehabkost@redhat.com> In-Reply-To: <1429904252-9841-1-git-send-email-ehabkost@redhat.com> References: <1429904252-9841-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Igor Mammedov , Richard Henderson , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Paolo Bonzini Subject: [Qemu-devel] [PATCH 2/3] target-i386: Add a marker to the end of region zeroed on reset X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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;