Skip to content

Commit 34830b3

Browse files
committed
KVM: SVM: Force sev_es_host_save_area() to be inlined (for noinstr usage)
Force sev_es_host_save_area() to be always inlined, as it's used in the low level VM-Enter/VM-Exit path, which is non-instrumentable. vmlinux.o: warning: objtool: svm_vcpu_enter_exit+0xb0: call to sev_es_host_save_area() leaves .noinstr.text section vmlinux.o: warning: objtool: svm_vcpu_enter_exit+0xbf: call to sev_es_host_save_area.isra.0() leaves .noinstr.text section Fixes: c92be2f ("KVM: SVM: Save/restore non-volatile GPRs in SEV-ES VMRUN via host save area") Reported-by: Borislav Petkov <[email protected]> Tested-by: Borislav Petkov (AMD) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent 99a4909 commit 34830b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kvm/svm/svm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,7 @@ static void svm_vcpu_free(struct kvm_vcpu *vcpu)
14951495
__free_pages(virt_to_page(svm->msrpm), get_order(MSRPM_SIZE));
14961496
}
14971497

1498-
static struct sev_es_save_area *sev_es_host_save_area(struct svm_cpu_data *sd)
1498+
static __always_inline struct sev_es_save_area *sev_es_host_save_area(struct svm_cpu_data *sd)
14991499
{
15001500
return page_address(sd->save_area) + 0x400;
15011501
}

0 commit comments

Comments
 (0)