From: David Hildenbrand <david@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Thomas Huth <thuth@redhat.com>, Cornelia Huck <cohuck@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>,
qemu-devel@nongnu.org, qemu-s390x@nongnu.org,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v4] s390x/tcg: MVCL: Exit to main loop if requested
Date: Thu, 10 Oct 2019 12:25:54 +0200 [thread overview]
Message-ID: <747295a4-708c-b8ce-feb0-fc15e0adc79e@redhat.com> (raw)
In-Reply-To: <874l0hm2ey.fsf@linaro.org>
On 10.10.19 10:26, Alex Bennée wrote:
>
> David Hildenbrand <david@redhat.com> writes:
>
>> MVCL is interruptible and we should check for interrupts and process
>> them after writing back the variables to the registers. Let's check
>> for any exit requests and exit to the main loop. Introduce a new helper
>> function for that: cpu_loop_exit_requested().
>>
>> When booting Fedora 30, I can see a handful of these exits and it seems
>> to work reliable. Also, Richard explained why this works correctly even
>> when MVCL is called via EXECUTE:
>>
>> (1) TB with EXECUTE runs, at address Ae
>> - env->psw_addr stored with Ae.
>> - helper_ex() runs, memory address Am computed
>> from D2a(X2a,B2a) or from psw.addr+RI2.
>> - env->ex_value stored with memory value modified by R1a
>>
>> (2) TB of executee runs,
>> - env->ex_value stored with 0.
>> - helper_mvcl() runs, using and updating R1b, R1b+1, R2b, R2b+1.
>>
>> (3a) helper_mvcl() completes,
>> - TB of executee continues, psw.addr += ilen.
>> - Next instruction is the one following EXECUTE.
>>
>> (3b) helper_mvcl() exits to main loop,
>> - cpu_loop_exit_restore() unwinds psw.addr = Ae.
>> - Next instruction is the EXECUTE itself...
>> - goto 1.
>>
>> As the PoP mentiones that an interruptible instruction called via EXECUTE
>> should avoid modifying storage/registers that are used by EXECUTE itself,
>> it is fine to retrigger EXECUTE.
>>
>> Cc: Alex Bennée <alex.bennee@linaro.org>
>> Cc: Peter Maydell <peter.maydell@linaro.org>
>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>> Suggested-by: Richard Henderson <richard.henderson@linaro.org>
>> Signed-off-by: David Hildenbrand <david@redhat.com>
>
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Thanks,
Queued to
https://github.com/davidhildenbrand/qemu.git s390-tcg-next
--
Thanks,
David / dhildenb
prev parent reply other threads:[~2019-10-10 10:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-09 11:00 [PATCH v4] s390x/tcg: MVCL: Exit to main loop if requested David Hildenbrand
2019-10-09 12:13 ` Richard Henderson
2019-10-10 8:26 ` Alex Bennée
2019-10-10 10:25 ` David Hildenbrand [this message]
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=747295a4-708c-b8ce-feb0-fc15e0adc79e@redhat.com \
--to=david@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=cohuck@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
/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).