Commit 18869f2
KVM: x86: disable preemption around the call to kvm_arch_vcpu_{un|}blocking
On SVM, if preemption happens right after the call to finish_rcuwait
but before call to kvm_arch_vcpu_unblocking on SVM/AVIC, it itself
will re-enable AVIC, and then we will try to re-enable it again
in kvm_arch_vcpu_unblocking which will lead to a warning
in __avic_vcpu_load.
The same problem can happen if the vCPU is preempted right after the call
to kvm_arch_vcpu_blocking but before the call to prepare_to_rcuwait
and in this case, we will end up with AVIC enabled during sleep -
Ooops.
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20220606180829.102503-7-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent 66c768d commit 18869f2
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3328 | 3328 | | |
3329 | 3329 | | |
3330 | 3330 | | |
| 3331 | + | |
3331 | 3332 | | |
3332 | | - | |
3333 | 3333 | | |
| 3334 | + | |
| 3335 | + | |
3334 | 3336 | | |
3335 | 3337 | | |
3336 | 3338 | | |
| |||
3340 | 3342 | | |
3341 | 3343 | | |
3342 | 3344 | | |
3343 | | - | |
3344 | 3345 | | |
| 3346 | + | |
| 3347 | + | |
3345 | 3348 | | |
| 3349 | + | |
3346 | 3350 | | |
3347 | 3351 | | |
3348 | 3352 | | |
| |||
0 commit comments