mirror of
https://github.com/torvalds/linux.git
synced 2024-11-07 12:41:55 +00:00
KVM: No need to kick cpu if not in a guest mode
This will save a couple of IPIs. Signed-off-by: Gleb Natapov <gleb@redhat.com> Acked-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
1000ff8d89
commit
c7f0f24b1f
@ -3506,6 +3506,7 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
|
||||
smp_mb__after_clear_bit();
|
||||
|
||||
if (vcpu->requests || need_resched() || signal_pending(current)) {
|
||||
set_bit(KVM_REQ_KICK, &vcpu->requests);
|
||||
local_irq_enable();
|
||||
preempt_enable();
|
||||
r = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user