qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gautam Gala <ggala@linux.ibm.com>
To: qemu-s390x@nongnu.org, qemu-devel@nongnu.org
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>,
	Thomas Huth <thuth@redhat.com>
Subject: [PATCH v1 0/3] target/s390x - DIAG 308 extend subcode 10 to return UVC cmd id, RC and RRC values upon failure to enter secure mode
Date: Fri, 11 Apr 2025 11:22:30 +0200	[thread overview]
Message-ID: <20250411092233.418164-1-ggala@linux.ibm.com> (raw)

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).

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      | 62 ++++++++++++++++++++++++--------------
 target/s390x/kvm/pv.h      | 27 ++++++++++++-----
 5 files changed, 86 insertions(+), 43 deletions(-)

-- 
2.49.0



             reply	other threads:[~2025-04-11  9:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-11  9:22 Gautam Gala [this message]
2025-04-11  9:22 ` [PATCH v1 1/3] target/s390x: Introduce constant when checking if PV header couldn't be decrypted Gautam Gala
2025-04-14 13:34   ` Steffen Eiden
2025-04-11  9:22 ` [PATCH v1 2/3] target/s390x: introduce function when exiting PV Gautam Gala
2025-04-14 13:38   ` Steffen Eiden
2025-04-11  9:22 ` [PATCH v1 3/3] target/s390x: Return UVC cmd code, RC and RRC value when DIAG 308 Subcode 10 fails to enter secure mode Gautam Gala
2025-04-14 14:03   ` Steffen Eiden

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250411092233.418164-1-ggala@linux.ibm.com \
    --to=ggala@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).