From: Claudio Imbrenda <imbrenda@linux.ibm.com>
To: Janosch Frank <frankja@linux.ibm.com>
Cc: kvm@vger.kernel.org, thuth@redhat.com, nrb@linux.ibm.com,
linux-s390@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH 5/5] s390x: ap: Add reset tests
Date: Thu, 30 Mar 2023 18:48:10 +0200 [thread overview]
Message-ID: <20230330184810.5b08034b@p-imbrenda> (raw)
In-Reply-To: <20230330114244.35559-6-frankja@linux.ibm.com>
On Thu, 30 Mar 2023 11:42:44 +0000
Janosch Frank <frankja@linux.ibm.com> wrote:
> Test if the IRQ enablement is turned off on a reset or zeroize PQAP.
>
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
> ---
[...]
> diff --git a/s390x/ap.c b/s390x/ap.c
> index 31dcfe29..47b4f832 100644
> --- a/s390x/ap.c
> +++ b/s390x/ap.c
> @@ -341,6 +341,57 @@ static void test_pqap_aqic(void)
> report_prefix_pop();
> }
>
> +static void test_pqap_resets(void)
> +{
> + struct ap_queue_status apqsw = {};
> + static uint8_t not_ind_byte;
> + struct ap_qirq_ctrl aqic = {};
> + struct pqap_r2 r2 = {};
> +
> + int cc;
> +
> + report_prefix_push("pqap");
> + report_prefix_push("rapq");
> +
> + /* Enable IRQs which the resets will disable */
> + aqic.ir = 1;
> + cc = ap_pqap_aqic(apn, qn, &apqsw, aqic, (uintptr_t)¬_ind_byte);
> + report(cc == 0 && apqsw.rc == 0, "enable");
> +
> + do {
> + cc = ap_pqap_tapq(apn, qn, &apqsw, &r2);
> + } while (cc == 0 && apqsw.irq_enabled == 0);
same story here as in the previous patch, waiting for interrupts
> + report(apqsw.irq_enabled == 1, "IRQs enabled");
> +
> + ap_pqap_reset(apn, qn, &apqsw);
> + cc = ap_pqap_tapq(apn, qn, &apqsw, &r2);
> + assert(!cc);
> + report(apqsw.irq_enabled == 0, "IRQs have been disabled");
> +
> + report_prefix_pop();
> +
> + report_prefix_push("zapq");
> +
> + /* Enable IRQs which the resets will disable */
> + aqic.ir = 1;
> + cc = ap_pqap_aqic(apn, qn, &apqsw, aqic, (uintptr_t)¬_ind_byte);
> + report(cc == 0 && apqsw.rc == 0, "enable");
> +
> + do {
> + cc = ap_pqap_tapq(apn, qn, &apqsw, &r2);
> + } while (cc == 0 && apqsw.irq_enabled == 0);
and here
> + report(apqsw.irq_enabled == 1, "IRQs enabled");
> +
> + ap_pqap_reset_zeroize(apn, qn, &apqsw);
> + cc = ap_pqap_tapq(apn, qn, &apqsw, &r2);
> + assert(!cc);
> + report(apqsw.irq_enabled == 0, "IRQs have been disabled");
> +
> + report_prefix_pop();
> +
> + report_prefix_pop();
> +}
> +
> int main(void)
> {
> int setup_rc = ap_setup(&apn, &qn);
> @@ -362,6 +413,7 @@ int main(void)
> goto done;
> }
> test_pqap_aqic();
> + test_pqap_resets();
>
> done:
> report_prefix_pop();
next prev parent reply other threads:[~2023-03-30 16:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-30 11:42 [kvm-unit-tests PATCH 0/5] s390x: Add base AP support Janosch Frank
2023-03-30 11:42 ` [kvm-unit-tests PATCH 1/5] lib: s390x: Add ap library Janosch Frank
2023-03-30 16:09 ` Claudio Imbrenda
2023-03-31 7:32 ` Janosch Frank
2023-03-30 11:42 ` [kvm-unit-tests PATCH 2/5] s390x: Add guest 2 AP test Janosch Frank
2023-03-30 16:34 ` Claudio Imbrenda
2023-03-31 8:52 ` Janosch Frank
2023-03-30 11:42 ` [kvm-unit-tests PATCH 3/5] lib: s390x: ap: Add ap_setup Janosch Frank
2023-03-30 16:40 ` Claudio Imbrenda
2023-03-30 11:42 ` [kvm-unit-tests PATCH 4/5] s390x: ap: Add pqap aqic tests Janosch Frank
2023-03-30 16:44 ` Claudio Imbrenda
2023-03-30 11:42 ` [kvm-unit-tests PATCH 5/5] s390x: ap: Add reset tests Janosch Frank
2023-03-30 16:48 ` Claudio Imbrenda [this message]
2023-04-03 14:57 ` Pierre Morel
2023-04-04 11:40 ` Janosch Frank
2023-04-04 15:23 ` 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=20230330184810.5b08034b@p-imbrenda \
--to=imbrenda@linux.ibm.com \
--cc=frankja@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=nrb@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