diff options
author | Sean Christopherson <seanjc@google.com> | 2023-07-21 16:56:36 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-07-29 11:05:26 -0400 |
commit | c20d403fd04c20959b7e6669868372f433947e5f (patch) | |
tree | e4c0fc8d9a6024fc4b5cf2234a27e251674733e4 /arch/m68k/mm | |
parent | 5e1fe4a21c0c2a69419d97d62d3213e8f843920d (diff) | |
download | linux-c20d403fd04c20959b7e6669868372f433947e5f.tar.gz linux-c20d403fd04c20959b7e6669868372f433947e5f.tar.bz2 linux-c20d403fd04c20959b7e6669868372f433947e5f.zip |
KVM: VMX: Make VMREAD error path play nice with noinstr
Mark vmread_error_trampoline() as noinstr, and add a second trampoline
for the CONFIG_CC_HAS_ASM_GOTO_OUTPUT=n case to enable instrumentation
when handling VM-Fail on VMREAD. VMREAD is used in various noinstr
flows, e.g. immediately after VM-Exit, and objtool rightly complains that
the call to the error trampoline leaves a no-instrumentation section
without annotating that it's safe to do so.
vmlinux.o: warning: objtool: vmx_vcpu_enter_exit+0xc9:
call to vmread_error_trampoline() leaves .noinstr.text section
Note, strictly speaking, enabling instrumentation in the VM-Fail path
isn't exactly safe, but if VMREAD fails the kernel/system is likely hosed
anyways, and logging that there is a fatal error is more important than
*maybe* encountering slightly unsafe instrumentation.
Reported-by: Su Hui <suhui@nfschina.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230721235637.2345403-2-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/m68k/mm')
0 files changed, 0 insertions, 0 deletions