qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Pierre Morel <pmorel@linux.ibm.com>, qemu-devel@nongnu.org
Cc: david@redhat.com, cohuck@redhat.com, pasic@linux.ibm.com,
	borntraeger@de.ibm.com, qemu-s390x@nongnu.org, rth@twiddle.net
Subject: Re: [PATCH v2 1/1] css: SCHIB measurement block origin must be aligned
Date: Fri, 19 Feb 2021 14:41:58 +0100	[thread overview]
Message-ID: <c5d8de0c-9dab-ec80-3ac7-cd180baed81a@redhat.com> (raw)
In-Reply-To: <1613741973-3711-2-git-send-email-pmorel@linux.ibm.com>

On 19/02/2021 14.39, Pierre Morel wrote:
> The Measurement Block Origin inside the SCHIB is used when
> Measurement Block format 1 is in used and must be aligned
> on 64 bytes otherwise an operand exception is recognized
> when issuing the Modify Sub CHannel (MSCH) instruction.
> 
> Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
> ---
>   target/s390x/ioinst.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/target/s390x/ioinst.c b/target/s390x/ioinst.c
> index a412926d27..1ee11522e1 100644
> --- a/target/s390x/ioinst.c
> +++ b/target/s390x/ioinst.c
> @@ -121,6 +121,12 @@ static int ioinst_schib_valid(SCHIB *schib)
>       if (be32_to_cpu(schib->pmcw.chars) & PMCW_CHARS_MASK_XMWME) {
>           return 0;
>       }
> +    /* for MB format 1 bits 26-31 of word 11 must be 0 */
> +    /* MBA uses words 10 and 11, it means align on 2**6 */
> +    if ((be16_to_cpu(schib->pmcw.chars) & PMCW_CHARS_MASK_MBFC) &&
> +        (be64_to_cpu(schib->mba) & 0x03fUL)) {
> +        return 0;
> +    }
>       return 1;
>   }

Reviewed-by: Thomas Huth <thuth@redhat.com>



  reply	other threads:[~2021-02-19 13:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19 13:39 [PATCH v2 0/1] css: SCHIB measurement block origin must be aligned Pierre Morel
2021-02-19 13:39 ` [PATCH v2 1/1] " Pierre Morel
2021-02-19 13:41   ` Thomas Huth [this message]
2021-02-19 18:49     ` Pierre Morel
2021-02-22 11:11 ` [PATCH v2 0/1] " Cornelia Huck

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=c5d8de0c-9dab-ec80-3ac7-cd180baed81a@redhat.com \
    --to=thuth@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=pmorel@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@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).