qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
	Steffen Eiden <seiden@linux.ibm.com>,
	Janosch Frank <frankja@linux.ibm.com>,
	Gautam Gala <ggala@linux.ibm.com>
Subject: [PULL 1/9] target/s390x: Introduce constant when checking if PV header couldn't be decrypted
Date: Wed, 30 Apr 2025 20:50:27 +0200	[thread overview]
Message-ID: <20250430185035.724919-2-thuth@redhat.com> (raw)
In-Reply-To: <20250430185035.724919-1-thuth@redhat.com>

From: Gautam Gala <ggala@linux.ibm.com>

Introduce a named constant when checking the Set Secure Configuration parameters
UV call return code for the case where no valid host key was found and therefore
the PV header couldn't be decrypted (0x108).

Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Signed-off-by: Gautam Gala <ggala@linux.ibm.com>
Message-ID: <20250423080915.1048123-2-ggala@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 target/s390x/kvm/pv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/s390x/kvm/pv.c b/target/s390x/kvm/pv.c
index fe0a72c416e..1947a3d6692 100644
--- a/target/s390x/kvm/pv.c
+++ b/target/s390x/kvm/pv.c
@@ -147,6 +147,7 @@ bool s390_pv_vm_try_disable_async(S390CcwMachineState *ms)
     return true;
 }
 
+#define UV_RC_SSC_INVAL_HOSTKEY    0x0108
 int s390_pv_set_sec_parms(uint64_t origin, uint64_t length, Error **errp)
 {
     int ret, pvrc;
@@ -158,7 +159,7 @@ int s390_pv_set_sec_parms(uint64_t origin, uint64_t length, Error **errp)
     ret = s390_pv_cmd_pvrc(KVM_PV_SET_SEC_PARMS, &args, &pvrc);
     if (ret) {
         error_setg(errp, "Failed to set secure execution parameters");
-        if (pvrc == 0x108) {
+        if (pvrc == UV_RC_SSC_INVAL_HOSTKEY) {
             error_append_hint(errp, "Please check whether the image is "
                                     "correctly encrypted for this host\n");
         }
-- 
2.49.0



  reply	other threads:[~2025-04-30 18:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-30 18:50 [PULL 0/9] Misc patches (s390x, build env, clean-ups) Thomas Huth
2025-04-30 18:50 ` Thomas Huth [this message]
2025-04-30 18:50 ` [PULL 2/9] target/s390x: Introduce function when exiting PV Thomas Huth
2025-04-30 18:50 ` [PULL 3/9] target/s390x: Return UVC cmd code, RC and RRC value when DIAG 308 Subcode 10 fails to enter secure mode Thomas Huth
2025-04-30 18:50 ` [PULL 4/9] meson/configure: add 'valgrind' option & --{en, dis}able-valgrind flag Thomas Huth
2025-04-30 18:50 ` [PULL 5/9] Drop support for Python 3.8 Thomas Huth
2025-04-30 18:50 ` [PULL 6/9] tests/functional/test_ppc64_pseries: Skip test_ppc64_linux_smt_boot if necessary Thomas Huth
2025-04-30 18:50 ` [PULL 7/9] meson.build: Put the D-Bus summary into the UI section Thomas Huth
2025-04-30 18:50 ` [PULL 8/9] hw/rtc/mc146818rtc: Drop pre-v3 migration stream support Thomas Huth
2025-04-30 18:50 ` [PULL 9/9] docs/devel/build-environment: enhance MSYS2 instructions Thomas Huth
2025-05-06 13:57 ` [PULL 0/9] Misc patches (s390x, build env, clean-ups) Stefan Hajnoczi

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=20250430185035.724919-2-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=ggala@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seiden@linux.ibm.com \
    --cc=stefanha@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).