From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43239) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlLW1-00041E-4F for qemu-devel@nongnu.org; Tue, 26 Nov 2013 11:29:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlLVt-0004de-RK for qemu-devel@nongnu.org; Tue, 26 Nov 2013 11:29:33 -0500 Received: from mail-bk0-f43.google.com ([209.85.214.43]:49484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlLVq-0004cL-Ea for qemu-devel@nongnu.org; Tue, 26 Nov 2013 11:29:25 -0500 Received: by mail-bk0-f43.google.com with SMTP id mz12so2701966bkb.16 for ; Tue, 26 Nov 2013 08:29:21 -0800 (PST) Message-ID: <5294CC5D.7010706@cloudius-systems.com> Date: Tue, 26 Nov 2013 18:29:17 +0200 From: Avi Kivity MIME-Version: 1.0 References: <52949847.6020908@redhat.com> <5294A68F.6060301@redhat.com> <5294B461.5000405@redhat.com> <5294B634.4050801@cloudius-systems.com> <20131126150357.GA20352@redhat.com> <5294BC3B.6070902@redhat.com> <20131126162414.GC20352@redhat.com> <5294CC27.4090202@redhat.com> In-Reply-To: <5294CC27.4090202@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Gleb Natapov Cc: "Huangweidong (C)" , KVM , "Michael S. Tsirkin" , "Zhanghaoyu (A)" , Luonengjun , "qemu-devel@nongnu.org" , Zanghongyong , Avi Kivity , "Jinxin (F)" On 11/26/2013 06:28 PM, Paolo Bonzini wrote: > Il 26/11/2013 17:24, Gleb Natapov ha scritto: >>> VCPU writes to routing table >>> e = entry from IRQ routing table >>> kvm_irq_routing_update(kvm, new); >>> VCPU resumes execution >>> kvm_set_msi_irq(e, &irq); >>> kvm_irq_delivery_to_apic_fast(); >>> >>> where the entry is stale but the VCPU has already resumed execution. >> So how is it different from what we have now: >> >> disable_irq() >> VCPU writes to routing table >> e = entry from IRQ routing table >> kvm_set_msi_irq(e, &irq); >> kvm_irq_delivery_to_apic_fast(); >> kvm_irq_routing_update(kvm, new); >> synchronize_rcu() >> VCPU resumes execution >> enable_irq() >> receive stale irq > Adding a "disable/enable IRQs" looks like a relatively big change. But > perhaps it's not for some reason I'm missing. > Those are guest operations, which may not be there at all.