kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Janosch Frank <frankja@linux.ibm.com>, kvm@vger.kernel.org
Cc: cohuck@redhat.com, linux-s390@vger.kernel.org,
	imbrenda@linux.ibm.com, thuth@redhat.com
Subject: Re: [kvm-unit-tests PATCH 3/4] s390x: cpumodel: FMT4 SCLP test
Date: Tue, 11 May 2021 13:45:04 +0200	[thread overview]
Message-ID: <10c758a5-9347-37ad-dc37-f4cde5af066c@redhat.com> (raw)
In-Reply-To: <20210510150015.11119-4-frankja@linux.ibm.com>

On 10.05.21 17:00, Janosch Frank wrote:
> SCLP is also part of the cpumodel, so we need to make sure that the
> features indicated via read info / read cpu info are correct.
> 
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
> ---
>   s390x/cpumodel.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++-
>   1 file changed, 58 insertions(+), 1 deletion(-)
> 
> diff --git a/s390x/cpumodel.c b/s390x/cpumodel.c
> index 4dd8b96f..619c3dc7 100644
> --- a/s390x/cpumodel.c
> +++ b/s390x/cpumodel.c
> @@ -2,14 +2,69 @@
>   /*
>    * Test the known dependencies for facilities
>    *
> - * Copyright 2019 IBM Corp.
> + * Copyright 2019, 2021 IBM Corp.
>    *
>    * Authors:
>    *    Christian Borntraeger <borntraeger@de.ibm.com>
> + *    Janosch Frank <frankja@linux.ibm.com>
>    */
>   
>   #include <asm/facility.h>
>   #include <vm.h>
> +#include <sclp.h>
> +#include <uv.h>
> +#include <asm/uv.h>
> +
> +static void test_sclp_missing_sief2_implications(void)
> +{
> +	/* Virtualization related facilities */
> +	report(!sclp_facilities.has_64bscao, "!64bscao");
> +	report(!sclp_facilities.has_pfmfi, "!pfmfi");
> +	report(!sclp_facilities.has_gsls, "!gsls");
> +	report(!sclp_facilities.has_cmma, "!cmma");
> +	report(!sclp_facilities.has_esca, "!esca");
> +	report(!sclp_facilities.has_kss, "!kss");
> +	report(!sclp_facilities.has_ibs, "!ibs");
> +
> +	/* Virtualization related facilities reported via CPU entries */
> +	report(!sclp_facilities.has_sigpif, "!sigpif");
> +	report(!sclp_facilities.has_sief2, "!sief2");
> +	report(!sclp_facilities.has_skeyi, "!skeyi");
> +	report(!sclp_facilities.has_siif, "!siif");
> +	report(!sclp_facilities.has_cei, "!cei");
> +	report(!sclp_facilities.has_ib, "!ib");
> +}
> +
> +static void test_sclp_features_fmt4(void)
> +{
> +	/*
> +	 * STFLE facilities are handled by the Ultravisor but SCLP
> +	 * facilities are advertised by the hypervisor.
> +	 */
> +	report_prefix_push("PV guest implies");
> +
> +	/* General facilities */
> +	report(!sclp_facilities.has_diag318, "!diag318");
> +
> +	/*
> +	 * Virtualization related facilities, all of which are
> +	 * unavailable because there's no virtualization support in a
> +	 * protected guest.
> +	 */
> +	test_sclp_missing_sief2_implications();
> +
> +	report_prefix_pop();
> +}
> +
> +static void test_sclp_features(void)
> +{
> +	report_prefix_push("sclp");
> +
> +	if (uv_os_is_guest())
> +		test_sclp_features_fmt4();
> +
> +	report_prefix_pop();
> +}
>   
>   static struct {
>   	int facility;
> @@ -60,6 +115,8 @@ int main(void)
>   	}
>   	report_prefix_pop();
>   
> +	test_sclp_features();
> +
>   	report_prefix_pop();
>   	return report_summary();
>   }
> 

Acked-by: David Hildenbrand <david@redhat.com>

-- 
Thanks,

David / dhildenb


  reply	other threads:[~2021-05-11 11:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-10 15:00 [kvm-unit-tests PATCH 0/4] s390x: cpumodel: Add sclp checks Janosch Frank
2021-05-10 15:00 ` [kvm-unit-tests PATCH 1/4] s390x: sclp: Only fetch read info byte 134 if cpu entries are above it Janosch Frank
2021-05-11 11:39   ` David Hildenbrand
2021-05-11 16:32   ` Cornelia Huck
2021-05-10 15:00 ` [kvm-unit-tests PATCH 2/4] lib: s390x: sclp: Extend feature probing Janosch Frank
2021-05-11 11:43   ` David Hildenbrand
2021-05-11 14:41     ` Claudio Imbrenda
2021-05-11 15:38       ` David Hildenbrand
2021-05-11 15:46         ` Claudio Imbrenda
2021-05-11 16:36           ` Cornelia Huck
2021-05-10 15:00 ` [kvm-unit-tests PATCH 3/4] s390x: cpumodel: FMT4 SCLP test Janosch Frank
2021-05-11 11:45   ` David Hildenbrand [this message]
2021-05-11 14:42   ` Claudio Imbrenda
2021-05-10 15:00 ` [kvm-unit-tests PATCH 4/4] s390x: cpumodel: FMT2 SCLP implies test Janosch Frank
2021-05-11 11:46   ` David Hildenbrand
2021-05-11 14:36   ` Claudio Imbrenda

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=10c758a5-9347-37ad-dc37-f4cde5af066c@redhat.com \
    --to=david@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).