diff options
| -rw-r--r-- | arch/x86/kvm/svm/svm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index a28cd61d87ea..e454ae095cf7 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -3501,6 +3501,7 @@ int svm_invoke_exit_handler(struct kvm_vcpu *vcpu, u64 __exit_code) if (exit_code >= ARRAY_SIZE(svm_exit_handlers)) goto unexpected_vmexit; + exit_code = array_index_nospec(exit_code, ARRAY_SIZE(svm_exit_handlers)); if (!svm_exit_handlers[exit_code]) goto unexpected_vmexit; |
