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

Thomas Huth posted 3 patches 1 year, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20231020150554.664422-1-thuth@redhat.com
Maintainers: Halil Pasic <pasic@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>, Eric Farman <farman@linux.ibm.com>, Richard Henderson <richard.henderson@linaro.org>, David Hildenbrand <david@redhat.com>, Ilya Leoshkevich <iii@linux.ibm.com>, Thomas Huth <thuth@redhat.com>
hw/s390x/s390-skeys.c    | 35 ++++++-------------------
hw/s390x/s390-stattrib.c | 55 +++++++++++++++-------------------------
2 files changed, 29 insertions(+), 61 deletions(-)
[PATCH v2 0/3] hw/s390x: Don't call register_savevm_live() during instance_init()
Posted by Thomas Huth 1 year, 1 month ago
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.

v2:
- Fixed bug in the third patch ("sas" -> "dev")
- Add an early return in case of error in the third patch
- Added Acked-by/Reviewed by from David and Eric (thanks!)

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 | 55 +++++++++++++++-------------------------
 2 files changed, 29 insertions(+), 61 deletions(-)

-- 
2.41.0
Re: [PATCH v2 0/3] hw/s390x: Don't call register_savevm_live() during instance_init()
Posted by Juan Quintela 1 year, 1 month ago
Thomas Huth <thuth@redhat.com> 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.
>
> v2:
> - Fixed bug in the third patch ("sas" -> "dev")
> - Add an early return in case of error in the third patch
> - Added Acked-by/Reviewed by from David and Eric (thanks!)
>
> 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 | 55 +++++++++++++++-------------------------
>  2 files changed, 29 insertions(+), 61 deletions(-)

Acked-by: Juan Quintela <quintela@redhat.com>

It makes things work for my test, Thanks.

Should I get those through the migration tree?

Later, Juan.
Re: [PATCH v2 0/3] hw/s390x: Don't call register_savevm_live() during instance_init()
Posted by Thomas Huth 1 year, 1 month ago
On 23/10/2023 13.32, Juan Quintela wrote:
> Thomas Huth <thuth@redhat.com> 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.
>>
>> v2:
>> - Fixed bug in the third patch ("sas" -> "dev")
>> - Add an early return in case of error in the third patch
>> - Added Acked-by/Reviewed by from David and Eric (thanks!)
>>
>> 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 | 55 +++++++++++++++-------------------------
>>   2 files changed, 29 insertions(+), 61 deletions(-)
> 
> Acked-by: Juan Quintela <quintela@redhat.com>
> 
> It makes things work for my test, Thanks.
> 
> Should I get those through the migration tree?

Sure, if you plan to do a pull request soon, feel free to take them!
(Otherwise I'll queue them for my next s390x pull request ... likely not 
happening within the next two weeks, though)

  Thomas