From: Pierre Morel <pmorel@linux.ibm.com>
To: Nico Boehr <nrb@linux.ibm.com>, linux-s390@vger.kernel.org
Cc: frankja@linux.ibm.com, thuth@redhat.com, kvm@vger.kernel.org,
imbrenda@linux.ibm.com, david@redhat.com, nsg@linux.ibm.com
Subject: Re: [kvm-unit-tests PATCH v8 1/2] s390x: topology: Check the Perform Topology Function
Date: Thu, 27 Apr 2023 10:18:08 +0200 [thread overview]
Message-ID: <2a792249-c6b1-ea85-7084-41412d2c7512@linux.ibm.com> (raw)
In-Reply-To: <168257865594.44728.1799002877053720751@t14-nrb>
On 4/27/23 08:57, Nico Boehr wrote:
> Quoting Pierre Morel (2023-04-26 10:34:25)
> [...]
>> diff --git a/s390x/topology.c b/s390x/topology.c
>> new file mode 100644
>> index 0000000..07f1650
>> --- /dev/null
>> +++ b/s390x/topology.c
>> @@ -0,0 +1,191 @@
> [...]
>> +#define PTF_INVALID_FUNCTION 0xff
> No longer used?
right
>
> [...]
>> +static void check_specifications(void)
>> +{
>> + unsigned long wrong_bits = 0;
>> + unsigned long ptf_bits;
>> + unsigned long rc;
>> + int i;
>> +
>> + report_prefix_push("Specifications");
>> +
>> + /* Function codes above 3 are undefined */
>> + for (i = 4; i < 255; i++) {
>> + expect_pgm_int();
>> + ptf(i, &rc);
>> + mb();
>> + if (lowcore.pgm_int_code != PGM_INT_CODE_SPECIFICATION) {
> Please use clear_pgm_int(), the return value will be the interruption code. You can also get rid of the barrier then.
>
> Also, using wrong_bits is confusing here since it serves a completely different purpose below.
>
> Maybe just:
>
> if (clear_pgm_int() != PGM_INT_CODE_SPECIFICATION)
> report_fail("FC %d did not yield specification exception", i);
OK, thanks,
>
> [...]
>> + /* Reserved bits must be 0 */
>> + for (i = 8, wrong_bits = 0; i < 64; i++) {
>> + ptf_bits = 0x01UL << i;
>> + expect_pgm_int();
>> + ptf(ptf_bits, &rc);
>> + mb();
>> + if (lowcore.pgm_int_code != PGM_INT_CODE_SPECIFICATION)
> Also use clear_pgm_int() here.
OK, too, thanks
Regards,
Pierre
next prev parent reply other threads:[~2023-04-27 8:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-26 8:34 [kvm-unit-tests PATCH v8 0/2] S390x: CPU Topology Information Pierre Morel
2023-04-26 8:34 ` [kvm-unit-tests PATCH v8 1/2] s390x: topology: Check the Perform Topology Function Pierre Morel
2023-04-27 6:57 ` Nico Boehr
2023-04-27 8:18 ` Pierre Morel [this message]
2023-04-26 8:34 ` [kvm-unit-tests PATCH v8 2/2] s390x: topology: Checking Configuration Topology Information Pierre Morel
2023-04-27 8:47 ` Nico Boehr
2023-04-27 14:50 ` Pierre Morel
2023-04-28 7:52 ` Nico Boehr
2023-04-28 13:10 ` Pierre Morel
2023-05-03 11:56 ` Nico Boehr
2023-05-03 12:52 ` Pierre Morel
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=2a792249-c6b1-ea85-7084-41412d2c7512@linux.ibm.com \
--to=pmorel@linux.ibm.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=nrb@linux.ibm.com \
--cc=nsg@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