From: Richard Henderson <rth@twiddle.net>
To: Aurelien Jarno <aurelien@aurel32.net>, qemu-devel@nongnu.org
Cc: Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH] target-s390x: fix LOAD MULTIPLE instruction on page boundary
Date: Thu, 21 May 2015 14:42:07 -0700 [thread overview]
Message-ID: <555E512F.4050603@twiddle.net> (raw)
In-Reply-To: <1432243971-26417-1-git-send-email-aurelien@aurel32.net>
On 05/21/2015 02:32 PM, Aurelien Jarno wrote:
> When consecutive memory locations are on page boundary a page fault
> might occur when using the LOAD MULTIPLE instruction. In that case real
> hardware doesn't load any register.
>
> This is an important detail in case the base register is in the list
> of registers to be loaded. If a page fault occurs this register might be
> overwritten and when the instruction is later restarted the wrong
> base register value is useD.
>
> Fix this by first loading all values from memory and then writing them
> back to the registers.
>
> This fixes random segmentation faults seen in the guest.
>
> Cc: Alexander Graf <agraf@suse.de>
> Cc: Richard Henderson <rth@twiddle.net>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
> target-s390x/translate.c | 56 +++++++++++++++++++++++++++++++++++++++++++-----
> 1 file changed, 51 insertions(+), 5 deletions(-)
Hmm. Seems to be un/under-specified in the PoO. That said,
Reviewed-by: Richard Henderson <rth@twiddle.net>
It would be nice to know if there ought to be similar up-front access checking
for STM, to avoid errant partial stores.
r~
next prev parent reply other threads:[~2015-05-21 21:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-21 21:32 [Qemu-devel] [PATCH] target-s390x: fix LOAD MULTIPLE instruction on page boundary Aurelien Jarno
2015-05-21 21:42 ` Richard Henderson [this message]
2015-05-23 7:59 ` Aurelien Jarno
2015-05-23 19:33 ` Richard Henderson
2015-05-25 20:47 ` Alexander Graf
2015-05-25 21:04 ` Aurelien Jarno
2015-05-25 21:05 ` Aurelien Jarno
2015-05-25 21:55 ` Alexander Graf
2015-05-26 7:09 ` Peter Maydell
2015-05-26 16:23 ` Richard Henderson
2015-05-21 22:00 ` Alexander Graf
2015-05-23 8:22 ` Aurelien Jarno
2015-05-23 9:26 ` Peter Maydell
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=555E512F.4050603@twiddle.net \
--to=rth@twiddle.net \
--cc=agraf@suse.de \
--cc=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
/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).