From patchwork Tue Sep 29 20:48:48 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 34480 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 100C7B7BB6 for ; Wed, 30 Sep 2009 07:48:29 +1000 (EST) Received: from localhost ([127.0.0.1]:39046 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MskYb-0000mP-Ad for incoming@patchwork.ozlabs.org; Tue, 29 Sep 2009 17:48:25 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Msje7-0005Qt-Js for qemu-devel@nongnu.org; Tue, 29 Sep 2009 16:50:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Msje1-0005JH-5M for qemu-devel@nongnu.org; Tue, 29 Sep 2009 16:50:01 -0400 Received: from [199.232.76.173] (port=55237 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Msje0-0005J2-NY for qemu-devel@nongnu.org; Tue, 29 Sep 2009 16:49:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54104) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Msje0-0002Yf-5p for qemu-devel@nongnu.org; Tue, 29 Sep 2009 16:49:56 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8TKntou028586 for ; Tue, 29 Sep 2009 16:49:55 -0400 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n8TKnHY4006885; Tue, 29 Sep 2009 16:49:54 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Tue, 29 Sep 2009 22:48:48 +0200 Message-Id: <91ca3957976b6d22a376d0de178e1157596c8604.1254255997.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH 29/49] x86: hflags is not modified at all, just save it directly X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Juan Quintela --- target-i386/machine.c | 10 ++-------- 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/target-i386/machine.c b/target-i386/machine.c index ab31329..16dc4a2 100644 --- a/target-i386/machine.c +++ b/target-i386/machine.c @@ -27,7 +27,6 @@ void cpu_save(QEMUFile *f, void *opaque) { CPUState *env = opaque; uint16_t fptag, fpus, fpuc, fpregs_format; - uint32_t hflags; int32_t a20_mask; int32_t pending_irq; int i, bit; @@ -38,8 +37,7 @@ void cpu_save(QEMUFile *f, void *opaque) qemu_put_betls(f, &env->regs[i]); qemu_put_betls(f, &env->eip); qemu_put_betls(f, &env->eflags); - hflags = env->hflags; /* XXX: suppress most of the redundant hflags */ - qemu_put_be32s(f, &hflags); + qemu_put_be32s(f, &env->hflags); /* FPU */ fpuc = env->fpuc; @@ -201,7 +199,6 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id) { CPUState *env = opaque; int i, guess_mmx; - uint32_t hflags; uint16_t fpus, fpuc, fptag, fpregs_format; int32_t a20_mask; int32_t pending_irq; @@ -213,7 +210,7 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id) qemu_get_betls(f, &env->regs[i]); qemu_get_betls(f, &env->eip); qemu_get_betls(f, &env->eflags); - qemu_get_be32s(f, &hflags); + qemu_get_be32s(f, &env->hflags); qemu_get_be16s(f, &fpuc); qemu_get_be16s(f, &fpus); @@ -377,9 +374,6 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id) } } - /* XXX: ensure compatiblity for halted bit ? */ - /* XXX: compute redundant hflags bits */ - env->hflags = hflags; tlb_flush(env, 1); return 0; }