From patchwork Tue Apr 15 15:17:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Himanshu Chauhan X-Patchwork-Id: 339309 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 ozlabs.org (Postfix) with ESMTPS id F2CB5140083 for ; Wed, 16 Apr 2014 01:18:19 +1000 (EST) Received: from localhost ([::1]:49798 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wa57p-0001xd-PW for incoming@patchwork.ozlabs.org; Tue, 15 Apr 2014 11:18:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48069) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wa57P-0001CP-Oj for qemu-devel@nongnu.org; Tue, 15 Apr 2014 11:17:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wa57J-0004jD-CR for qemu-devel@nongnu.org; Tue, 15 Apr 2014 11:17:51 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:50642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wa57J-0004is-6x for qemu-devel@nongnu.org; Tue, 15 Apr 2014 11:17:45 -0400 Received: by mail-pa0-f51.google.com with SMTP id kq14so9743692pab.38 for ; Tue, 15 Apr 2014 08:17:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=beMmGtvSi2ms2qkhAJRixdkDOB/ZKRpDos1+ZY8X3qA=; b=QXJnidfkN8CbKrhmhN5il/iz4KqzYWhpA7384r7NhncM5jdMWVAoFUH/cY1NWCMC3w UAoxdqBva9LcqUfiJzFer9urcR0KVtumcYhy8PrFyoolWN2+WF4zahokEyQfNhsuKgUb UQBo2rCUm6tWsKv92M2BVv+V4SRYxhpypNul4Tc/GsR/XpiK1GaswFqPwbPv2Ml2kMZa TXfz7H0YFwOeqBUw++gxkez6QzvpbDEZh+FOOJ1H5/Yb9gJPWxF8rnU6aJJKWSInARQp g9O4HzuFVUeOdFDlMp2iAmHqZC2UzBtmfXjRAgK/p/VKGQ/G3n1ef1RK5GKbcP6/7TNK p4LQ== X-Gm-Message-State: ALoCoQk7O4TxmUsSiydGn0jQZlMllCX40dVSFNfMPdPKcLjGoZ/NZMDd8fygRvzEQ0h3ERJRBN+W X-Received: by 10.68.203.135 with SMTP id kq7mr2486797pbc.85.1397575063772; Tue, 15 Apr 2014 08:17:43 -0700 (PDT) Received: from localhost.localdomain ([122.181.11.242]) by mx.google.com with ESMTPSA id ss2sm97132118pab.8.2014.04.15.08.17.41 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 15 Apr 2014 08:17:42 -0700 (PDT) From: Himanshu Chauhan To: qemu-devel@nongnu.org Date: Tue, 15 Apr 2014 20:47:25 +0530 Message-Id: <1397575045-25368-1-git-send-email-hschauhan@nulltrace.org> X-Mailer: git-send-email 1.8.3.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.220.51 Cc: Himanshu Chauhan Subject: [Qemu-devel] [PATCH] do_interrupt64 shouldn't be called when GIF is not set. 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 I am not very sure about the place(s) we would need this. But I think this is required. Please advise. When having SVM enabled, the do_interrupt64 shouldn't be called unless GIF is set otherwise this causes random behaviour especially bad TR in case guest is running. Signed-off-by: Himanshu Chauhan --- target-i386/seg_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/seg_helper.c b/target-i386/seg_helper.c index 8c3f92c..c813bb9 100644 --- a/target-i386/seg_helper.c +++ b/target-i386/seg_helper.c @@ -1212,7 +1212,7 @@ static void do_interrupt_all(X86CPU *cpu, int intno, int is_int, } #endif #ifdef TARGET_X86_64 - if (env->hflags & HF_LMA_MASK) { + if (env->hflags & HF_LMA_MASK && env->hflags & HF2_GIF_MASK) { do_interrupt64(env, intno, is_int, error_code, next_eip, is_hw); } else #endif