kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] No need to kick cpu if not in a guest mode.
@ 2009-07-07 12:27 Gleb Natapov
  2009-07-07 14:56 ` Marcelo Tosatti
  2009-07-07 15:39 ` Avi Kivity
  0 siblings, 2 replies; 3+ messages in thread
From: Gleb Natapov @ 2009-07-07 12:27 UTC (permalink / raw)
  To: avi; +Cc: mtosatti, kvm

This will save a couple of IPIs.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index efb0b68..1e30400 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3498,6 +3498,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;
--
			Gleb.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] No need to kick cpu if not in a guest mode.
  2009-07-07 12:27 [PATCH] No need to kick cpu if not in a guest mode Gleb Natapov
@ 2009-07-07 14:56 ` Marcelo Tosatti
  2009-07-07 15:39 ` Avi Kivity
  1 sibling, 0 replies; 3+ messages in thread
From: Marcelo Tosatti @ 2009-07-07 14:56 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: avi, kvm

ACK

On Tue, Jul 07, 2009 at 03:27:32PM +0300, Gleb Natapov wrote:
> This will save a couple of IPIs.
> 
> Signed-off-by: Gleb Natapov <gleb@redhat.com>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index efb0b68..1e30400 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -3498,6 +3498,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;
> --
> 			Gleb.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] No need to kick cpu if not in a guest mode.
  2009-07-07 12:27 [PATCH] No need to kick cpu if not in a guest mode Gleb Natapov
  2009-07-07 14:56 ` Marcelo Tosatti
@ 2009-07-07 15:39 ` Avi Kivity
  1 sibling, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2009-07-07 15:39 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: mtosatti, kvm

On 07/07/2009 03:27 PM, Gleb Natapov wrote:
> This will save a couple of IPIs.
>
>    

Applied, thanks.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-07-07 15:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-07 12:27 [PATCH] No need to kick cpu if not in a guest mode Gleb Natapov
2009-07-07 14:56 ` Marcelo Tosatti
2009-07-07 15:39 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).