On Tue, 3 Jan 2023 12:27:32 +0100 Thomas Huth <th...@redhat.com> wrote:
> On 22/12/2022 16.04, Claudio Imbrenda wrote: > > This patch adds support for the asynchronous teardown for reboot for > > protected VMs. > [...] > > +bool s390_pv_vm_try_disable_async(void) > > +{ > > + char tname[VCPU_THREAD_NAME_SIZE]; > > + QemuThread *t; > > + > > + if (!kvm_check_extension(kvm_state, > > KVM_CAP_S390_PROTECTED_ASYNC_DISABLE)) { > > + return false; > > + } > > + if (s390_pv_cmd(KVM_PV_ASYNC_CLEANUP_PREPARE, NULL) != 0) { > > + return false; > > + } > > + > > + t = g_malloc0(sizeof(QemuThread)); > > + snprintf(tname, VCPU_THREAD_NAME_SIZE, "async_unpr/KVM"); > > + > > + qemu_thread_create(t, tname, s390_pv_do_unprot_async_fn, NULL, > > + QEMU_THREAD_DETACHED); > > I think you could get along without the tname[] array here by simply passing > the string directly to qemu_thread_create() ? ahh, you're right maybe I should also pick a better name? in retrospect it looks quite cryptic > > Apart from that, patch looks fine to me. > > Thomas >