From nobody Tue Oct 28 02:08:41 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516114423540715.8465118347776; Tue, 16 Jan 2018 06:53:43 -0800 (PST) Received: from localhost ([::1]:39425 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebScN-0006g3-Nq for importer@patchew.org; Tue, 16 Jan 2018 09:53:39 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50598) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebS4J-0003I6-K8 for qemu-devel@nongnu.org; Tue, 16 Jan 2018 09:18:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebS4D-0004xV-RB for qemu-devel@nongnu.org; Tue, 16 Jan 2018 09:18:27 -0500 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]:45407) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ebS4D-0004x6-Kb for qemu-devel@nongnu.org; Tue, 16 Jan 2018 09:18:21 -0500 Received: by mail-wr0-x243.google.com with SMTP id 16so15332905wry.12 for ; Tue, 16 Jan 2018 06:18:21 -0800 (PST) Received: from 640k.lan (dynamic-adsl-78-12-229-84.clienti.tiscali.it. [78.12.229.84]) by smtp.gmail.com with ESMTPSA id u10sm1537758wrg.6.2018.01.16.06.18.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jan 2018 06:18:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=8Iwdh02lxAuXCra5iQtGrzdFxaBXGGrboF8XSt4xjYE=; b=hy0v7uwu5qztzN90HV0IeuFpcV+askmiuIUth+RAgc1W5rOsX4H7TcrhhFnv1v5a0m HDx4wIWaqmuShA3bNLUarzt3UIIFPVVM7DWMvQGh5+bqEaheTk7EYGZ9nalCZPdbCmvW B/L1RfM7iyqurzAeM1l9N/05AJC/CZ54AeQirSxHcA/QCDtWRoXFeo3bAQK8joAaE5cY fp7MpntrVH8jR4jndi1eBelL5HMiXGbLLTP3QfhyNRm668/ZL8JeJWExEbcQsVIOVMco GmNcTV73k0YuBA1uRyuk94GfXU7d50kGXwHQdZXcZ0Lq+hsTkk2M4qP2hxliCOYqxvWL EzcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=8Iwdh02lxAuXCra5iQtGrzdFxaBXGGrboF8XSt4xjYE=; b=EhAyI2AUEHYcPxwWDvcNp7I22jdYv1Y52VYmDwicnPEqV1bNPPnDIrwfQ0pItvS1dr SDFEbRSelGEh2fEycI6fFmf0al3CIY0br28ONLRhz0+EFgNONaaUlcAeRpyP/TtQILKH qWL0wupDOgov/7Hcr80sXmry1RR1g9XIlaywgEwgYmmqdQD00rCPuHtOvR950YrZ/pPZ CDhQF1RAVJxG2sWH6CLnqqQ/8cjTSP1MQ+XabEnVHOuUG9vf0NUnVJQx4rYFV8gHv4wK 1o46IhMfk5TDzddc9YfhueMCIjpTNZ/D30d2uvOuDN1wRUAw4E7TaaA+Xl+YDNYwI/zI arwQ== X-Gm-Message-State: AKwxytfcGxFXl3mVgS6HRc2m22NVdglgxVNiqd4+UIKMi/q48SWxlyhg 1qqFdhtvLibiM4gb+2ksryawM6gK X-Google-Smtp-Source: ACJfBovdAWJH++HJ9Rd5JWiOlwHXBCupDcCBYk8UqIi6heGzimp5y2n3QR4jE5IASX7ECtlB64Zw6w== X-Received: by 10.223.165.153 with SMTP id g25mr21454536wrc.141.1516112300328; Tue, 16 Jan 2018 06:18:20 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 16 Jan 2018 15:17:13 +0100 Message-Id: <1516112253-14480-32-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1516112253-14480-1-git-send-email-pbonzini@redhat.com> References: <1516112253-14480-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::243 Subject: [Qemu-devel] [PULL 31/51] target/i386: hax: Move x86_update_hflags. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tao Wu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Tao Wu x86_update_hflags reference env->efer which is updated in hax_get_msrs, so it has to be called after hax_get_msrs. This fix the bug that sometimes dump_state show 32 bits regs even in 64 bits mode. Signed-off-by: Tao Wu Message-Id: <20180110195056.85403-3-lepton@google.com> Signed-off-by: Paolo Bonzini --- target/i386/hax-all.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/i386/hax-all.c b/target/i386/hax-all.c index 07df73e..934ec4a 100644 --- a/target/i386/hax-all.c +++ b/target/i386/hax-all.c @@ -837,9 +837,6 @@ static int hax_sync_vcpu_register(CPUArchState *env, in= t set) return -1; } } - if (!set) { - x86_update_hflags(env); - } return 0; } =20 @@ -1020,6 +1017,7 @@ static int hax_arch_get_registers(CPUArchState *env) return ret; } =20 + x86_update_hflags(env); return 0; } =20 --=20 1.8.3.1