From: Janosch Frank <frankja@linux.ibm.com>
To: kvm@vger.kernel.org
Cc: linux-s390@vger.kernel.org, imbrenda@linux.ibm.com,
thuth@redhat.com, david@redhat.com, nsg@linux.ibm.com,
nrb@linux.ibm.com, akrowiak@linux.ibm.com, jjherne@linux.ibm.com
Subject: [kvm-unit-tests PATCH v4 6/7] lib: s390x: ap: Add tapq test facility bit
Date: Fri, 2 Feb 2024 14:59:12 +0000 [thread overview]
Message-ID: <20240202145913.34831-7-frankja@linux.ibm.com> (raw)
In-Reply-To: <20240202145913.34831-1-frankja@linux.ibm.com>
When the t bit is one the first 32 bits of register 2 are populated on
a tapq. Those bits tell us in which mode the queu is and which
facilities it supports.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
---
lib/s390x/ap.c | 5 +++--
lib/s390x/ap.h | 2 +-
s390x/ap.c | 12 ++++++------
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/lib/s390x/ap.c b/lib/s390x/ap.c
index 0f92739d..64705a56 100644
--- a/lib/s390x/ap.c
+++ b/lib/s390x/ap.c
@@ -26,11 +26,12 @@ static uint8_t *array_queue;
static struct ap_config_info qci;
int ap_pqap_tapq(uint8_t ap, uint8_t qn, struct ap_queue_status *apqsw,
- struct pqap_r2 *r2)
+ struct pqap_r2 *r2, bool t)
{
struct pqap_r0 r0 = {
.ap = ap,
.qn = qn,
+ .t = t,
.fc = PQAP_TEST_APQ
};
uint64_t bogus_cc = 2;
@@ -177,7 +178,7 @@ static int pqap_reset_wait(uint8_t ap, uint8_t qn, struct ap_queue_status *apqsw
do {
/* Give it some time to process before the retry */
mdelay(20);
- cc = ap_pqap_tapq(ap, qn, apqsw, &r2);
+ cc = ap_pqap_tapq(ap, qn, apqsw, &r2, false);
} while (apqsw->rc == AP_RC_RESET_IN_PROGRESS);
if (apqsw->rc)
diff --git a/lib/s390x/ap.h b/lib/s390x/ap.h
index dbdb55c4..eecb39be 100644
--- a/lib/s390x/ap.h
+++ b/lib/s390x/ap.h
@@ -109,7 +109,7 @@ enum {
int ap_setup(uint8_t **ap_array, uint8_t **qn_array, uint8_t *naps, uint8_t *nqns);
int ap_pqap_tapq(uint8_t ap, uint8_t qn, struct ap_queue_status *apqsw,
- struct pqap_r2 *r2);
+ struct pqap_r2 *r2, bool t);
int ap_pqap_reset(uint8_t ap, uint8_t qn, struct ap_queue_status *apqsw);
int ap_pqap_reset_zeroize(uint8_t ap, uint8_t qn, struct ap_queue_status *apqsw);
int ap_pqap_qci(struct ap_config_info *info);
diff --git a/s390x/ap.c b/s390x/ap.c
index 38be03eb..0f2d03c2 100644
--- a/s390x/ap.c
+++ b/s390x/ap.c
@@ -325,7 +325,7 @@ static void test_pqap_aqic(void)
do {
mdelay(20);
- cc = ap_pqap_tapq(apn, qn, &apqsw, &r2);
+ cc = ap_pqap_tapq(apn, qn, &apqsw, &r2, false);
} while (cc == 0 && apqsw.irq_enabled == 0);
report(cc == 0 && apqsw.irq_enabled == 1, "enable IRQs tapq data");
@@ -338,7 +338,7 @@ static void test_pqap_aqic(void)
do {
mdelay(20);
- cc = ap_pqap_tapq(apn, qn, &apqsw, &r2);
+ cc = ap_pqap_tapq(apn, qn, &apqsw, &r2, false);
} while (cc == 0 && apqsw.irq_enabled == 1);
report(cc == 0 && apqsw.irq_enabled == 0, "disable IRQs tapq data");
@@ -365,12 +365,12 @@ static void test_pqap_resets(void)
do {
mdelay(20);
- cc = ap_pqap_tapq(apn, qn, &apqsw, &r2);
+ cc = ap_pqap_tapq(apn, qn, &apqsw, &r2, false);
} while (cc == 0 && apqsw.irq_enabled == 0);
report(apqsw.irq_enabled == 1, "IRQs enabled tapq data");
ap_pqap_reset(apn, qn, &apqsw);
- cc = ap_pqap_tapq(apn, qn, &apqsw, &r2);
+ cc = ap_pqap_tapq(apn, qn, &apqsw, &r2, false);
assert(!cc);
report(apqsw.irq_enabled == 0, "IRQs have been disabled via reset");
@@ -385,12 +385,12 @@ static void test_pqap_resets(void)
do {
mdelay(20);
- cc = ap_pqap_tapq(apn, qn, &apqsw, &r2);
+ cc = ap_pqap_tapq(apn, qn, &apqsw, &r2, false);
} while (cc == 0 && apqsw.irq_enabled == 0);
report(apqsw.irq_enabled == 1, "IRQs enabled tapq data");
ap_pqap_reset_zeroize(apn, qn, &apqsw);
- cc = ap_pqap_tapq(apn, qn, &apqsw, &r2);
+ cc = ap_pqap_tapq(apn, qn, &apqsw, &r2, false);
assert(!cc);
report(apqsw.irq_enabled == 0, "IRQs have been disabled via reset");
--
2.40.1
next prev parent reply other threads:[~2024-02-02 15:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-02 14:59 [kvm-unit-tests PATCH v4 0/7] s390x: Add base AP support Janosch Frank
2024-02-02 14:59 ` [kvm-unit-tests PATCH v4 1/7] lib: s390x: Add ap library Janosch Frank
2024-02-05 18:15 ` Anthony Krowiak
2024-02-06 8:48 ` Harald Freudenberger
2024-02-06 15:45 ` Anthony Krowiak
2024-02-06 13:42 ` Janosch Frank
2024-02-06 15:55 ` Anthony Krowiak
2024-02-07 8:06 ` Harald Freudenberger
2024-02-07 14:30 ` Anthony Krowiak
2024-02-02 14:59 ` [kvm-unit-tests PATCH v4 2/7] s390x: Add guest 2 AP test Janosch Frank
2024-02-20 16:38 ` Anthony Krowiak
2024-02-21 7:57 ` Janosch Frank
2024-02-02 14:59 ` [kvm-unit-tests PATCH v4 3/7] lib: s390x: ap: Add proper ap setup code Janosch Frank
2024-02-02 14:59 ` [kvm-unit-tests PATCH v4 4/7] s390x: ap: Add pqap aqic tests Janosch Frank
2024-02-02 14:59 ` [kvm-unit-tests PATCH v4 5/7] s390x: ap: Add reset tests Janosch Frank
2024-02-02 14:59 ` Janosch Frank [this message]
2024-02-02 14:59 ` [kvm-unit-tests PATCH v4 7/7] s390x: ap: Add nq/dq len test Janosch Frank
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=20240202145913.34831-7-frankja@linux.ibm.com \
--to=frankja@linux.ibm.com \
--cc=akrowiak@linux.ibm.com \
--cc=david@redhat.com \
--cc=imbrenda@linux.ibm.com \
--cc=jjherne@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