[PATCH 1/4] s390x: Don't do a normal reset on the initial cpu

Janosch Frank posted 4 patches 6 years, 2 months ago
Maintainers: Richard Henderson <rth@twiddle.net>, Christian Borntraeger <borntraeger@de.ibm.com>, Cornelia Huck <cohuck@redhat.com>, David Hildenbrand <david@redhat.com>, Halil Pasic <pasic@linux.ibm.com>
There is a newer version of this series
[PATCH 1/4] s390x: Don't do a normal reset on the initial cpu
Posted by Janosch Frank 6 years, 2 months ago
The initiating cpu needs to be reset with an initial reset. While
doing a normal reset followed by a initial reset is not wron per-se,
the Ultravisor will only allow the correct reset to be performed.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
---
 hw/s390x/s390-virtio-ccw.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index d3edeef0ad..c1d1440272 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -348,6 +348,9 @@ static void s390_machine_reset(MachineState *machine)
         break;
     case S390_RESET_LOAD_NORMAL:
         CPU_FOREACH(t) {
+            if (t == cs) {
+                continue;
+            }
             run_on_cpu(t, s390_do_cpu_reset, RUN_ON_CPU_NULL);
         }
         subsystem_reset();
-- 
2.20.1


Re: [PATCH 1/4] s390x: Don't do a normal reset on the initial cpu
Posted by David Hildenbrand 6 years, 2 months ago
On 22.11.19 08:52, Janosch Frank wrote:
> The initiating cpu needs to be reset with an initial reset. While
> doing a normal reset followed by a initial reset is not wron per-se,
> the Ultravisor will only allow the correct reset to be performed.
> 
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
> ---
>   hw/s390x/s390-virtio-ccw.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index d3edeef0ad..c1d1440272 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -348,6 +348,9 @@ static void s390_machine_reset(MachineState *machine)
>           break;
>       case S390_RESET_LOAD_NORMAL:
>           CPU_FOREACH(t) {
> +            if (t == cs) {
> +                continue;
> +            }
>               run_on_cpu(t, s390_do_cpu_reset, RUN_ON_CPU_NULL);
>           }
>           subsystem_reset();
> 

Right, AFAIKS, s390_cpu_initial_reset() does a s390_cpu_reset() right 
no, so nothing should change.

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 

Thanks,

David / dhildenb