From: Cornelia Huck <cohuck@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Janosch Frank <frankja@linux.vnet.ibm.com>,
KVM <kvm@vger.kernel.org>, David Hildenbrand <david@redhat.com>,
linux-s390 <linux-s390@vger.kernel.org>,
Thomas Huth <thuth@redhat.com>
Subject: Re: [kvm-unit-tests 1/2] s390x/smp: fix detection of "running"
Date: Tue, 31 Mar 2020 08:49:17 +0200 [thread overview]
Message-ID: <20200331084917.4ab3f405.cohuck@redhat.com> (raw)
In-Reply-To: <20200330084911.34248-2-borntraeger@de.ibm.com>
On Mon, 30 Mar 2020 04:49:10 -0400
Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> On s390x hosts with a single CPU, the smp test case hangs (loops).
> The check is our restart has finished is wrong.
s/is/if/
> Sigp sense running status checks if the CPU is currently backed by a
> real CPU. This means that on single CPU hosts a sigp sense running
> will never claim that a target is running. We need to check for not
> being stopped instead.
>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
> lib/s390x/smp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/s390x/smp.c b/lib/s390x/smp.c
> index 2555bf4..5ed8b7b 100644
> --- a/lib/s390x/smp.c
> +++ b/lib/s390x/smp.c
> @@ -128,7 +128,7 @@ static int smp_cpu_restart_nolock(uint16_t addr, struct psw *psw)
> * The order has been accepted, but the actual restart may not
> * have been performed yet, so wait until the cpu is running.
> */
> - while (!smp_cpu_running(addr))
> + while (smp_cpu_stopped(addr))
> mb();
> cpu->active = true;
> return 0;
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
next prev parent reply other threads:[~2020-03-31 6:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-30 8:49 [kvm-unit-tests 0/2] s390x/smp fix and enhancement Christian Borntraeger
2020-03-30 8:49 ` [kvm-unit-tests 1/2] s390x/smp: fix detection of "running" Christian Borntraeger
2020-03-30 9:03 ` David Hildenbrand
2020-03-30 9:17 ` Janosch Frank
2020-03-31 6:49 ` Cornelia Huck [this message]
2020-03-31 8:50 ` David Hildenbrand
2020-03-30 8:49 ` [kvm-unit-tests 2/2] s390x/smp: add minimal test for sigp sense running status Christian Borntraeger
2020-03-30 10:58 ` David Hildenbrand
2020-04-02 10:44 ` Christian Borntraeger
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=20200331084917.4ab3f405.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=david@redhat.com \
--cc=frankja@linux.vnet.ibm.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