From: Claudio Imbrenda <imbrenda@linux.ibm.com>
To: Janosch Frank <frankja@linux.ibm.com>
Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org,
thuth@redhat.com, david@redhat.com, nrb@linux.ibm.com
Subject: Re: [kvm-unit-tests PATCH 1/2] s390x: diag10: Fence tcg and pv environments
Date: Wed, 28 May 2025 11:41:02 +0200 [thread overview]
Message-ID: <20250528114102.569905dd@p-imbrenda> (raw)
In-Reply-To: <20250528091412.19483-2-frankja@linux.ibm.com>
On Wed, 28 May 2025 09:13:49 +0000
Janosch Frank <frankja@linux.ibm.com> wrote:
> Diag10 isn't supported under either of these environments so let's
> make sure that the test bails out accordingly.
does KVM always implement diag10?
is there no other way to check whether diag10 is available?
we could, for example, try to run it "correctly" and see whether we get
a Specification exception, and then fence.
>
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
> ---
> s390x/diag10.c | 15 +++++++++++++++
> s390x/unittests.cfg | 1 +
> 2 files changed, 16 insertions(+)
>
> diff --git a/s390x/diag10.c b/s390x/diag10.c
> index 579a7a5d..00725f58 100644
> --- a/s390x/diag10.c
> +++ b/s390x/diag10.c
> @@ -9,6 +9,8 @@
> */
>
> #include <libcflat.h>
> +#include <uv.h>
> +#include <hardware.h>
> #include <asm/asm-offsets.h>
> #include <asm/interrupt.h>
> #include <asm/page.h>
> @@ -95,8 +97,21 @@ static void test_priv(void)
> int main(void)
> {
> report_prefix_push("diag10");
> +
> + if (host_is_tcg()) {
> + report_skip("Test unsupported under TCG");
> + goto out;
> + }
> + if (uv_os_is_guest()) {
> + report_skip("Test unsupported under PV");
> + goto out;
> + }
> +
> test_prefix();
> test_params();
> test_priv();
> +
> +out:
> + report_prefix_pop();
> return report_summary();
> }
> diff --git a/s390x/unittests.cfg b/s390x/unittests.cfg
> index a9af6680..9c43ab2f 100644
> --- a/s390x/unittests.cfg
> +++ b/s390x/unittests.cfg
> @@ -51,6 +51,7 @@ extra_params = -device virtio-net-ccw
>
> [diag10]
> file = diag10.elf
> +accel = kvm
>
> [diag308]
> file = diag308.elf
next prev parent reply other threads:[~2025-05-28 9:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-28 9:13 [kvm-unit-tests PATCH 0/2] s390x: diag10: Fixup Janosch Frank
2025-05-28 9:13 ` [kvm-unit-tests PATCH 1/2] s390x: diag10: Fence tcg and pv environments Janosch Frank
2025-05-28 9:41 ` Claudio Imbrenda [this message]
2025-05-28 11:13 ` Janosch Frank
2025-05-28 12:02 ` Claudio Imbrenda
2025-05-28 9:55 ` Thomas Huth
2025-05-28 10:59 ` Janosch Frank
2025-05-28 14:50 ` Nico Boehr
2025-05-28 9:13 ` [kvm-unit-tests PATCH 2/2] s390x: diag10: Check page clear Janosch Frank
2025-05-28 9:42 ` Claudio Imbrenda
2025-05-28 14:56 ` Nico Boehr
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=20250528114102.569905dd@p-imbrenda \
--to=imbrenda@linux.ibm.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=nrb@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;
as well as URLs for NNTP newsgroup(s).