s390x/protvirt: allow to IPL secure guests with -no-reboot
commitd1bb69db4ceb6897ef6a17bf263146b53a123632
authorChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 21 Jul 2020 10:32:02 +0000 (21 06:32 -0400)
committerCornelia Huck <cohuck@redhat.com>
Fri, 24 Jul 2020 06:35:22 +0000 (24 08:35 +0200)
treecd27c2fa370a30a8bfb122e620fcc56eff72e62e
parent8ffa52c20d5693d454f65f2024a1494edfea65d4
s390x/protvirt: allow to IPL secure guests with -no-reboot

Right now, -no-reboot prevents secure guests from running. This is
correct from an implementation point of view, as we have modeled the
transition from non-secure to secure as a program directed IPL. From
a user perspective, this is not the behavior of least surprise.

We should implement the IPL into protected mode similar to the
functions that we use for kdump/kexec. In other words, we do not stop
here when -no-reboot is specified on the command line. Like function 0
or function 1, function 10 is not a classic reboot. For example, it
can only be called once. Before calling it a second time, a real
reboot/reset must happen in-between. So function code 10 is more or
less a state transition reset, but not a "standard" reset or reboot.

Fixes: 4d226deafc44 ("s390x: protvirt: Support unpack facility")
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Acked-by: Viktor Mihajlovski <mihajlov@linux.ibm.com>
Message-Id: <20200721103202.30610-1-borntraeger@de.ibm.com>
[CH: tweaked description]
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
hw/s390x/ipl.c