From: Pierre Morel <pmorel@linux.ibm.com>
To: Thomas Huth <thuth@redhat.com>, kvm@vger.kernel.org
Cc: linux-s390@vger.kernel.org, frankja@linux.ibm.com,
david@redhat.com, cohuck@redhat.com, drjones@redhat.com
Subject: Re: [kvm-unit-tests PATCH v10 9/9] s390x: css: ssch/tsch with sense and interrupt
Date: Fri, 3 Jul 2020 11:05:53 +0200 [thread overview]
Message-ID: <0aaab65b-7856-9be9-c6dc-4da8e8d529d4@linux.ibm.com> (raw)
In-Reply-To: <d8b2ed8c-3948-1cba-47af-ef2a8cdf27ed@redhat.com>
On 2020-07-03 10:41, Thomas Huth wrote:
> On 02/07/2020 18.31, Pierre Morel wrote:
>> After a channel is enabled we start a SENSE_ID command using
>> the SSCH instruction to recognize the control unit and device.
>>
>> This tests the success of SSCH, the I/O interruption and the TSCH
>> instructions.
>>
>> The SENSE_ID command response is tested to report 0xff inside
>> its reserved field and to report the same control unit type
>> as the cu_type kernel argument.
>>
>> Without the cu_type kernel argument, the test expects a device
>> with a default control unit type of 0x3832, a.k.a virtio-net-ccw.
>>
>> Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
>> ---
> [...]
>> diff --git a/lib/s390x/css.h b/lib/s390x/css.h
>> index 0ddceb1..9c22644 100644
>> --- a/lib/s390x/css.h
>> +++ b/lib/s390x/css.h
>> @@ -11,6 +11,8 @@
>> #ifndef CSS_H
>> #define CSS_H
>>
>> +#define lowcore_ptr ((struct lowcore *)0x0)
>
> I'd prefer if you could either put this into the css_lib.c file or in
> lib/s390x/asm/arch_def.h.
I have a patch ready for this :)
But I did not want to add too much new things in this series that could
start a new discussion.
I have 2 versions of the patch:
- The simple one with just the declaration in arch_def.h
- The complete one with update of all tests (but smp) using a pointer to
lowcore.
>
...snip...
>> static inline int ssch(unsigned long schid, struct orb *addr)
>> @@ -251,6 +271,16 @@ void dump_orb(struct orb *op);
>>
>> int css_enumerate(void);
>> #define MAX_ENABLE_RETRIES 5
>> -int css_enable(int schid);
>> +int css_enable(int schid, int isc);
>> +
>> +
>
> In case you respin: Remove one empty line?
yes
>
>> +/* Library functions */
>> +int start_ccw1_chain(unsigned int sid, struct ccw1 *ccw);
...snip...
>> + lowcore_ptr->io_int_param = 0;
>> +
>> + memset(&senseid, 0, sizeof(senseid));
>> + ret = start_single_ccw(test_device_sid, CCW_CMD_SENSE_ID,
>> + &senseid, sizeof(senseid), CCW_F_SLI);
>> + if (ret) {
>> + report(0, "ssch failed for SENSE ID on sch %08x with cc %d",
>> + test_device_sid, ret);
>> + goto unreg_cb;
>> + }
>
> I'd maybe rather do something like:
>
> report(ret == 0, "SENSE ID on sch %08x has good CC (%d)", ...)
> if (ret)
> goto unreg_cb;
>
> and avoid report(0, ...) statements. Also for the other tests below. But
> maybe that's really just a matter of taste.
I prefer to use report(0,....) when an unexpected error occurs: This
keep the test silent when what is expected occurs.
And use report(ret == xxx, ....) as the last report to report overall
success or failure of the test.
Other opinions?
>
>> + wait_for_interrupt(PSW_MASK_IO);
...snip...
>
> Apart from the nits, I'm fine with the patch.
>
> Acked-by: Thomas Huth <thuth@redhat.com>
>
Thanks,
Pierre
--
Pierre Morel
IBM Lab Boeblingen
next prev parent reply other threads:[~2020-07-03 9:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-02 16:31 [kvm-unit-tests PATCH v10 0/9] s390x: Testing the Channel Subsystem I/O Pierre Morel
2020-07-02 16:31 ` [kvm-unit-tests PATCH v10 1/9] s390x: saving regs for interrupts Pierre Morel
2020-07-02 16:31 ` [kvm-unit-tests PATCH v10 2/9] s390x: I/O interrupt registration Pierre Morel
2020-07-02 16:31 ` [kvm-unit-tests PATCH v10 3/9] s390x: export the clock get_clock_ms() utility Pierre Morel
2020-07-02 16:31 ` [kvm-unit-tests PATCH v10 4/9] s390x: clock and delays calculations Pierre Morel
2020-07-02 16:31 ` [kvm-unit-tests PATCH v10 5/9] s390x: define function to wait for interrupt Pierre Morel
2020-07-02 16:31 ` [kvm-unit-tests PATCH v10 6/9] s390x: Library resources for CSS tests Pierre Morel
2020-07-02 16:31 ` [kvm-unit-tests PATCH v10 7/9] s390x: css: stsch, enumeration test Pierre Morel
2020-07-02 16:31 ` [kvm-unit-tests PATCH v10 8/9] s390x: css: msch, enable test Pierre Morel
2020-07-02 16:31 ` [kvm-unit-tests PATCH v10 9/9] s390x: css: ssch/tsch with sense and interrupt Pierre Morel
2020-07-03 8:41 ` Thomas Huth
2020-07-03 9:05 ` Pierre Morel [this message]
2020-07-03 12:01 ` Janosch Frank
2020-07-03 12:25 ` Pierre Morel
2020-07-06 9:46 ` Cornelia Huck
2020-07-06 13:01 ` Pierre Morel
2020-07-06 14:24 ` Cornelia Huck
2020-07-07 10:57 ` Pierre Morel
2020-07-07 11:05 ` Cornelia Huck
2020-07-07 11:14 ` 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=0aaab65b-7856-9be9-c6dc-4da8e8d529d4@linux.ibm.com \
--to=pmorel@linux.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=drjones@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--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