qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, qemu-devel@nongnu.org
Cc: Florian Weimer <fweimer@redhat.com>,
	Kevin Wolf <kwolf@redhat.com>,
	qemu-block@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
	Richard Henderson <richard.henderson@linaro.org>,
	Fam Zheng <fam@euphon.net>, Serge Guelton <sguelton@redhat.com>
Subject: Re: [PATCH v4 1/4] tls: add macros for coroutine-safe TLS variables
Date: Wed, 23 Feb 2022 10:47:06 +0100	[thread overview]
Message-ID: <1988379c-9adb-ec6a-64f6-3fd22df74a82@redhat.com> (raw)
In-Reply-To: <20220221142907.346035-2-stefanha@redhat.com>

On 2/21/22 15:29, Stefan Hajnoczi wrote:
> +#define QEMU_DEFINE_CO_TLS(type, var)                                        \
> +    static __thread type co_tls_##var;                                       \
> +    type get_##var(void) { asm volatile(""); return co_tls_##var; }          \
> +    void set_##var(type v) { asm volatile(""); co_tls_##var = v; }           \
> +    type *get_ptr_##var(void)                                                \
> +    { type *ptr = &co_tls_##var; asm volatile("" : "+rm" (ptr)); return ptr; }
> +

Is noinline needed here too in case LTO is used?

Paolo


  parent reply	other threads:[~2022-02-23 10:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21 14:29 [PATCH v4 0/4] tls: add macros for coroutine-safe TLS variables Stefan Hajnoczi
2022-02-21 14:29 ` [PATCH v4 1/4] " Stefan Hajnoczi
2022-02-21 15:16   ` Peter Maydell
2022-02-22 13:44     ` Stefan Hajnoczi
2022-02-23  9:47   ` Paolo Bonzini [this message]
2022-02-21 14:29 ` [PATCH v4 2/4] util/async: replace __thread with QEMU TLS macros Stefan Hajnoczi
2022-02-21 15:09   ` Philippe Mathieu-Daudé
2022-02-21 14:29 ` [PATCH v4 3/4] rcu: use coroutine " Stefan Hajnoczi
2022-02-21 14:29 ` [PATCH v4 4/4] cpus: use coroutine TLS macros for iothread_locked Stefan Hajnoczi
2022-02-21 15:07   ` Philippe Mathieu-Daudé
2022-02-21 15:09   ` Philippe Mathieu-Daudé
2022-02-22 13:25     ` Stefan Hajnoczi
2022-02-23  9:45   ` Paolo Bonzini
2022-02-23  9:48     ` Peter Maydell

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=1988379c-9adb-ec6a-64f6-3fd22df74a82@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=fam@euphon.net \
    --cc=fweimer@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=sguelton@redhat.com \
    --cc=stefanha@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).