Commit 2bcbd406 authored by Sean Christopherson's avatar Sean Christopherson Committed by Paolo Bonzini
Browse files

Revert "compiler-gcc: disable -ftracer for __noclone functions"

The -ftracer optimization was disabled in __noclone as a workaround to
GCC duplicating a blob of inline assembly that happened to define a
global variable.  It has been pointed out that no amount of workarounds
can guarantee the compiler won't duplicate inline assembly[1], and that
disabling the -ftracer optimization has several unintended and nasty
side effects[2][3].

Now that the offending KVM code which required the workaround has
been properly fixed and no longer uses __noclone, remove the -ftracer
optimization tweak from __noclone.


This reverts commit 95272c29


Suggested-by: default avatarAndi Kleen <>
Cc: Paolo Bonzini <>
Cc: Nadav Amit <>
Cc: Andi Kleen <>
Cc: Josh Poimboeuf <>
Cc: Martin Jambor <>
Cc: Arnd Bergmann <>
Cc: Steven Rostedt <>
Cc: Miroslav Benes <>
Signed-off-by: default avatarSean Christopherson <>
Reviewed-by: default avatarAndi Kleen <>
Reviewed-by: default avatarMiguel Ojeda <>
Signed-off-by: default avatarPaolo Bonzini <>
parent 453eafbe
......@@ -37,7 +37,6 @@
# define __GCC4_has_attribute___designated_init__ 0
# define __GCC4_has_attribute___externally_visible__ 1
# define __GCC4_has_attribute___noclone__ 1
# define __GCC4_has_attribute___optimize__ 1
# define __GCC4_has_attribute___nonstring__ 0
# define __GCC4_has_attribute___no_sanitize_address__ (__GNUC_MINOR__ >= 8)
......@@ -163,17 +162,11 @@
* Optional: not supported by clang
* Note: icc does not recognize gcc's no-tracer
* gcc:
* gcc:
#if __has_attribute(__noclone__)
# if __has_attribute(__optimize__)
# define __noclone __attribute__((__noclone__, __optimize__("no-tracer")))
# else
# define __noclone __attribute__((__noclone__))
# endif
# define __noclone __attribute__((__noclone__))
# define __noclone
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment