mbox series

[0/3] hw/s390x: Don't call register_savevm_live() during instance_init()

Message ID 20231020125728.579747-1-thuth@redhat.com
Headers show
Series hw/s390x: Don't call register_savevm_live() during instance_init() | expand

Message

Thomas Huth Oct. 20, 2023, 12:57 p.m. UTC
We must not call register_savevm_live() during instance_init()
since instances can be created at any time, e.g. during introspection
of a device. We must register the savevm handler during realize()
instead. Fix it now in the s390x devices.

Thomas Huth (3):
  hw/s390x/s390-skeys: Don't call register_savevm_live() during
    instance_init()
  hw/s390x/s390-stattrib: Simplify handling of the "migration-enabled"
    property
  hw/s390x/s390-stattrib: Don't call register_savevm_live() during
    instance_init()

 hw/s390x/s390-skeys.c    | 35 ++++++--------------------
 hw/s390x/s390-stattrib.c | 54 +++++++++++++++-------------------------
 2 files changed, 28 insertions(+), 61 deletions(-)

Comments

David Hildenbrand Oct. 20, 2023, 1:16 p.m. UTC | #1
On 20.10.23 14:57, Thomas Huth wrote:
> We must not call register_savevm_live() during instance_init()
> since instances can be created at any time, e.g. during introspection
> of a device. We must register the savevm handler during realize()
> instead. Fix it now in the s390x devices.
> 
> Thomas Huth (3):
>    hw/s390x/s390-skeys: Don't call register_savevm_live() during
>      instance_init()
>    hw/s390x/s390-stattrib: Simplify handling of the "migration-enabled"
>      property
>    hw/s390x/s390-stattrib: Don't call register_savevm_live() during
>      instance_init()
> 
>   hw/s390x/s390-skeys.c    | 35 ++++++--------------------
>   hw/s390x/s390-stattrib.c | 54 +++++++++++++++-------------------------
>   2 files changed, 28 insertions(+), 61 deletions(-)
> 

Acked-by: David Hildenbrand <david@redhat.com>
Eric Farman Oct. 20, 2023, 2:05 p.m. UTC | #2
On Fri, 2023-10-20 at 14:57 +0200, Thomas Huth wrote:
> We must not call register_savevm_live() during instance_init()
> since instances can be created at any time, e.g. during introspection
> of a device. We must register the savevm handler during realize()
> instead. Fix it now in the s390x devices.
> 
> Thomas Huth (3):
>   hw/s390x/s390-skeys: Don't call register_savevm_live() during
>     instance_init()
>   hw/s390x/s390-stattrib: Simplify handling of the "migration-
> enabled"
>     property
>   hw/s390x/s390-stattrib: Don't call register_savevm_live() during
>     instance_init()
> 
>  hw/s390x/s390-skeys.c    | 35 ++++++--------------------
>  hw/s390x/s390-stattrib.c | 54 +++++++++++++++-----------------------
> --
>  2 files changed, 28 insertions(+), 61 deletions(-)

Man, this makes it a lot easier to read too. With the amended patch 3:

Reviewed-by: Eric Farman <farman@linux.ibm.com>