qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Richard Henderson <rth@twiddle.net>
Cc: alexander.boettcher@genode-labs.com, qemu-devel@nongnu.org,
	Paolo Bonzini <pbonzini@redhat.com>,
	Eduardo Habkost <ehabkost@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] target/i386: move nested exception check to x86_cpu_exec_interrupt
Date: Tue, 07 Mar 2017 15:03:41 +0000	[thread overview]
Message-ID: <87a88xi0xe.fsf@linaro.org> (raw)
In-Reply-To: <5d60b86e-d57d-fbcd-fb54-d7447816244d@twiddle.net>


Richard Henderson <rth@twiddle.net> writes:

> 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?

Yeah - I've nabbed Paolo's much cleaner and more informed fix and that
seems fine.

--
Alex Bennée

  reply	other threads:[~2017-03-07 15:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-05 16:59 [Qemu-devel] Qemu deadlocks in tb_lock when using SVM+SoftMMU Alexander Boettcher
2017-03-05 21:32 ` Alex Bennée
2017-03-06  1:34   ` Richard Henderson
2017-03-06 16:58     ` Paolo Bonzini
2017-03-06 19:21       ` Richard Henderson
2017-03-06 20:03       ` Alexander Boettcher
2017-03-06 13:15 ` Alex Bennée
2017-03-06 13:21   ` Alexander Boettcher
2017-03-06 14:42     ` Alex Bennée
2017-03-06 15:11       ` Alexander Boettcher
2017-03-06 15:57         ` [Qemu-devel] [PATCH] target/i386: move nested exception check to x86_cpu_exec_interrupt Alex Bennée
2017-03-06 19:24           ` Richard Henderson
2017-03-07 15:03             ` Alex Bennée [this message]
2017-03-06 16:24         ` [Qemu-devel] Qemu deadlocks in tb_lock when using SVM+SoftMMU Alex Bennée
2017-03-06 20:11           ` Alexander Boettcher
2017-03-06 20:56             ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a88xi0xe.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=alexander.boettcher@genode-labs.com \
    --cc=ehabkost@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).