From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: KVM: x86: use smp_send_reschedule in kvm_vcpu_kick Date: Mon, 09 Mar 2009 12:17:26 +0200 Message-ID: <49B4ECB6.8060505@redhat.com> References: <20090303001405.GA5889@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Gleb Natapov , Ingo Molnar , Peter Zijlstra To: Marcelo Tosatti Return-path: Received: from mx2.redhat.com ([66.187.237.31]:51386 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752747AbZCIKRp (ORCPT ); Mon, 9 Mar 2009 06:17:45 -0400 In-Reply-To: <20090303001405.GA5889@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: Marcelo Tosatti wrote: > KVM uses a function call IPI to cause the exit of a guest running on a > physical cpu. For virtual interrupt notification there is no need to > wait on IPI receival, or to execute any function. > > This is exactly what the reschedule IPI does, without the overhead > of function IPI. So use it instead of smp_call_function_single in > kvm_vcpu_kick. > > Also change the "guest_mode" variable to a bit in vcpu->requests, and > use that to collapse multiple IPI's that would be issued between the > first one and zeroing of guest mode. > > This allows kvm_vcpu_kick to called from interrupt context. > Looks good. The only worry I have is that we depend on smp_reschedule_interrupt() being a no-op. I guess that's a reasonable assumption though. -- error compiling committee.c: too many arguments to function