]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: SVM: fix task switch emulation on INTn instruction.
authorMaxim Levitsky <mlevitsk@redhat.com>
Thu, 14 Jul 2022 12:44:53 +0000 (15:44 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 14 Jul 2022 15:32:00 +0000 (11:32 -0400)
commitab5f3299adda51db9c30f594ac3a4beb5aab1283
tree6e1c26ec92436b08b839eb6ea7214b8426eb3821
parentb2074f2069e390657decc41ef2d055404c824833
KVM: SVM: fix task switch emulation on INTn instruction.

Recently KVM's SVM code switched to re-injecting software interrupt events,
if something prevented their delivery.

Task switch due to task gate in the IDT, however is an exception
to this rule, because in this case, INTn instruction causes
a task switch intercept and its emulation completes the INTn
emulation as well.

Add a missing case to task_switch_interception for that.

This fixes 32 bit kvm unit test taskswitch2.

Fixes: 8d1cd5e00a27d2 ("KVM: SVM: Re-inject INTn instead of retrying the insn on "failure"")
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Message-Id: <20220714124453.188655-1-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/svm.c