All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Claudio Imbrenda <imbrenda@linux.ibm.com>, qemu-devel@nongnu.org
Cc: david@redhat.com, borntraeger@de.ibm.com, frankja@linux.ibm.com,
	pasic@linux.ibm.com, nrb@linux.ibm.com, nsg@linux.ibm.com,
	seiden@linux.ibm.com
Subject: Re: [PATCH v1 2/2] s390x/pv: Add support for asynchronous teardown for reboot
Date: Tue, 3 Jan 2023 12:27:32 +0100	[thread overview]
Message-ID: <e28ce124-6ae8-2ae3-5d66-f7cf1a02a1cd@redhat.com> (raw)
In-Reply-To: <20221222150421.35839-3-imbrenda@linux.ibm.com>

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() ?

Apart from that, patch looks fine to me.

  Thomas



  reply	other threads:[~2023-01-03 11:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-22 15:04 [PATCH v1 0/2] s390x/pv: Add support for asynchronous teardown for reboot Claudio Imbrenda
2022-12-22 15:04 ` [PATCH v1 1/2] Linux header update Claudio Imbrenda
2022-12-22 15:04 ` [PATCH v1 2/2] s390x/pv: Add support for asynchronous teardown for reboot Claudio Imbrenda
2023-01-03 11:27   ` Thomas Huth [this message]
2023-01-03 11:48     ` Claudio Imbrenda
2023-01-03 11:51       ` Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e28ce124-6ae8-2ae3-5d66-f7cf1a02a1cd@redhat.com \
    --to=thuth@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=nrb@linux.ibm.com \
    --cc=nsg@linux.ibm.com \
    --cc=pasic@linux.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seiden@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.