[PATCH v2 0/3] DIAG 308: extend subcode 10 to return UVC cmd id, RC and RRC values upon failure to enter secure mode

Gautam Gala posted 3 patches 3 weeks ago
There is a newer version of this series
hw/s390x/ipl.c             | 11 ++++---
hw/s390x/ipl.h             |  5 ++--
hw/s390x/s390-virtio-ccw.c | 24 ++++++++++++----
target/s390x/kvm/pv.c      | 59 +++++++++++++++++++++++---------------
target/s390x/kvm/pv.h      | 27 +++++++++++------
5 files changed, 83 insertions(+), 43 deletions(-)
[PATCH v2 0/3] DIAG 308: extend subcode 10 to return UVC cmd id, RC and RRC values upon failure to enter secure mode
Posted by Gautam Gala 3 weeks ago
DIAG 308 (subcode 10 - performing secure execution unpack) response
code when the configuration is unable to enter secure mode has limited
usability as it is a fixed value (0xa02) for variety of different
reasons. The aim is to extend this DIAG to return UVC command ID, RC
and RRC values in addition to the diag response code. This feature can
be used by the stage3a bootloader (s390-tools/rust/pvimg/boot) to read
these new values from the corresponding register and print an
appropriate error message to help pin point the cause.

The response code, UVC RC, RRC, and command ID are returned in bit
positions 48-63, 32-47, 16-31, and 0-15 of register R1 + 1 if the
function does not complete successfully (Previously, only the
response code was returned in bits 48-63).

These patches contains updates based on feedback from Steffen Eiden
from message-ID <20250414133845.61624-D-seiden@linux.ibm.com> and
<20250414140340.61624-E-seiden@linux.ibm.com>

Gautam Gala (3):
  target/s390x: Introduce constant when checking if PV header couldn't
    be decrypted
  target/s390x: introduce function when exiting PV
  target/s390x: Return UVC cmd code, RC and RRC value when DIAG 308
    Subcode 10 fails to enter secure mode

 hw/s390x/ipl.c             | 11 ++++---
 hw/s390x/ipl.h             |  5 ++--
 hw/s390x/s390-virtio-ccw.c | 24 ++++++++++++----
 target/s390x/kvm/pv.c      | 59 +++++++++++++++++++++++---------------
 target/s390x/kvm/pv.h      | 27 +++++++++++------
 5 files changed, 83 insertions(+), 43 deletions(-)

-- 
2.49.0