Skip to content
  • Thomas Gleixner's avatar
    x86/paravirt: Replace the paravirt patch asm magic · 0b9d2fc1
    Thomas Gleixner authored
    
    
    The magic macro DEF_NATIVE() in the paravirt patching code uses inline
    assembly to generate a data table for patching in the native instructions.
    
    While clever this is falling apart with LTO and even aside of LTO the
    construct is just working by chance according to GCC folks.
    
    Aside of that the tables are constant data and not some form of magic
    text.
    
    As these constructs are not subject to frequent changes it is not a
    maintenance issue to convert them to regular data tables which are
    initialized with hex bytes.
    
    Create a new set of macros and data structures to store the instruction
    sequences and convert the code over.
    
    Reported-by: default avatarAndi Kleen <ak@linux.intel.com>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Brian Gerst <brgerst@gmail.com>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: Denys Vlasenko <dvlasenk@redhat.com>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Juergen Gross <jgross@suse.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Rik van Riel <riel@surriel.com>
    Link: http://lkml.kernel.org/r/20190424134223.690835713@linutronix.de
    
    
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    0b9d2fc1