From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvYEK-0005Rk-Vn for qemu-devel@nongnu.org; Thu, 21 May 2015 17:42:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YvYEH-0001mu-0A for qemu-devel@nongnu.org; Thu, 21 May 2015 17:42:16 -0400 Received: from mail-qg0-x230.google.com ([2607:f8b0:400d:c04::230]:32941) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvYEG-0001mq-Qn for qemu-devel@nongnu.org; Thu, 21 May 2015 17:42:12 -0400 Received: by qgfa63 with SMTP id a63so290834qgf.0 for ; Thu, 21 May 2015 14:42:12 -0700 (PDT) Sender: Richard Henderson Message-ID: <555E512F.4050603@twiddle.net> Date: Thu, 21 May 2015 14:42:07 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1432243971-26417-1-git-send-email-aurelien@aurel32.net> In-Reply-To: <1432243971-26417-1-git-send-email-aurelien@aurel32.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] target-s390x: fix LOAD MULTIPLE instruction on page boundary List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno , qemu-devel@nongnu.org Cc: Alexander Graf 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 > Cc: Richard Henderson > Signed-off-by: Aurelien Jarno > --- > 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 It would be nice to know if there ought to be similar up-front access checking for STM, to avoid errant partial stores. r~