qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Pierre Morel <pmorel@linux.ibm.com>, cohuck@redhat.com
Cc: david@redhat.com, qemu-devel@nongnu.org, pasic@linux.ibm.com,
	borntraeger@de.ibm.com, qemu-s390x@nongnu.org,
	imbrenda@linux.ibm.com, rth@twiddle.net
Subject: Re: [PATCH 1/1] css: SCHIB measurement block origin must be aligned
Date: Fri, 19 Feb 2021 07:23:20 +0100	[thread overview]
Message-ID: <23380d4e-39d0-0c49-e734-c0611ecc9a6e@redhat.com> (raw)
In-Reply-To: <1613670059-8406-2-git-send-email-pmorel@linux.ibm.com>

On 18/02/2021 18.40, Pierre Morel wrote:
> The Measurement Block Origin inside the SCHIB is used when
> Mesurement Block format 1 is in used and must be aligned
> on 128bits.

128 bits = 16 bytes ...

> 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)) {

... but that checks for a 64 byte alignment...

And looking at the PoP, I also see some talk about 64 byte alignment there, 
so I guess you meant 64 byte insteas of 128 bit in the patch description?

  Thomas


> +        return 0;
> +    }
>       return 1;
>   }
>   
> 



      reply	other threads:[~2021-02-19  6:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-18 17:40 [PATCH 0/1] css: SCHIB measurement block origin must be aligned Pierre Morel
2021-02-18 17:40 ` [PATCH 1/1] " Pierre Morel
2021-02-19  6:23   ` Thomas Huth [this message]

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=23380d4e-39d0-0c49-e734-c0611ecc9a6e@redhat.com \
    --to=thuth@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=imbrenda@linux.ibm.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).