Message ID | 20180110195056.85403-3-lepton@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6FB62601A1 for <patchwork-qemu-devel@patchwork.kernel.org>; Wed, 10 Jan 2018 19:54:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 61B9328469 for <patchwork-qemu-devel@patchwork.kernel.org>; Wed, 10 Jan 2018 19:54:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 544D028471; Wed, 10 Jan 2018 19:54:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E969D28469 for <patchwork-qemu-devel@patchwork.kernel.org>; Wed, 10 Jan 2018 19:54:16 +0000 (UTC) Received: from localhost ([::1]:35763 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1eZMS0-0005B2-1P for patchwork-qemu-devel@patchwork.kernel.org; Wed, 10 Jan 2018 14:54:16 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47803) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <lepton@google.com>) id 1eZMPj-0003Os-B6 for qemu-devel@nongnu.org; Wed, 10 Jan 2018 14:51:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <lepton@google.com>) id 1eZMPi-0001n0-HW for qemu-devel@nongnu.org; Wed, 10 Jan 2018 14:51:55 -0500 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]:41163) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <lepton@google.com>) id 1eZMPi-0001m4-7w for qemu-devel@nongnu.org; Wed, 10 Jan 2018 14:51:54 -0500 Received: by mail-pg0-x242.google.com with SMTP id m17so206498pgd.8 for <qemu-devel@nongnu.org>; Wed, 10 Jan 2018 11:51:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3CfqtCKH1qWVgvuNlXYig2JlabKhXspPWEkFwNfOqN0=; b=aXgOmFjFvcXIU4FASPgVxq+8xP58JOvhdBrCJSpSgIKp3gTkLDLaBMOz/PiAv3HoYw R6AKCXZUoWWXUNUP1+TbNz1VkL2ZaoMiffkZaiJZf9NgsOVqDriQfgEc7qVQ38ES8sg4 JYU+soWszX8i9yQBCpAuWyYEhnhJQasSErSt/4zhgqZMUvvkhK/qqMnsj4Fwd1lcuqKN 5gfNbPbQDnfWoeiGJ2LSH9lnRngU7BJyE/dNnCJrV8lTDWNV4H3niMGP6ynWsC8b8MEV 65gHYxaZfcyz4FpsqBcZJXKijpgqv5ThRKE95VFxV/3cuht2UOFAAH5qycZYbS5uxDLe aNpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3CfqtCKH1qWVgvuNlXYig2JlabKhXspPWEkFwNfOqN0=; b=h7Jj/En89yaGSiSlGxcfvmW3A1lA2L+8Eg5vgCJWnDhKEj0Zwvgy/PNrgAbjis/SAs K8qT3Q3JGbVFRh7JCXV+5RpuaPyq2KRifOIDDD87+9FqjnaARa/Kcn+HcpFRSnYjlNTn hOWlj0ZHRD+fx1ArFCRbwmPdwenBLARnWmXgRZZ5iehhaH6dteVPDq1kz17kHUsOcSmH Gcv1hnVw7bqkDK2vfnAZ3tPxbfCjWbFzB1MV5hWaHeTt0Rj074RSfrJFg2osRZV4drBb LjJySkAJRgpNTgtz/sXoxLbSBzY4XSOAIqgV1KgWIUSsdy5GzD6pgkEcNB2wOGeHgpFw +ivw== X-Gm-Message-State: AKwxytfxotHsP+LytE+9CgRBlHCu3Eu+Ngcp3EmR4vbQDq588XzMoae1 2ojUV1b8mznwv0m7FHXN2ftJbg== X-Google-Smtp-Source: ACJfBovbw84sbOW6WCdg+CV+gos6HvL81/Pn3XundU7VO5O24cwVvcgjxXM3jdTXLw7IrTjAZpy3tg== X-Received: by 10.99.7.14 with SMTP id 14mr1022741pgh.68.1515613912870; Wed, 10 Jan 2018 11:51:52 -0800 (PST) Received: from paxos.mtv.corp.google.com ([2620:0:1000:1611:f4de:39e6:d38c:64eb]) by smtp.gmail.com with ESMTPSA id m65sm35418541pfm.41.2018.01.10.11.51.51 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Jan 2018 11:51:51 -0800 (PST) To: qemu-devel@nongnu.org Date: Wed, 10 Jan 2018 11:50:56 -0800 Message-Id: <20180110195056.85403-3-lepton@google.com> X-Mailer: git-send-email 2.16.0.rc1.238.g530d649a79-goog In-Reply-To: <20180110195056.85403-1-lepton@google.com> References: <20180110064706.49777-1-lepton@google.com> <20180110195056.85403-1-lepton@google.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::242 Subject: [Qemu-devel] [PATCH v2 3/3] target/i386: hax: Move x86_update_hflags. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> From: Tao Wu via Qemu-devel <qemu-devel@nongnu.org> Reply-To: Tao Wu <lepton@google.com> Cc: pbonzini@redhat.com, Tao Wu <lepton@google.com>, ehabkost@redhat.com, rth@twiddle.net Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/target/i386/hax-all.c b/target/i386/hax-all.c index dc379373f7..5a4a5025b9 100644 --- a/target/i386/hax-all.c +++ b/target/i386/hax-all.c @@ -838,9 +838,6 @@ static int hax_sync_vcpu_register(CPUArchState *env, int set) return -1; } } - if (!set) { - x86_update_hflags(env); - } return 0; } @@ -1021,6 +1018,7 @@ static int hax_arch_get_registers(CPUArchState *env) return ret; } + x86_update_hflags(env); return 0; }
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 <lepton@google.com> --- target/i386/hax-all.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)