Skip to content

Commit

Permalink
KVM: SVM: remove INIT intercept handler
Browse files Browse the repository at this point in the history
commit 896707c upstream.

Kernel never sends real INIT even to CPUs, other than on boot.

Thus INIT interception is an error which should be caught
by a check for an unknown VMexit reason.

On top of that, the current INIT VM exit handler skips
the current instruction which is wrong.
That was added in commit 5ff3a35 ("KVM: x86: Move trivial
instruction-based exit handlers to common code").

Fixes: 5ff3a35 ("KVM: x86: Move trivial instruction-based exit handlers to common code")
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20210707125100.677203-3-mlevitsk@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Maxim Levitsky authored and gregkh committed Jul 20, 2021
1 parent bbca8ad commit aa25872
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion arch/x86/kvm/svm/svm.c
Expand Up @@ -3069,7 +3069,6 @@ static int (*const svm_exit_handlers[])(struct kvm_vcpu *vcpu) = {
[SVM_EXIT_INTR] = intr_interception,
[SVM_EXIT_NMI] = nmi_interception,
[SVM_EXIT_SMI] = smi_interception,
[SVM_EXIT_INIT] = kvm_emulate_as_nop,
[SVM_EXIT_VINTR] = interrupt_window_interception,
[SVM_EXIT_RDPMC] = kvm_emulate_rdpmc,
[SVM_EXIT_CPUID] = kvm_emulate_cpuid,
Expand Down

0 comments on commit aa25872

Please sign in to comment.