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 v5 5/6] s390x: uv-guest: add share bit test
Date: Wed, 4 May 2022 10:39:37 +0200 [thread overview]
Message-ID: <9b6bc442-67b1-45da-1bd4-82b53cc58f82@linux.ibm.com> (raw)
In-Reply-To: <20220502093925.4118-6-seiden@linux.ibm.com>
On 5/2/22 11:39, Steffen Eiden wrote:
> The UV facility bits shared/unshared must both be set or none.
>
> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
> ---
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
> s390x/uv-guest.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/s390x/uv-guest.c b/s390x/uv-guest.c
> index fd2cfef1..152ad807 100644
> --- a/s390x/uv-guest.c
> +++ b/s390x/uv-guest.c
> @@ -157,6 +157,16 @@ static void test_invalid(void)
> report_prefix_pop();
> }
>
> +static void test_share_bits(void)
> +{
> + bool unshare = uv_query_test_call(BIT_UVC_CMD_REMOVE_SHARED_ACCESS);
> + bool share = uv_query_test_call(BIT_UVC_CMD_SET_SHARED_ACCESS);
> +
> + report_prefix_push("query");
> + report(!(share ^ unshare), "share bits are identical");
> + report_prefix_pop();
> +}
> +
> int main(void)
> {
> bool has_uvc = test_facility(158);
> @@ -167,6 +177,12 @@ int main(void)
> goto done;
> }
>
> + /*
> + * Needs to be done before the guest-fence,
> + * as the fence tests if both shared bits are present
> + */
> + test_share_bits();
> +
> if (!uv_os_is_guest()) {
> report_skip("Not a protected guest");
> goto done;
next prev parent reply other threads:[~2022-05-04 8:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-02 9:39 [kvm-unit-tests PATCH v5 0/6] s390x: Attestation tests Steffen Eiden
2022-05-02 9:39 ` [kvm-unit-tests PATCH v5 1/6] s390x: uv-host: Add invalid command attestation check Steffen Eiden
2022-05-02 9:39 ` [kvm-unit-tests PATCH v5 2/6] s390x: lib: Add QUI getter Steffen Eiden
2022-05-02 9:39 ` [kvm-unit-tests PATCH v5 3/6] s390x: uv-guest: remove duplicated checks Steffen Eiden
2022-05-02 9:39 ` [kvm-unit-tests PATCH v5 4/6] s390x: uv-guest: Remove double report_prefix_pop Steffen Eiden
2022-05-04 8:38 ` Janosch Frank
2022-05-02 9:39 ` [kvm-unit-tests PATCH v5 5/6] s390x: uv-guest: add share bit test Steffen Eiden
2022-05-04 8:39 ` Janosch Frank [this message]
2022-05-02 9:39 ` [kvm-unit-tests PATCH v5 6/6] s390x: Add attestation tests Steffen Eiden
2022-05-04 8:36 ` 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=9b6bc442-67b1-45da-1bd4-82b53cc58f82@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