diff options
Diffstat (limited to 'include/asm-x86/paravirt.h')
-rw-r--r-- | include/asm-x86/paravirt.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h index 33f72f8fe757..3286a0c63b42 100644 --- a/include/asm-x86/paravirt.h +++ b/include/asm-x86/paravirt.h | |||
@@ -1522,6 +1522,16 @@ static inline unsigned long __raw_local_irq_save(void) | |||
1522 | 1522 | ||
1523 | 1523 | ||
1524 | #else /* !CONFIG_X86_32 */ | 1524 | #else /* !CONFIG_X86_32 */ |
1525 | |||
1526 | /* | ||
1527 | * If swapgs is used while the userspace stack is still current, | ||
1528 | * there's no way to call a pvop. The PV replacement *must* be | ||
1529 | * inlined, or the swapgs instruction must be trapped and emulated. | ||
1530 | */ | ||
1531 | #define SWAPGS_UNSAFE_STACK \ | ||
1532 | PARA_SITE(PARA_PATCH(pv_cpu_ops, PV_CPU_swapgs), CLBR_NONE, \ | ||
1533 | swapgs) | ||
1534 | |||
1525 | #define SWAPGS \ | 1535 | #define SWAPGS \ |
1526 | PARA_SITE(PARA_PATCH(pv_cpu_ops, PV_CPU_swapgs), CLBR_NONE, \ | 1536 | PARA_SITE(PARA_PATCH(pv_cpu_ops, PV_CPU_swapgs), CLBR_NONE, \ |
1527 | PV_SAVE_REGS; \ | 1537 | PV_SAVE_REGS; \ |