提交 dea93e42 编写于 作者: P Peter Zijlstra 提交者: Zheng Zengkai

x86/sev: Fix nonistr violation

stable inclusion
from stable-5.10.11
commit f5bbf7f47570eed9deb515752193d73d7f622ddf
bugzilla: 47621

--------------------------------

commit a1d5c98a upstream.

When the compiler fails to inline, it violates nonisntr:

  vmlinux.o: warning: objtool: __sev_es_nmi_complete()+0xc7: call to sev_es_wr_ghcb_msr() leaves .noinstr.text section

Fixes: 4ca68e02 ("x86/sev-es: Handle NMI State")
Reported-by: NRandy Dunlap <rdunlap@infradead.org>
Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20210106144017.532902065@infradead.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 5a060891
...@@ -225,7 +225,7 @@ static inline u64 sev_es_rd_ghcb_msr(void) ...@@ -225,7 +225,7 @@ static inline u64 sev_es_rd_ghcb_msr(void)
return __rdmsr(MSR_AMD64_SEV_ES_GHCB); return __rdmsr(MSR_AMD64_SEV_ES_GHCB);
} }
static inline void sev_es_wr_ghcb_msr(u64 val) static __always_inline void sev_es_wr_ghcb_msr(u64 val)
{ {
u32 low, high; u32 low, high;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册