From: Janosch Frank <frankja@linux.ibm.com>
To: Thomas Huth <thuth@redhat.com>, kvm@vger.kernel.org
Cc: linux-s390@vger.kernel.org, david@redhat.com
Subject: Re: [kvm-unit-tests PATCH v2 6/6] s390x: SMP test
Date: Tue, 10 Sep 2019 13:11:12 +0200 [thread overview]
Message-ID: <d3fc9cae-a3cd-27c7-b8b0-78628ae03e2f@linux.ibm.com> (raw)
In-Reply-To: <28304989-f49d-850d-4ec0-98ed0d516969@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 1551 bytes --]
On 9/10/19 11:43 AM, Thomas Huth wrote:
> On 05/09/2019 12.39, Janosch Frank wrote:
>> Testing SIGP emulation for the following order codes:
>> * start
>> * stop
>> * restart
>> * set prefix
>> * store status
>> * stop and store status
>> * reset
>> * initial reset
>> * external call
>> * emegergency call
>>
>> restart and set prefix are part of the library and needed to start
>> other cpus.
>>
>> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
>> ---
> [...]
>> +static void test_store_status(void)
>> +{
>> + struct cpu_status *status = alloc_pages(1);
>> + uint32_t r;
>> +
>> + report_prefix_push("store status at address");
>> + memset(status, 0, PAGE_SIZE * 2);
>> +
>> + report_prefix_push("running");
>> + smp_cpu_restart(1);
>> + sigp(1, SIGP_STORE_STATUS_AT_ADDRESS, (uintptr_t)status, &r);
>> + report("incorrect state", r == SIGP_STATUS_INCORRECT_STATE);
>> + report("status not written", !memcmp(status, (void*)status + PAGE_SIZE, PAGE_SIZE));
>> + report_prefix_pop();
>> +
>> + memset(status, 0, PAGE_SIZE);
>> + report_prefix_push("stopped");
>> + smp_cpu_stop(1);
>> + sigp(1, SIGP_STORE_STATUS_AT_ADDRESS, (uintptr_t)status, NULL);
>> + while (!status->prefix) { mb(); }
>> + report("status written", 1);
>> + free_pages(status, PAGE_SIZE);
>
> Shouldn't that be PAGE_SIZE * 2 instead?
Indeed
>
>> + report_prefix_pop();
>> +
>> + report_prefix_pop();
>> +}
>
> The remaining part of the patch looks fine to me.
Thanks for having a look
>
> Thomas
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2019-09-10 11:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-05 10:39 [kvm-unit-tests PATCH v2 0/6] s390x: Add multiboot and smp Janosch Frank
2019-09-05 10:39 ` [kvm-unit-tests PATCH v2 1/6] s390x: Use interrupts in SCLP and add locking Janosch Frank
2019-09-09 9:08 ` Thomas Huth
2019-09-10 10:14 ` David Hildenbrand
2019-09-10 11:24 ` David Hildenbrand
2019-09-10 11:25 ` Janosch Frank
2019-09-10 11:30 ` David Hildenbrand
2019-09-05 10:39 ` [kvm-unit-tests PATCH v2 2/6] s390x: Add linemode console Janosch Frank
2019-09-05 10:39 ` [kvm-unit-tests PATCH v2 3/6] s390x: Add linemode buffer to fix newline on every print Janosch Frank
2019-09-09 9:02 ` David Hildenbrand
2019-09-11 7:57 ` David Hildenbrand
2019-09-19 11:07 ` Janosch Frank
2019-09-05 10:39 ` [kvm-unit-tests PATCH v2 4/6] s390x: Add initial smp code Janosch Frank
2019-09-09 15:37 ` Thomas Huth
2019-09-11 8:33 ` Janosch Frank
2019-09-10 12:19 ` Thomas Huth
2019-09-05 10:39 ` [kvm-unit-tests PATCH v2 5/6] s390x: Prepare for external calls Janosch Frank
2019-09-09 15:47 ` Thomas Huth
2019-09-05 10:39 ` [kvm-unit-tests PATCH v2 6/6] s390x: SMP test Janosch Frank
2019-09-10 9:43 ` Thomas Huth
2019-09-10 11:11 ` Janosch Frank [this message]
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=d3fc9cae-a3cd-27c7-b8b0-78628ae03e2f@linux.ibm.com \
--to=frankja@linux.ibm.com \
--cc=david@redhat.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;
as well as URLs for NNTP newsgroup(s).