From patchwork Tue Sep 22 04:17:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Crosher X-Patchwork-Id: 1368774 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=scieneer.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BwXN81V1rz9sSC for ; Tue, 22 Sep 2020 17:03:50 +1000 (AEST) Received: from localhost ([::1]:38588 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKcL6-0007Ry-TE for incoming@patchwork.ozlabs.org; Tue, 22 Sep 2020 03:03:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKZkl-0004jc-Uf for qemu-devel@nongnu.org; Tue, 22 Sep 2020 00:18:07 -0400 Received: from gw1.scieneer.com ([2001:470:5:c1c::1]:37982) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKZkj-0002I0-8G for qemu-devel@nongnu.org; Tue, 22 Sep 2020 00:18:07 -0400 Received: from dtc-pc.scieneer.com (dtc-pc.scieneer.com [192.168.2.100]) by gw1.scieneer.com (8.14.7/8.14.7) with ESMTP id 08M4HuWm010000 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 22 Sep 2020 14:17:58 +1000 From: Douglas Crosher Subject: [PATCH] helper_syscall x86_64: clear exception_is_int To: qemu-devel@nongnu.org Message-ID: Date: Tue, 22 Sep 2020 14:17:56 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 Content-Language: en-US Received-SPF: pass client-ip=2001:470:5:c1c::1; envelope-from=dtc-ubuntu@scieneer.com; helo=gw1.scieneer.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 22 Sep 2020 03:01:54 -0400 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, ehabkost@redhat.com, rth@twiddle.net Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The exception_is_int flag may be set on entry to helper_syscall, e.g. after a prior interrupt that has returned, and processing EXCP_SYSCALL as an interrupt causes it to fail so clear this flag. Signed-off-by: Douglas Crosher --- target/i386/seg_helper.c | 1 + 1 file changed, 1 insertion(+) } diff --git a/target/i386/seg_helper.c b/target/i386/seg_helper.c index b96de068ca..be88938c2a 100644 --- a/target/i386/seg_helper.c +++ b/target/i386/seg_helper.c @@ -975,6 +975,7 @@ void helper_syscall(CPUX86State *env, int next_eip_addend) CPUState *cs = env_cpu(env); cs->exception_index = EXCP_SYSCALL; + env->exception_is_int = 0; env->exception_next_eip = env->eip + next_eip_addend; cpu_loop_exit(cs);