qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 2/5] s390x: switch pv and subsystem reset ordering on rebo


From: Janosch Frank
Subject: Re: [PATCH v4 2/5] s390x: switch pv and subsystem reset ordering on reboot
Date: Fri, 1 Sep 2023 08:31:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 8/31/23 18:21, Marc Hartmayer wrote:
On Wed, Aug 23, 2023 at 04:22 PM +0200, Steffen Eiden <seiden@linux.ibm.com> 
wrote:
From: Janosch Frank <frankja@linux.ibm.com>

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 switch the ordering around to make that happen.

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

diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 4b36c9970e..795dd53d68 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -442,13 +442,13 @@ static void s390_machine_reset(MachineState *machine, 
ShutdownCause reason)
      switch (reset_type) {
      case S390_RESET_EXTERNAL:
      case S390_RESET_REIPL:
+        qemu_devices_reset(reason);
+        s390_crypto_reset();
+
          if (s390_is_pv()) {
              s390_machine_unprotect(ms);
          }
- qemu_devices_reset(reason);
-        s390_crypto_reset();
-
          /* configure and start the ipl CPU only */
          run_on_cpu(cs, s390_do_cpu_ipl, RUN_ON_CPU_NULL);
          break;
--
2.41.0


Unfortunately, this breaks things for me. You can reproduce the problem
easily… Start an SE guest via direct kernel boot and reboot the guest
after the guest has booted.

Seems like we didn't test a direct kernel boot reboot...
I'm looking into it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]