diff options
author | Pierre Morel <pmorel@linux.ibm.com> | 2023-10-16 20:39:10 +0200 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2023-10-20 07:16:53 +0200 |
commit | 3d6e75f4df67980479cc0912b842202f2093aeeb (patch) | |
tree | 449e0493a89d50da6c18bd0676da5be4ba8a2659 /hw | |
parent | a67f05b39106bf3477475297d8508bcb7d8eb0d8 (diff) | |
download | qemu-3d6e75f4df67980479cc0912b842202f2093aeeb.zip qemu-3d6e75f4df67980479cc0912b842202f2093aeeb.tar.gz qemu-3d6e75f4df67980479cc0912b842202f2093aeeb.tar.bz2 |
s390x/cpu topology: resetting the Topology-Change-Report
During a subsystem reset the Topology-Change-Report is cleared
by the machine.
Let's ask KVM to clear the Modified Topology Change Report (MTCR)
bit of the SCA in the case of a subsystem reset.
Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
Co-developed-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
Message-ID: <20231016183925.2384704-7-nsg@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/s390x/cpu-topology.c | 11 | ||||
-rw-r--r-- | hw/s390x/s390-virtio-ccw.c | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/hw/s390x/cpu-topology.c b/hw/s390x/cpu-topology.c index 1316834..7ec93192 100644 --- a/hw/s390x/cpu-topology.c +++ b/hw/s390x/cpu-topology.c @@ -91,6 +91,17 @@ static void s390_topology_init(MachineState *ms) } /** + * s390_topology_reset: + * + * Generic reset for CPU topology, calls s390_topology_reset() + * to reset the kernel Modified Topology Change Record. + */ +void s390_topology_reset(void) +{ + s390_cpu_topology_set_changed(false); +} + +/** * s390_topology_cpu_default: * @cpu: pointer to a S390CPU * @errp: Error pointer diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 7fe2bce..6012165 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -124,6 +124,9 @@ static void subsystem_reset(void) device_cold_reset(dev); } } + if (s390_has_topology()) { + s390_topology_reset(); + } } static int virtio_ccw_hcall_notify(const uint64_t *args) |