Re: [kvm-unit-tests PATCH v3 4/9] s390x: smp: Rework cpu start and active tracking

David Hildenbrand
2020-01-20T14:53:32Z

> Well, I have restarts in the smp test and I don't want to always pass a
> psw if I know what the last restart psw was.
> Simply restarting into test_func or wait_for_flag is certainly no problem.
>
>>

Makes sense.

>>> + rc = sigp(addr, SIGP_RESTART, 0, NULL);
>>> + if (rc)
>>> + return rc;
>>> + /*
>>> + * 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))
>>> + mb();
>>
>> Should you make sure to stop the CPU before issuing the restart?
>> Otherwise you will get false positives if it is still running (but
>> hasn't processed the RESTART yet)
>
> Good point
>

--
Thanks,

David / dhildenb