From: Cornelia Huck <cohuck@redhat.com>
To: Pierre Morel <pmorel@linux.ibm.com>
Cc: kvm@vger.kernel.org, frankja@linux.ibm.com, david@redhat.com,
thuth@redhat.com, imbrenda@linux.ibm.com
Subject: Re: [kvm-unit-tests PATCH v1 3/6] s390x: lib: css: upgrading IRQ handling
Date: Fri, 19 Mar 2021 17:09:19 +0100 [thread overview]
Message-ID: <20210319170919.172ee8d5.cohuck@redhat.com> (raw)
In-Reply-To: <d5e2e4cf-8f76-2099-f0d6-edcb32696bf2@linux.ibm.com>
On Fri, 19 Mar 2021 16:55:15 +0100
Pierre Morel <pmorel@linux.ibm.com> wrote:
> On 3/19/21 12:01 PM, Cornelia Huck wrote:
> > On Thu, 18 Mar 2021 14:26:25 +0100
> > Pierre Morel <pmorel@linux.ibm.com> wrote:
> >> @@ -422,38 +464,38 @@ static struct irb irb;
> >> void css_irq_io(void)
> >> {
> >> int ret = 0;
> >> - char *flags;
> >> - int sid;
> >> + struct irq_entry *irq;
> >>
> >> report_prefix_push("Interrupt");
> >> - sid = lowcore_ptr->subsys_id_word;
> >> + irq = alloc_irq();
> >> + assert(irq);
> >> +
> >> + irq->sid = lowcore_ptr->subsys_id_word;
> >> /* Lowlevel set the SID as interrupt parameter. */
> >> - if (lowcore_ptr->io_int_param != sid) {
> >> + if (lowcore_ptr->io_int_param != irq->sid) {
> >> report(0,
> >> "io_int_param: %x differs from subsys_id_word: %x",
> >> - lowcore_ptr->io_int_param, sid);
> >> + lowcore_ptr->io_int_param, irq->sid);
> >> goto pop;
> >> }
> >> report_prefix_pop();
> >>
> >> report_prefix_push("tsch");
> >> - ret = tsch(sid, &irb);
> >> + ret = tsch(irq->sid, &irq->irb);
> >> switch (ret) {
> >> case 1:
> >> - dump_irb(&irb);
> >> - flags = dump_scsw_flags(irb.scsw.ctrl);
> >> - report(0,
> >> - "I/O interrupt, but tsch returns CC 1 for subchannel %08x. SCSW flags: %s",
> >> - sid, flags);
> >> + report_info("no status pending on %08x : %s", irq->sid,
> >> + dump_scsw_flags(irq->irb.scsw.ctrl));
> >
> > This is not what you are looking at here, though?
> >
> > The problem is that the hypervisor gave you cc 1 (stored, not status
> > pending) while you just got an interrupt; the previous message logged
> > that, while the new one does not. (The scsw flags are still
> > interesting, as it gives further information about the mismatch.)
>
> I can keep the old message.
> How ever I do not think it is a reason to report a failure.
> Do you agree with replaacing report(0,) with report_info()
I don't really see how we could get an I/O interrupt for a subchannel
that is not status pending, unless we have other code racing with this
one that cleared the status pending already (and that would be a bug in
our test program.) Or are you aware in anything in the architecture
that could make the status pending go away again (other than the
subchannel becoming not operational?)
>
> >
> >> break;
> >> case 2:
> >> report(0, "tsch returns unexpected CC 2");
> >> break;
> >> case 3:
> >> - report(0, "tsch reporting sch %08x as not operational", sid);
> >> + report(0, "tsch reporting sch %08x as not operational", irq->sid);
> >> break;
> >> case 0:
> >> /* Stay humble on success */
> >> + save_irq(irq);
> >> break;
> >> }
> >> pop:
> >> @@ -498,47 +540,70 @@ struct ccw1 *ccw_alloc(int code, void *data, int count, unsigned char flags)
> >> int wait_and_check_io_completion(int schid)
> >> {
> >> int ret = 0;
> >> -
> >> - wait_for_interrupt(PSW_MASK_IO);
> >> + struct irq_entry *irq = NULL;
> >>
> >> report_prefix_push("check I/O completion");
> >>
> >> - if (lowcore_ptr->io_int_param != schid) {
> >> + disable_io_irq();
> >> + irq = get_irq();
> >> + while (!irq) {
> >> + wait_for_interrupt(PSW_MASK_IO);
> >> + disable_io_irq();
> >
> > Isn't the disable_io_irq() redundant here?
>
> No because wait for interrupt re-enable the interrupts
> I will add a comment
Hm, I thought it restored the previous status.
>
> >
> > (In general, I'm a bit confused about the I/O interrupt handling here.
> > Might need to read through the whole thing again.)
But also see this comment :)
> >
> >> + irq = get_irq();
> >> + report_info("next try");
> >> + }
> >> + enable_io_irq();
next prev parent reply other threads:[~2021-03-19 16:10 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-18 13:26 [kvm-unit-tests PATCH v1 0/6] Testing SSCH, CSCH and HSCH for errors Pierre Morel
2021-03-18 13:26 ` [kvm-unit-tests PATCH v1 1/6] s390x: lib: css: disabling a subchannel Pierre Morel
2021-03-19 9:02 ` Janosch Frank
2021-03-19 9:11 ` Pierre Morel
2021-03-19 10:03 ` Cornelia Huck
2021-03-19 10:11 ` Pierre Morel
2021-03-19 15:29 ` Pierre Morel
2021-03-18 13:26 ` [kvm-unit-tests PATCH v1 2/6] s390x: lib: css: SCSW bit definitions Pierre Morel
2021-03-19 10:16 ` Cornelia Huck
2021-03-19 15:30 ` Pierre Morel
2021-03-18 13:26 ` [kvm-unit-tests PATCH v1 3/6] s390x: lib: css: upgrading IRQ handling Pierre Morel
2021-03-18 14:22 ` Pierre Morel
2021-03-19 11:01 ` Cornelia Huck
2021-03-19 15:55 ` Pierre Morel
2021-03-19 16:09 ` Cornelia Huck [this message]
2021-03-19 16:34 ` Pierre Morel
2021-03-18 13:26 ` [kvm-unit-tests PATCH v1 4/6] s390x: lib: css: add expectations to wait for interrupt Pierre Morel
2021-03-19 9:09 ` Janosch Frank
2021-03-19 9:50 ` Pierre Morel
2021-03-19 11:23 ` Cornelia Huck
2021-03-19 16:18 ` Pierre Morel
2021-03-18 13:26 ` [kvm-unit-tests PATCH v1 5/6] s390x: css: testing ssch error response Pierre Morel
2021-03-19 9:18 ` Janosch Frank
2021-03-19 10:02 ` Pierre Morel
2021-03-18 13:26 ` [kvm-unit-tests PATCH v1 6/6] s390x: css: testing clear and halt subchannel 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=20210319170919.172ee8d5.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=pmorel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.