Skip to content

Commit c940a3f

Browse files
Peter ZijlstraKAGA-KOKO
authored andcommitted
KVM: VMX: Make indirect call speculation safe
Replace indirect call with CALL_NOSPEC. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: David Woodhouse <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Ashok Raj <[email protected]> Cc: Greg KH <[email protected]> Cc: Jun Nakajima <[email protected]> Cc: David Woodhouse <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: [email protected] Cc: Dave Hansen <[email protected]> Cc: Asit Mallick <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Josh Poimboeuf <[email protected]> Cc: Jason Baron <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Dan Williams <[email protected]> Cc: Arjan Van De Ven <[email protected]> Cc: Tim Chen <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 1a29b5b commit c940a3f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/kvm/vmx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9064,14 +9064,14 @@ static void vmx_handle_external_intr(struct kvm_vcpu *vcpu)
90649064
#endif
90659065
"pushf\n\t"
90669066
__ASM_SIZE(push) " $%c[cs]\n\t"
9067-
"call *%[entry]\n\t"
9067+
CALL_NOSPEC
90689068
:
90699069
#ifdef CONFIG_X86_64
90709070
[sp]"=&r"(tmp),
90719071
#endif
90729072
ASM_CALL_CONSTRAINT
90739073
:
9074-
[entry]"r"(entry),
9074+
THUNK_TARGET(entry),
90759075
[ss]"i"(__KERNEL_DS),
90769076
[cs]"i"(__KERNEL_CS)
90779077
);

0 commit comments

Comments
 (0)