diff options
author | Janosch Frank <frankja@linux.ibm.com> | 2020-04-29 10:35:11 -0400 |
---|---|---|
committer | David Hildenbrand <david@redhat.com> | 2020-04-30 16:52:14 +0200 |
commit | fc67b07a4b5183a336f254bc886f9032f603bd5b (patch) | |
tree | 00d38a97bc2c1447a6c338efacf35ddad8b3c130 | |
parent | 3947751d9189946da7486eb765178616d6473745 (diff) | |
download | kvm-unit-tests-fc67b07a4b5183a336f254bc886f9032f603bd5b.tar.gz |
s390x: smp: Test stop and store status on a running and stopped cpu
Let's also test the stop portion of the "stop and store status" sigp
order.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-Id: <20200429143518.1360468-4-frankja@linux.ibm.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
-rw-r--r-- | s390x/smp.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/s390x/smp.c b/s390x/smp.c index bf082d1..57eacb2 100644 --- a/s390x/smp.c +++ b/s390x/smp.c @@ -76,6 +76,18 @@ static void test_stop_store_status(void) struct lowcore *lc = (void *)0x0; report_prefix_push("stop store status"); + report_prefix_push("running"); + smp_cpu_restart(1); + lc->prefix_sa = 0; + lc->grs_sa[15] = 0; + smp_cpu_stop_store_status(1); + mb(); + report(lc->prefix_sa == (uint32_t)(uintptr_t)cpu->lowcore, "prefix"); + report(lc->grs_sa[15], "stack"); + report(smp_cpu_stopped(1), "cpu stopped"); + report_prefix_pop(); + + report_prefix_push("stopped"); lc->prefix_sa = 0; lc->grs_sa[15] = 0; smp_cpu_stop_store_status(1); @@ -83,6 +95,8 @@ static void test_stop_store_status(void) report(lc->prefix_sa == (uint32_t)(uintptr_t)cpu->lowcore, "prefix"); report(lc->grs_sa[15], "stack"); report_prefix_pop(); + + report_prefix_pop(); } static void test_store_status(void) |