qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
To: Alexander Graf <agraf@suse.de>, rth@twiddle.net
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] s390x: Ignore sam31
Date: Tue, 04 Nov 2014 18:40:07 +0000	[thread overview]
Message-ID: <54591D87.2060605@mail.uni-paderborn.de> (raw)
In-Reply-To: <1415103708-115450-3-git-send-email-agraf@suse.de>

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 <agraf@suse.de>
> ---
>   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	other threads:[~2014-11-04 17:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-04 12:21 [Qemu-devel] [PATCH 0/2] s390x: virtio-less ccw target enablement Alexander Graf
2014-11-04 12:21 ` [Qemu-devel] [PATCH 1/2] s390x: Fix sclp console input Alexander Graf
2014-11-04 19:05   ` Bastian Koppelmann
2014-11-04 12:21 ` [Qemu-devel] [PATCH 2/2] s390x: Ignore sam31 Alexander Graf
2014-11-04 18:40   ` Bastian Koppelmann [this message]
2014-11-04 19:06     ` Alexander Graf

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=54591D87.2060605@mail.uni-paderborn.de \
    --to=kbastian@mail.uni-paderborn.de \
    --cc=agraf@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).