From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Su3tq-0002aK-Ay for qemu-devel@nongnu.org; Wed, 25 Jul 2012 11:53:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Su3tm-0007ay-4r for qemu-devel@nongnu.org; Wed, 25 Jul 2012 11:53:22 -0400 Received: from david.siemens.de ([192.35.17.14]:30293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Su3tl-0007am-Qh for qemu-devel@nongnu.org; Wed, 25 Jul 2012 11:53:18 -0400 Message-ID: <5010166A.5070201@siemens.com> Date: Wed, 25 Jul 2012 17:53:14 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1343222672-25312-1-git-send-email-peter.maydell@linaro.org> <1343222672-25312-3-git-send-email-peter.maydell@linaro.org> <50101519.4020108@redhat.com> In-Reply-To: <50101519.4020108@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/6] kvm: Rename kvm_irqchip_set_irq to kvm_inject_async_irq List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Peter Maydell , Alexander Graf , Marcelo Tosatti , qemu-devel@nongnu.org, patches@linaro.org On 2012-07-25 17:47, Avi Kivity wrote: > On 07/25/2012 04:24 PM, Peter Maydell wrote: >> Rename the function kvm_irqchip_set_irq() to kvm_inject_async_irq(), >> since it can be used for asynchronous interrupt injection whether >> there is a full irqchip model in the kernel or not. >> > >> @@ -144,7 +144,7 @@ int kvm_arch_on_sigbus(int code, void *addr); >> >> void kvm_arch_init_irq_routing(KVMState *s); >> >> -int kvm_irqchip_set_irq(KVMState *s, int irq, int level); >> +int kvm_inject_async_irq(KVMState *s, int irq, int level); >> int kvm_irqchip_send_msi(KVMState *s, MSIMessage msg); >> > > "interrupt injection" refers to the act of setting up an interrupt to be > delivered to the guest at the next entry, so it is synchronous by > nature. It was sloppy of me to use the term, but let's not introduce it > to the code as well. > > The correct terminology would be: > interrupt injection: synchronous, in-vcpu, after all masks have been > evaluated. Straight into the vein. > interrupt queueing: asynchronous, extra-vcpu, before any masks > > Since interrupt queueing (well that name isn't perfect for level > triggered interrupts, since it may not queue anything...) is the norm, I > think it's better to keep the set_irq() naming and mark the synchronous > interrupt injection function as special. We don't have a synchronous function anymore, it's part of the pre-run code of x86 IIRC. Jan -- Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux