Received: from eggs.gnu.org ([2001:4830:134:3::10]:53942) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckyEu-00005I-SY for qemu-devel@nongnu.org; Mon, 06 Mar 2017 14:24:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ckyEu-0003ay-3m for qemu-devel@nongnu.org; Mon, 06 Mar 2017 14:24:12 -0500 Received: from mail-yw0-x22c.google.com ([2607:f8b0:4002:c05::22c]:33081) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ckyEt-0003ae-W3 for qemu-devel@nongnu.org; Mon, 06 Mar 2017 14:24:12 -0500 Received: by mail-yw0-x22c.google.com with SMTP id v76so29612959ywg.0 for ; Mon, 06 Mar 2017 11:24:11 -0800 (PST) Sender: Richard Henderson References: <20170306155722.31315-1-alex.bennee@linaro.org> From: Richard Henderson Message-ID: <5d60b86e-d57d-fbcd-fb54-d7447816244d@twiddle.net> Date: Tue, 7 Mar 2017 06:24:05 +1100 MIME-Version: 1.0 In-Reply-To: <20170306155722.31315-1-alex.bennee@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] target/i386: move nested exception check to x86_cpu_exec_interrupt List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Alex_Benn=c3=a9e?= , alexander.boettcher@genode-labs.com Cc: qemu-devel@nongnu.org, Paolo Bonzini , Eduardo Habkost On 03/07/2017 02:57 AM, Alex Bennée wrote: > cs->exception_index = intno; > env->error_code = error_code; > env->exception_is_int = is_int; > env->exception_next_eip = env->eip + next_eip_addend; > + env->exception_retaddr = retaddr; > cpu_loop_exit_restore(cs, retaddr); Since you've restored state here, I don't see that you need to save the retaddr at all ... > + if (!env->exception_is_int) { > + cpu_svm_check_intercept_param(env, > + SVM_EXIT_EXCP_BASE + cs->exception_index, > + env->error_code, > + env->exception_retaddr); > + cs->exception_index = check_exception(env, cs->exception_index, > + &env->error_code, > + env->exception_retaddr); > + } else { > + cpu_svm_check_intercept_param(env, SVM_EXIT_SWINT, 0, > + env->exception_retaddr); > + } ... simply pass zero here instead. But do I see correctly from the thread that we don't have a reproducer? r~