]> git.proxmox.com Git - mirror_qemu.git/commit - target-s390x/translate.c
target-s390x: fix LOAD MULTIPLE instruction on page boundary
authorAurelien Jarno <aurelien@aurel32.net>
Tue, 26 May 2015 09:09:44 +0000 (11:09 +0200)
committerAlexander Graf <agraf@suse.de>
Thu, 4 Jun 2015 23:37:58 +0000 (01:37 +0200)
commitaa752a4afc2a4b7ede58a960a9d553b3fd9e6882
tree7d1007d978a60f640ffbec5c1a4ca7ba86f9651f
parentb8ae94bd398ff772f40fb232887ecbcbd244c3d4
target-s390x: fix LOAD MULTIPLE instruction on page boundary

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 the first and last value from memory, hence
triggering all possible page faults, and then the remaining registers.

This fixes random segmentation faults seen in the guest.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
target-s390x/translate.c