All of lore.kernel.org
 help / color / mirror / Atom feed
From: Janosch Frank <frankja@linux.ibm.com>
To: Gautam Gala <ggala@linux.ibm.com>,
	qemu-s390x@nongnu.org, qemu-devel@nongnu.org
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>,
	Thomas Huth <thuth@redhat.com>,
	Steffen Eiden <seiden@linux.ibm.com>
Subject: Re: [PATCH v4 1/3] target/s390x: Introduce constant when checking if PV header couldn't be decrypted
Date: Tue, 22 Apr 2025 15:12:59 +0200	[thread overview]
Message-ID: <40324473-873b-4f12-9435-cba4546accbe@linux.ibm.com> (raw)
In-Reply-To: <20250417123756.729132-2-ggala@linux.ibm.com>

On 4/17/25 2:37 PM, Gautam Gala wrote:
> 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>
> Signed-off-by: Gautam Gala <ggala@linux.ibm.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 b191a4a68a..3a0a971f0b 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 DIAG_308_UV_RC_INVAL_HOSTKEY    0x0108

s/DIAG_308_UV_RC_INVAL_HOSTKEY/UV_RC_SSC_INVAL_HOSTKEY/

The naming of the constant should reflect to which UV command this rc 
belongs to.

Once changed:
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>

>   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 == DIAG_308_UV_RC_INVAL_HOSTKEY) {
>               error_append_hint(errp, "Please check whether the image is "
>                                       "correctly encrypted for this host\n");
>           }



  reply	other threads:[~2025-04-22 13:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-17 12:37 [PATCH v4 0/3] DIAG 308: extend subcode 10 to return UVC cmd id, RC and RRC values upon failure to enter secure mode Gautam Gala
2025-04-17 12:37 ` [PATCH v4 1/3] target/s390x: Introduce constant when checking if PV header couldn't be decrypted Gautam Gala
2025-04-22 13:12   ` Janosch Frank [this message]
2025-04-17 12:37 ` [PATCH v4 2/3] target/s390x: Introduce function when exiting PV Gautam Gala
2025-04-22 13:13   ` Janosch Frank
2025-04-25  9:41   ` Thomas Huth
2025-04-17 12:37 ` [PATCH v4 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-22 13:17   ` Janosch Frank
2025-04-22 15:09     ` Thomas Huth

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=40324473-873b-4f12-9435-cba4546accbe@linux.ibm.com \
    --to=frankja@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=ggala@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=seiden@linux.ibm.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.