All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steffen Eiden <seiden@linux.ibm.com>
To: Gautam Gala <ggala@linux.ibm.com>
Cc: qemu-s390x@nongnu.org, qemu-devel@nongnu.org,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Thomas Huth <thuth@redhat.com>
Subject: Re: [PATCH v1 3/3] target/s390x: Return UVC cmd code, RC and RRC value when DIAG 308 Subcode 10 fails to enter secure mode
Date: Mon, 14 Apr 2025 16:03:40 +0200	[thread overview]
Message-ID: <20250414140340.61624-E-seiden@linux.ibm.com> (raw)
In-Reply-To: <20250411092233.418164-4-ggala@linux.ibm.com>

On Fri, Apr 11, 2025 at 11:22:33AM +0200, Gautam Gala wrote:
> Extend DIAG308 subcode 10 to return the UVC RC, RRC and command code
> in bit positions 32-47, 16-31, and 0-15 of register R1 + 1 if the
> function does not complete successfully (in addition to the
> previously returned diag response code in bit position 47-63).
> 
> Signed-off-by: Gautam Gala <ggala@linux.ibm.com>
> ---
>  hw/s390x/ipl.c             | 11 ++++++----
>  hw/s390x/ipl.h             |  5 +++--
>  hw/s390x/s390-virtio-ccw.c | 24 +++++++++++++++------
>  target/s390x/kvm/pv.c      | 44 +++++++++++++++++++++++++-------------
>  target/s390x/kvm/pv.h      | 27 ++++++++++++++++-------
>  5 files changed, 76 insertions(+), 35 deletions(-)
> 
> diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
> index ce6f6078d7..4f3e3945f1 100644
> --- a/hw/s390x/ipl.c
> +++ b/hw/s390x/ipl.c
> @@ -676,7 +676,8 @@ static void s390_ipl_prepare_qipl(S390CPU *cpu)
>      cpu_physical_memory_unmap(addr, len, 1, len);
>  }
>  
> -int s390_ipl_prepare_pv_header(Error **errp)
> +int s390_ipl_prepare_pv_header(Error **errp, uint16_t *pv_cmd,
> +                               uint16_t *pv_rc, uint16_t *pv_rrc)

`Error **errp` should be the last argument. (multiple locations)

...
  
> +struct diag308response {
> +    uint16_t pv_cmd;
> +    uint16_t pv_rrc;
> +    uint16_t pv_rc;
> +    uint16_t diag_rc;
> +};
> +

I think Qemu style wants you to use CamelCase here.
See e.g `390CcwMachineState` below


>  static S390CPU *s390x_new_cpu(const char *typename, uint32_t core_id,
>                                Error **errp)
>  {
> @@ -364,7 +371,10 @@ static void s390_machine_unprotect(S390CcwMachineState *ms)
>      ram_block_discard_disable(false);
>  }
>  

...

> @@ -452,6 +462,7 @@ static void s390_machine_reset(MachineState *machine, ResetType type)
>  {
>      S390CcwMachineState *ms = S390_CCW_MACHINE(machine);
>      enum s390_reset reset_type;
> +    struct diag308response resp;

Reverse Christmas tree.

>      CPUState *cs, *t;
>      S390CPU *cpu;
>  

...


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

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-11  9:22 [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 Gautam Gala
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 [this message]

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=20250414140340.61624-E-seiden@linux.ibm.com \
    --to=seiden@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=ggala@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 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.