public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Janosch Frank <frankja@linux.ibm.com>
To: Christoph Schlameuss <schlameuss@linux.ibm.com>,
	linux-s390@vger.kernel.org
Cc: "Claudio Imbrenda" <imbrenda@linux.ibm.com>,
	"Nico Böhr" <nrb@linux.ibm.com>,
	"David Hildenbrand" <david@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Nina Schoetterl-Glausch" <nsg@linux.ibm.com>,
	kvm@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH 2/3] s390x: sclp: Add detection of alternate STFLE facilities
Date: Fri, 20 Feb 2026 11:20:41 +0100	[thread overview]
Message-ID: <48e794f6-0dc8-4e7e-8bf7-399015b044c2@linux.ibm.com> (raw)
In-Reply-To: <20260211-vsie-stfle-fac-v1-2-46c7aec5912b@linux.ibm.com>

On 2/11/26 15:57, Christoph Schlameuss wrote:
> From: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
> 
> Detect availability of alternate STFLE interpretive execution facilities
> 1 and 2.
> Also fix number of unassigned bits in sclp_facilities which wasn't
> adjusted in a prior commit adding entries to sclp_facilities.
> 
> Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
> Signed-off-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
> ---
>   lib/s390x/sclp.c | 2 ++
>   lib/s390x/sclp.h | 6 +++++-
>   2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/s390x/sclp.c b/lib/s390x/sclp.c
> index 2f902e39e785ff4e139a39be2ffe11b5fa01edc0..7408b813b6396d572d740c19c15175e173fed596 100644
> --- a/lib/s390x/sclp.c
> +++ b/lib/s390x/sclp.c
> @@ -163,8 +163,10 @@ void sclp_facilities_setup(void)
>   	sclp_facilities.has_cmma = sclp_feat_check(116, SCLP_FEAT_116_BIT_CMMA);
>   	sclp_facilities.has_64bscao = sclp_feat_check(116, SCLP_FEAT_116_BIT_64BSCAO);
>   	sclp_facilities.has_esca = sclp_feat_check(116, SCLP_FEAT_116_BIT_ESCA);
> +	sclp_facilities.has_astfleie1 = sclp_feat_check(116, SCLP_FEAT_116_BIT_ASTFLEIE1);
>   	sclp_facilities.has_ibs = sclp_feat_check(117, SCLP_FEAT_117_BIT_IBS);
>   	sclp_facilities.has_pfmfi = sclp_feat_check(117, SCLP_FEAT_117_BIT_PFMFI);
> +	sclp_facilities.has_astfleie2 = sclp_feat_check(139, SCLP_FEAT_139_BIT_ASTFLEIE2);
>   
>   	for (i = 0; i < read_info->entries_cpu; i++, cpu++) {
>   		/*
> diff --git a/lib/s390x/sclp.h b/lib/s390x/sclp.h
> index 22f120d1b7ea7d1c3fe822385d0c689e5b3459fe..91a81c902eaa8ee6b999184aeb8a33633efd1065 100644
> --- a/lib/s390x/sclp.h
> +++ b/lib/s390x/sclp.h
> @@ -129,10 +129,12 @@ struct sclp_facilities {
>   	uint64_t has_cmma : 1;
>   	uint64_t has_64bscao : 1;
>   	uint64_t has_esca : 1;
> +	uint64_t has_astfleie1 : 1;
>   	uint64_t has_kss : 1;
>   	uint64_t has_pfmfi : 1;
>   	uint64_t has_ibs : 1;
> -	uint64_t : 64 - 15;
> +	uint64_t has_astfleie2 : 1;
> +	uint64_t : 64 - 19;
>   };

64 - 17?

I was wondering why the static assert didn't trigger here. Turns out I 
only added it to a feature branch that didn't go upstream yet...

Could you do me a favor and add a patch that introduces the static assert:
_Static_assert(sizeof(struct sclp_facilities) == sizeof(uint64_t));

Then again, why do we pad that at all, it's not a FW struct and I hope 
that we never cast it to u64 and copy it somewhere.

>   
>   /* bit number within a certain byte */
> @@ -143,8 +145,10 @@ struct sclp_facilities {
>   #define SCLP_FEAT_116_BIT_64BSCAO	0
>   #define SCLP_FEAT_116_BIT_CMMA		1
>   #define SCLP_FEAT_116_BIT_ESCA		4
> +#define SCLP_FEAT_116_BIT_ASTFLEIE1	7
>   #define SCLP_FEAT_117_BIT_PFMFI		1
>   #define SCLP_FEAT_117_BIT_IBS		2
> +#define SCLP_FEAT_139_BIT_ASTFLEIE2	1
>   
>   typedef struct ReadInfo {
>   	SCCBHeader h;
> 


  reply	other threads:[~2026-02-20 10:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-11 14:57 [kvm-unit-tests PATCH 0/3] s390x: Add test for STFLE interpretive execution (format-2) Christoph Schlameuss
2026-02-11 14:57 ` [kvm-unit-tests PATCH 1/3] s390x: snippets: Add reset_guest() to lib Christoph Schlameuss
2026-02-20 10:09   ` Janosch Frank
2026-02-11 14:57 ` [kvm-unit-tests PATCH 2/3] s390x: sclp: Add detection of alternate STFLE facilities Christoph Schlameuss
2026-02-20 10:20   ` Janosch Frank [this message]
2026-02-20 16:23     ` Christoph Schlameuss
2026-02-11 14:57 ` [kvm-unit-tests PATCH 3/3] s390x: Add test for STFLE interpretive execution (format-2) Christoph Schlameuss

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=48e794f6-0dc8-4e7e-8bf7-399015b044c2@linux.ibm.com \
    --to=frankja@linux.ibm.com \
    --cc=david@redhat.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=nrb@linux.ibm.com \
    --cc=nsg@linux.ibm.com \
    --cc=schlameuss@linux.ibm.com \
    --cc=thuth@redhat.com \
    /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