Skip to content
Snippets Groups Projects
Commit ef153590 authored by Janosch Frank's avatar Janosch Frank Committed by Thomas Huth
Browse files

s390x: do a subsystem reset before the unprotect on reboot


Bound APQNs have to be reset before tearing down the secure config via
s390_machine_unprotect(). Otherwise the Ultravisor will return a error
code.

So let's do a subsystem_reset() which includes a AP reset before the
unprotect call. We'll do a full device_reset() afterwards which will
reset some devices twice. That's ok since we can't move the
device_reset() before the unprotect as it includes a CPU clear reset
which the Ultravisor does not expect at that point in time.

Signed-off-by: default avatarJanosch Frank <frankja@linux.ibm.com>
Message-ID: <20230901114851.154357-1-frankja@linux.ibm.com>
Tested-by: default avatarViktor Mihajlovski <mihajlov@linux.ibm.com>
Acked-by: default avatarChristian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
parent 297ec01f
No related branches found
No related tags found
No related merge requests found
......@@ -438,10 +438,20 @@ static void s390_machine_reset(MachineState *machine, ShutdownCause reason)
switch (reset_type) {
case S390_RESET_EXTERNAL:
case S390_RESET_REIPL:
/*
* Reset the subsystem which includes a AP reset. If a PV
* guest had APQNs attached the AP reset is a prerequisite to
* unprotecting since the UV checks if all APQNs are reset.
*/
subsystem_reset();
if (s390_is_pv()) {
s390_machine_unprotect(ms);
}
/*
* Device reset includes CPU clear resets so this has to be
* done AFTER the unprotect call above.
*/
qemu_devices_reset(reason);
s390_crypto_reset();
......
  • Anton @anjo

    mentioned in commit 003d0c7e

    ·

    mentioned in commit 003d0c7e

    Toggle commit list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment