diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2020-04-27 17:55:59 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-05-13 18:14:59 +0200 |
commit | fede8076aab4c2280c673492f8f7a2e87712e8b4 (patch) | |
tree | 80aa65506194955f2383505a809dab91e83766c0 /arch/x86/kvm/svm | |
parent | kvm/eventfd: remove unneeded conversion to bool (diff) | |
download | linux-fede8076aab4c2280c673492f8f7a2e87712e8b4.tar.xz linux-fede8076aab4c2280c673492f8f7a2e87712e8b4.zip |
KVM: x86: handle wrap around 32-bit address space
KVM is not handling the case where EIP wraps around the 32-bit address
space (that is, outside long mode). This is needed both in vmx.c
and in emulate.c. SVM with NRIPS is okay, but it can still print
an error to dmesg due to integer overflow.
Reported-by: Nick Peterson <everdox@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm')
-rw-r--r-- | arch/x86/kvm/svm/svm.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index 45c6e4b87eee..83175933c0a1 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -319,9 +319,6 @@ static int skip_emulated_instruction(struct kvm_vcpu *vcpu) if (!kvm_emulate_instruction(vcpu, EMULTYPE_SKIP)) return 0; } else { - if (svm->next_rip - kvm_rip_read(vcpu) > MAX_INST_SIZE) - pr_err("%s: ip 0x%lx next 0x%llx\n", - __func__, kvm_rip_read(vcpu), svm->next_rip); kvm_rip_write(vcpu, svm->next_rip); } svm_set_interrupt_shadow(vcpu, 0); |