]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
x86/sev: Fix nonistr violation
authorPeter Zijlstra <peterz@infradead.org>
Wed, 6 Jan 2021 14:36:21 +0000 (15:36 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 12 Jan 2021 20:10:58 +0000 (21:10 +0100)
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: 4ca68e023b11 ("x86/sev-es: Handle NMI State")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20210106144017.532902065@infradead.org
arch/x86/kernel/sev-es.c

index ab31c34ba508c9186b8acbcd1521c9f7133e8006..84c1821819afb8fb3da3b09b8d429930bd1d4da3 100644 (file)
@@ -225,7 +225,7 @@ static inline u64 sev_es_rd_ghcb_msr(void)
        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;