2fb40d1b94
Since the instance_init() function immediately tries to set the property to "true", the s390_skeys_set_migration_enabled() tries to register a savevm handler during instance_init(). However, instance_init() functions can be called multiple times, e.g. for introspection of devices. That means multiple instances of devices can be created during runtime (which is fine as long as they all don't get realized, too), so the "Prevent double registration of savevm handler" check in the s390_skeys_set_migration_enabled() function does not work at all as expected (since there could be more than one instance). Thus we must not call register_savevm_live() from an instance_init() function at all. Move this to the realize() function instead. This way we can also get rid of the property getter and setter functions completely, simplifying the code along the way quite a bit. Acked-by: David Hildenbrand <david@redhat.com> Reviewed-by: Eric Farman <farman@linux.ibm.com> Acked-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20231020150554.664422-2-thuth@redhat.com> |
||
---|---|---|
.. | ||
3270-ccw.c | ||
ap-bridge.c | ||
ap-device.c | ||
ccw-device.c | ||
ccw-device.h | ||
cpu-topology.c | ||
css-bridge.c | ||
css.c | ||
event-facility.c | ||
ipl.c | ||
ipl.h | ||
Kconfig | ||
meson.build | ||
s390-ccw.c | ||
s390-pci-bus.c | ||
s390-pci-inst.c | ||
s390-pci-kvm.c | ||
s390-pci-vfio.c | ||
s390-skeys-kvm.c | ||
s390-skeys.c | ||
s390-stattrib-kvm.c | ||
s390-stattrib.c | ||
s390-virtio-ccw.c | ||
s390-virtio-hcall.c | ||
s390-virtio-hcall.h | ||
sclp.c | ||
sclpcpu.c | ||
sclpquiesce.c | ||
tod-kvm.c | ||
tod-tcg.c | ||
tod.c | ||
trace-events | ||
trace.h | ||
vhost-scsi-ccw.c | ||
vhost-user-fs-ccw.c | ||
vhost-vsock-ccw.c | ||
virtio-ccw-9p.c | ||
virtio-ccw-balloon.c | ||
virtio-ccw-blk.c | ||
virtio-ccw-crypto.c | ||
virtio-ccw-gpu.c | ||
virtio-ccw-input.c | ||
virtio-ccw-net.c | ||
virtio-ccw-rng.c | ||
virtio-ccw-scsi.c | ||
virtio-ccw-serial.c | ||
virtio-ccw.c | ||
virtio-ccw.h |