]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: Stuff next_rip on emulated INT3 injection if NRIPS is supported
authorSean Christopherson <seanjc@google.com>
Sun, 1 May 2022 22:07:28 +0000 (00:07 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Jun 2022 08:46:48 +0000 (04:46 -0400)
commit1164e667cfe2c6cbccd04a5b05be9a03c4f1dc2c
tree4c05473b5fc2ed3f3fb5576cf7814d61ee2b2156
parent84654a9e8e2d3441e7f1d1499f5fdfbde07e0d5d
KVM: SVM: Stuff next_rip on emulated INT3 injection if NRIPS is supported

If NRIPS is supported in hardware but disabled in KVM, set next_rip to
the next RIP when advancing RIP as part of emulating INT3 injection.
There is no flag to tell the CPU that KVM isn't using next_rip, and so
leaving next_rip is left as is will result in the CPU pushing garbage
onto the stack when vectoring the injected event.

Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Fixes: 397076fd8c2e ("KVM: SVM: Emulate nRIP feature when reinjecting INT3")
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Message-Id: <cd328309a3b88604daa2359ad56f36cb565ce2d4.1651440202.git.maciej.szmigiero@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/svm.c