diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2021-10-20 06:38:05 -0400 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-12-08 04:24:44 -0500 |
| commit | aefdc2ed445eb470bdba108bd6a19fb232d3bada (patch) | |
| tree | e43dae70e1e18b3d19304fe2c8c88959f16d22d9 /include | |
| parent | fb43496c8362b8b379b4348b581f8f88f47cd1f8 (diff) | |
KVM: Avoid atomic operations when kicking the running vCPU
If we do have the vcpu mutex, as is the case if kvm_running_vcpu is set
to the target vcpu of the kick, changes to vcpu->mode do not need atomic
operations; cmpxchg is only needed _outside_ the mutex to ensure that
the IN_GUEST_MODE->EXITING_GUEST_MODE change does not race with the vcpu
thread going OUTSIDE_GUEST_MODE.
Use this to optimize the case of a vCPU sending an interrupt to itself.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
