aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/svm.h
diff options
context:
space:
mode:
authorGravatar Borislav Petkov <bp@suse.de> 2022-03-23 21:52:44 +0100
committerGravatar Borislav Petkov <bp@suse.de> 2022-04-04 10:13:20 +0200
commit6b91ec4ad290a808a894e7d3448eb82d0b8ef8d5 (patch)
treeca1fbc3c06b07dab37e1446a2739c5347bf85af0 /arch/x86/include/asm/svm.h
parenttask_stack, x86/cea: Force-inline stack helpers (diff)
downloadlinux-6b91ec4ad290a808a894e7d3448eb82d0b8ef8d5.tar.gz
linux-6b91ec4ad290a808a894e7d3448eb82d0b8ef8d5.tar.bz2
linux-6b91ec4ad290a808a894e7d3448eb82d0b8ef8d5.zip
x86/kvm/svm: Force-inline GHCB accessors
In order to fix: vmlinux.o: warning: objtool: __sev_es_nmi_complete()+0x4c: call to ghcb_set_sw_exit_code() leaves .noinstr.text section Signed-off-by: Borislav Petkov <bp@suse.de> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20220324183607.31717-3-bp@alien8.de
Diffstat (limited to 'arch/x86/include/asm/svm.h')
-rw-r--r--arch/x86/include/asm/svm.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h
index f70a5108d464..e255039b36b6 100644
--- a/arch/x86/include/asm/svm.h
+++ b/arch/x86/include/asm/svm.h
@@ -444,23 +444,23 @@ struct vmcb {
(offsetof(struct vmcb_save_area, field) / sizeof(u64))
#define DEFINE_GHCB_ACCESSORS(field) \
- static inline bool ghcb_##field##_is_valid(const struct ghcb *ghcb) \
+ static __always_inline bool ghcb_##field##_is_valid(const struct ghcb *ghcb) \
{ \
return test_bit(GHCB_BITMAP_IDX(field), \
(unsigned long *)&ghcb->save.valid_bitmap); \
} \
\
- static inline u64 ghcb_get_##field(struct ghcb *ghcb) \
+ static __always_inline u64 ghcb_get_##field(struct ghcb *ghcb) \
{ \
return ghcb->save.field; \
} \
\
- static inline u64 ghcb_get_##field##_if_valid(struct ghcb *ghcb) \
+ static __always_inline u64 ghcb_get_##field##_if_valid(struct ghcb *ghcb) \
{ \
return ghcb_##field##_is_valid(ghcb) ? ghcb->save.field : 0; \
} \
\
- static inline void ghcb_set_##field(struct ghcb *ghcb, u64 value) \
+ static __always_inline void ghcb_set_##field(struct ghcb *ghcb, u64 value) \
{ \
__set_bit(GHCB_BITMAP_IDX(field), \
(unsigned long *)&ghcb->save.valid_bitmap); \