[PATCH v2 0/1] s390x/pv: Fix spurious warning with asynchronous teardown

Claudio Imbrenda posted 1 patch 1 year ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230510105531.30623-1-imbrenda@linux.ibm.com
Maintainers: Halil Pasic <pasic@linux.ibm.com>, Christian Borntraeger <borntraeger@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>, Eric Farman <farman@linux.ibm.com>
hw/s390x/pv.c              | 10 ++++++++--
hw/s390x/s390-virtio-ccw.c |  2 +-
include/hw/s390x/pv.h      |  2 +-
3 files changed, 10 insertions(+), 4 deletions(-)
[PATCH v2 0/1] s390x/pv: Fix spurious warning with asynchronous teardown
Posted by Claudio Imbrenda 1 year ago
Kernel commit 292a7d6fca33 ("KVM: s390: pv: fix asynchronous teardown
for small VMs") causes the KVM_PV_ASYNC_CLEANUP_PREPARE ioctl to fail
if the VM is not larger than 2GiB. QEMU would attempt it and fail,
print an error message, and then proceed with a normal teardown.

Avoid attempting to use asynchronous teardown altogether when the VM is
not larger than 2 GiB. This will avoid triggering the error message and
also avoid pointless overhead; normal teardown is fast enough for small
VMs.

v1->v2:
* Use 2GiB as threshold, the same as the kernel [thomas]
* Pass the machine state to s390_pv_vm_try_disable_async instead of
  using qdev_get_machine() [thomas]
* Update and improve patch description and comments

Claudio Imbrenda (1):
  s390x/pv: Fix spurious warning with asynchronous teardown

 hw/s390x/pv.c              | 10 ++++++++--
 hw/s390x/s390-virtio-ccw.c |  2 +-
 include/hw/s390x/pv.h      |  2 +-
 3 files changed, 10 insertions(+), 4 deletions(-)

-- 
2.40.1