qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] s390x: Ignore sam31


From: Bastian Koppelmann
Subject: Re: [Qemu-devel] [PATCH 2/2] s390x: Ignore sam31
Date: Tue, 04 Nov 2014 18:40:07 +0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

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 <address@hidden>
---
  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)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]