KVM: SVM: Force sev_es_host_save_area() to be inlined (for noinstr usage)
authorSean Christopherson <seanjc@google.com>
Mon, 17 Jun 2024 21:04:30 +0000 (14:04 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 28 Jun 2024 15:53:00 +0000 (08:53 -0700)
commit34830b3c02aec1fe6eaac7b178a05c25620a25b0
treedd9360e3fb0af05f42f37fef8055724fa2e88ad5
parent99a49093ce92d6116a1635802f9c16d0db6e805a
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: c92be2fd8edf ("KVM: SVM: Save/restore non-volatile GPRs in SEV-ES VMRUN via host save area")
Reported-by: Borislav Petkov <bp@alien8.de>
Tested-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20240617210432.1642542-2-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/svm.c