[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC v2 1/4] tls: add macros for coroutine-safe TLS variables
From: |
Florian Weimer |
Subject: |
Re: [RFC v2 1/4] tls: add macros for coroutine-safe TLS variables |
Date: |
Wed, 01 Dec 2021 19:24:33 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
* Stefan Hajnoczi:
> +#elif defined(__x86_64__)
> +#define QEMU_CO_TLS_ADDR(ret, var) \
> + asm volatile("rdfsbase %0\n\t" \
> + "lea "#var"@tpoff(%0), %0" : "=r"(ret))
> +#endif
RDFSBASE needs quite recent kernels. I think you should use
movq %%fs:0, %0
instead, which is equivalent for the x86-64 psABI.
Thanks,
Florian