aboutsummaryrefslogtreecommitdiff
path: root/target/s390x/diag.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/s390x/diag.c')
-rw-r--r--target/s390x/diag.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/target/s390x/diag.c b/target/s390x/diag.c
index 27ffd48..a1fd54d 100644
--- a/target/s390x/diag.c
+++ b/target/s390x/diag.c
@@ -133,7 +133,14 @@ void handle_diag_308(CPUS390XState *env, uint64_t r1, uint64_t r3, uintptr_t ra)
valid = subcode == DIAG308_PV_SET ? iplb_valid_pv(iplb) : iplb_valid(iplb);
if (!valid) {
- env->regs[r1 + 1] = DIAG_308_RC_INVALID;
+ if (subcode == DIAG308_SET && iplb->pbt == S390_IPL_TYPE_QEMU_SCSI) {
+ s390_rebuild_iplb(iplb->devno, iplb);
+ s390_ipl_update_diag308(iplb);
+ env->regs[r1 + 1] = DIAG_308_RC_OK;
+ } else {
+ env->regs[r1 + 1] = DIAG_308_RC_INVALID;
+ }
+
goto out;
}