summaryrefslogtreecommitdiffstats
path: root/hw/s390x/s390-virtio-ccw.c
diff options
context:
space:
mode:
authorCollin Walling2020-11-13 23:10:22 +0100
committerCornelia Huck2020-11-18 16:57:48 +0100
commite2c6cd567422bfa563be026b9741a1854aecdc06 (patch)
treed7a10886fbbd0732ba14bb79ba56fc1ff2892d13 /hw/s390x/s390-virtio-ccw.c
parentMerge remote-tracking branch 'remotes/berrange-gitlab/tags/misc-fixes-pull-re... (diff)
downloadqemu-e2c6cd567422bfa563be026b9741a1854aecdc06.tar.gz
qemu-e2c6cd567422bfa563be026b9741a1854aecdc06.tar.xz
qemu-e2c6cd567422bfa563be026b9741a1854aecdc06.zip
s390/kvm: fix diag318 propagation and reset functionality
The Control Program Name Code (CPNC) portion of the diag318 info must be set within the SIE block of each VCPU in the configuration. The handler will iterate through each VCPU and dirty the diag318_info reg to be synced with KVM on a subsequent sync_regs call. Additionally, the diag318 info resets must be handled via userspace. As such, QEMU will reset this value for each VCPU during a modified clear, load normal, and load clear reset event. Fixes: fabdada9357b ("s390: guest support for diagnose 0x318") Signed-off-by: Collin Walling <walling@linux.ibm.com> Message-Id: <20201113221022.257054-1-walling@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Janosch Frank <frankja@de.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'hw/s390x/s390-virtio-ccw.c')
-rw-r--r--hw/s390x/s390-virtio-ccw.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 22222c4fd5..4e140bbead 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -486,6 +486,10 @@ static void s390_machine_reset(MachineState *machine)
default:
g_assert_not_reached();
}
+
+ CPU_FOREACH(t) {
+ run_on_cpu(t, s390_do_cpu_set_diag318, RUN_ON_CPU_HOST_ULONG(0));
+ }
s390_ipl_clear_reset_request();
}