• B
    x86/entry/64/paravirt: Use paravirt-safe macro to access eflags · e17f8234
    Boris Ostrovsky 提交于
    Commit 1d3e53e8 ("x86/entry/64: Refactor IRQ stacks and make them
    NMI-safe") added DEBUG_ENTRY_ASSERT_IRQS_OFF macro that acceses eflags
    using 'pushfq' instruction when testing for IF bit. On PV Xen guests
    looking at IF flag directly will always see it set, resulting in 'ud2'.
    
    Introduce SAVE_FLAGS() macro that will use appropriate save_fl pv op when
    running paravirt.
    Signed-off-by: NBoris Ostrovsky <boris.ostrovsky@oracle.com>
    Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
    Reviewed-by: NJuergen Gross <jgross@suse.com>
    Cc: Andy Lutomirski <luto@kernel.org>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Borislav Petkov <bpetkov@suse.de>
    Cc: Brian Gerst <brgerst@gmail.com>
    Cc: Dave Hansen <dave.hansen@intel.com>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: David Laight <David.Laight@aculab.com>
    Cc: Denys Vlasenko <dvlasenk@redhat.com>
    Cc: Eduardo Valentin <eduval@amazon.com>
    Cc: Greg KH <gregkh@linuxfoundation.org>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Josh Poimboeuf <jpoimboe@redhat.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Rik van Riel <riel@redhat.com>
    Cc: Will Deacon <will.deacon@arm.com>
    Cc: aliguori@amazon.com
    Cc: daniel.gruss@iaik.tugraz.at
    Cc: hughd@google.com
    Cc: keescook@google.com
    Cc: xen-devel@lists.xenproject.org
    Link: https://lkml.kernel.org/r/20171204150604.899457242@linutronix.deSigned-off-by: NIngo Molnar <mingo@kernel.org>
    e17f8234
irqflags.h 4.1 KB