linux-s390.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Janosch Frank <frankja@linux.ibm.com>
To: Claudio Imbrenda <imbrenda@linux.ibm.com>,
	Steffen Eiden <seiden@linux.ibm.com>
Cc: Thomas Huth <thuth@redhat.com>,
	David Hildenbrand <david@redhat.com>,
	kvm@vger.kernel.org, linux-s390@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH v2 2/4] s390x: lib: Add QUI getter
Date: Fri, 4 Feb 2022 09:18:43 +0100	[thread overview]
Message-ID: <10811f94-4b87-ca90-e81c-1bc4f00035e1@linux.ibm.com> (raw)
In-Reply-To: <20220203171255.5fce1244@p-imbrenda>

On 2/3/22 17:12, Claudio Imbrenda wrote:
> On Thu,  3 Feb 2022 09:19:33 +0000
> Steffen Eiden <seiden@linux.ibm.com> wrote:
> 
>> Some tests need the information provided by the QUI UVC and lib/s390x/uv.c
>> already has cached the qui result. Let's add a function to avoid
>> unnecessary QUI UVCs.
> 
> I'm not against this approach, but I wonder if it's not easier to just
> make the QUI buffer public?

The introduction of that function is on me and I'm not a big fan of 
global variables.


> 
>>
>> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
>> ---
>>   lib/s390x/uv.c | 8 ++++++++
>>   lib/s390x/uv.h | 1 +
>>   2 files changed, 9 insertions(+)
>>
>> diff --git a/lib/s390x/uv.c b/lib/s390x/uv.c
>> index 6fe11dff..602cbbfc 100644
>> --- a/lib/s390x/uv.c
>> +++ b/lib/s390x/uv.c
>> @@ -47,6 +47,14 @@ bool uv_query_test_call(unsigned int nr)
>>   	return test_bit_inv(nr, uvcb_qui.inst_calls_list);
>>   }
>>   
>> +const struct uv_cb_qui *uv_get_query_data(void)
>> +{
>> +	/* Query needs to be called first */
>> +	assert(uvcb_qui.header.rc);
>> +
>> +	return &uvcb_qui;
>> +}
>> +
>>   int uv_setup(void)
>>   {
>>   	if (!test_facility(158))
>> diff --git a/lib/s390x/uv.h b/lib/s390x/uv.h
>> index 8175d9c6..44264861 100644
>> --- a/lib/s390x/uv.h
>> +++ b/lib/s390x/uv.h
>> @@ -8,6 +8,7 @@
>>   bool uv_os_is_guest(void);
>>   bool uv_os_is_host(void);
>>   bool uv_query_test_call(unsigned int nr);
>> +const struct uv_cb_qui *uv_get_query_data(void);
>>   void uv_init(void);
>>   int uv_setup(void);
>>   void uv_create_guest(struct vm *vm);
> 


  reply	other threads:[~2022-02-04  8:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03  9:19 [kvm-unit-tests PATCH v2 0/4] s390x: Attestation tests Steffen Eiden
2022-02-03  9:19 ` [kvm-unit-tests PATCH v2 1/4] s390x: uv-host: Add attestation test Steffen Eiden
2022-02-03 16:37   ` Claudio Imbrenda
2022-02-03  9:19 ` [kvm-unit-tests PATCH v2 2/4] s390x: lib: Add QUI getter Steffen Eiden
2022-02-03 16:12   ` Claudio Imbrenda
2022-02-04  8:18     ` Janosch Frank [this message]
2022-02-03  9:19 ` [kvm-unit-tests PATCH v2 3/4] s390x: uv-guest: remove duplicated checks Steffen Eiden
2022-02-03 16:31   ` Claudio Imbrenda
2022-02-08 14:57     ` Steffen Eiden
2022-02-03  9:19 ` [kvm-unit-tests PATCH v2 4/4] s390x: uv-guest: Add attestation tests Steffen Eiden
2022-02-03 17:37   ` 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=10811f94-4b87-ca90-e81c-1bc4f00035e1@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;
as well as URLs for NNTP newsgroup(s).