From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlLVC-00033R-Oi for qemu-devel@nongnu.org; Tue, 26 Nov 2013 11:28:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlLV6-0004Bz-JL for qemu-devel@nongnu.org; Tue, 26 Nov 2013 11:28:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:64995) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlLV6-0004B9-Al for qemu-devel@nongnu.org; Tue, 26 Nov 2013 11:28:36 -0500 Message-ID: <5294CC27.4090202@redhat.com> Date: Tue, 26 Nov 2013 17:28:23 +0100 From: Paolo Bonzini 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> In-Reply-To: <20131126162414.GC20352@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 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: Gleb Natapov Cc: Avi Kivity , "Huangweidong (C)" , KVM , "Michael S. Tsirkin" , "Zhanghaoyu (A)" , Luonengjun , "qemu-devel@nongnu.org" , Zanghongyong , Avi Kivity , "Jinxin (F)" 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. Paolo