From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40554) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xli58-0006YV-Nl for qemu-devel@nongnu.org; Tue, 04 Nov 2014 12:39:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xli53-00078l-Q5 for qemu-devel@nongnu.org; Tue, 04 Nov 2014 12:39:50 -0500 Received: from mail.uni-paderborn.de ([131.234.142.9]:58572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xli53-00078a-Ju for qemu-devel@nongnu.org; Tue, 04 Nov 2014 12:39:45 -0500 Message-ID: <54591D87.2060605@mail.uni-paderborn.de> Date: Tue, 04 Nov 2014 18:40:07 +0000 From: Bastian Koppelmann MIME-Version: 1.0 References: <1415103708-115450-1-git-send-email-agraf@suse.de> <1415103708-115450-3-git-send-email-agraf@suse.de> In-Reply-To: <1415103708-115450-3-git-send-email-agraf@suse.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] s390x: Ignore sam31 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf , rth@twiddle.net Cc: qemu-devel@nongnu.org Hi Alex, I'm not really happy with that. A brief look into the instruction manual shows, that modal instructions have different outputs depending on the addressing mode. On the long run it would be better to implement this. That said I'm not an expert on s390x and there is a reason we're only doing 64-bit. Thanks, Bastian On 11/04/2014 12:21 PM, Alexander Graf wrote: > The SAM31 instruction switches the memory model to 31bit. Linux uses > it on bootup, so we have to implement it. We only really model the 64bit > memory model though, so we can nop it, cross our fingers and hope for > the guest to not rely on 32bit wrap semantics. > > Signed-off-by: Alexander Graf > --- > target-s390x/insn-data.def | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/target-s390x/insn-data.def b/target-s390x/insn-data.def > index b42ebb6..4cc2da4 100644 > --- a/target-s390x/insn-data.def > +++ b/target-s390x/insn-data.def > @@ -744,8 +744,10 @@ > /* SERVICE CALL LOGICAL PROCESSOR (PV hypercall) */ > C(0xb220, SERVC, RRE, Z, r1_o, r2_o, 0, 0, servc, 0) > /* SET ADDRESSING MODE */ > + /* We have to nop SAM31, it is used by early Linux bootup */ > + C(0x010d, SAM31, E, Z, 0, 0, 0, 0, 0, 0) > /* We only do 64-bit, so accept this as a no-op. > - Let SAM24 and SAM31 signal illegal instruction. */ > + Let SAM24 signal illegal instruction. */ > C(0x010e, SAM64, E, Z, 0, 0, 0, 0, 0, 0) > /* SET ADDRESS SPACE CONTROL FAST */ > C(0xb279, SACF, S, Z, 0, a2, 0, 0, sacf, 0)