From: Janosch Frank <frankja@linux.ibm.com>
To: Steffen Eiden <seiden@linux.ibm.com>,
Thomas Huth <thuth@redhat.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>,
David Hildenbrand <david@redhat.com>
Cc: kvm@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH 3/4] s390x: uv-guest: remove duplicated checks
Date: Fri, 28 Jan 2022 10:06:07 +0100 [thread overview]
Message-ID: <af0fd379-4beb-b002-4612-612c6ae85a99@linux.ibm.com> (raw)
In-Reply-To: <20220127141559.35250-4-seiden@linux.ibm.com>
On 1/27/22 15:15, Steffen Eiden wrote:
> Removing some tests which are done at other points in the code
> implicitly.
>
> In lib/s390x/uc.c#setup_uv(void) the rc of the qui result is verified
> using asserts.
> The whole test is fenced by lib/s390x/uc.c#os_is_guest(void) which
> checks if SET and REMOVE SHARED is present.
>
> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
> ---
> s390x/uv-guest.c | 24 ++++++++----------------
> 1 file changed, 8 insertions(+), 16 deletions(-)
>
> diff --git a/s390x/uv-guest.c b/s390x/uv-guest.c
> index 44ad2154..909b7256 100644
> --- a/s390x/uv-guest.c
> +++ b/s390x/uv-guest.c
> @@ -2,7 +2,7 @@
> /*
> * Guest Ultravisor Call tests
> *
> - * Copyright (c) 2020 IBM Corp
> + * Copyright (c) 2020, 2022 IBM Corp
> *
> * Authors:
> * Janosch Frank <frankja@linux.ibm.com>
> @@ -69,23 +69,15 @@ static void test_query(void)
> cc = uv_call(0, (u64)&uvcb);
> report(cc == 1 && uvcb.header.rc == UVC_RC_INV_LEN, "length");
>
> - uvcb.header.len = sizeof(uvcb);
> - cc = uv_call(0, (u64)&uvcb);
> - report((!cc && uvcb.header.rc == UVC_RC_EXECUTED) ||
> - (cc == 1 && uvcb.header.rc == 0x100),
> - "successful query");
> -
> /*
> - * These bits have been introduced with the very first
> - * Ultravisor version and are expected to always be available
> - * because they are basic building blocks.
> + * BIT_UVC_CMD_QUI, BIT_UVC_CMD_SET_SHARED_ACCESS and
> + * BIT_UVC_CMD_SET_SHARED_ACCESS are always present as they
> + * have been introduced with the first Ultravisor version.
> + * However, we only need to check for QUI as
> + * SET/REMOVE SHARED are used to fence this test to be only
> + * executed by protected guests.
> */
> - report(test_bit_inv(BIT_UVC_CMD_QUI, &uvcb.inst_calls_list[0]),
> - "query indicated");
> - report(test_bit_inv(BIT_UVC_CMD_SET_SHARED_ACCESS, &uvcb.inst_calls_list[0]),
> - "share indicated");
> - report(test_bit_inv(BIT_UVC_CMD_REMOVE_SHARED_ACCESS, &uvcb.inst_calls_list[0]),
> - "unshare indicated");
> + report(uv_query_test_call(BIT_UVC_CMD_QUI), "query indicated");
> report_prefix_pop();
> }
>
>
next prev parent reply other threads:[~2022-01-28 9:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-27 14:15 [kvm-unit-tests PATCH 0/4] s390x: Attestation tests Steffen Eiden
2022-01-27 14:15 ` [kvm-unit-tests PATCH 1/4] s390x: uv-host: Add attestation test Steffen Eiden
2022-01-28 9:00 ` Janosch Frank
2022-01-28 9:29 ` Thomas Huth
2022-01-28 9:58 ` Claudio Imbrenda
2022-01-27 14:15 ` [kvm-unit-tests PATCH 2/4] s390x: lib: Add QUI getter Steffen Eiden
2022-01-28 9:02 ` Janosch Frank
2022-01-27 14:15 ` [kvm-unit-tests PATCH 3/4] s390x: uv-guest: remove duplicated checks Steffen Eiden
2022-01-28 9:06 ` Janosch Frank [this message]
2022-01-27 14:15 ` [kvm-unit-tests PATCH 4/4] s390x: uv-guest: Add attestation tests Steffen Eiden
2022-01-28 9:54 ` Janosch Frank
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=af0fd379-4beb-b002-4612-612c6ae85a99@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=seiden@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