On 4/17/25 2:37 PM, 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 <gg...@linux.ibm.com>
---

[...]

+void s390_pv_inject_reset_error(CPUState *cs,
+                                struct S390PVResponse pv_resp)
  {
      int r1 = (cs->kvm_run->s390_sieic.ipa & 0x00f0) >> 4;
      CPUS390XState *env = &S390_CPU(cs)->env;
+ union {
+        struct {
+            uint16_t pv_cmd;
+            uint16_t pv_rrc;
+            uint16_t pv_rc;
+            uint16_t diag_rc;
+        };
+        uint64_t regs;
+    } resp = {.pv_cmd = pv_resp.cmd,
+              .pv_rrc = pv_resp.rrc,
+              .pv_rc = pv_resp.rc,
+              .diag_rc = DIAG_308_RC_INVAL_FOR_PV};
+

@Thomas: Is the formatting of the assignments correct or should there be no assignment on lines containing "{}"?

Checkpatch is happy, though personally I find it hard to read.

Once that's clear or fixed:
Reviewed-by: Janosch Frank <fran...@linux.ibm.com>



Reply via email to