From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table Date: Tue, 26 Nov 2013 17:28:23 +0100 Message-ID: <5294CC27.4090202@redhat.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Avi Kivity , "Huangweidong (C)" , KVM , "Michael S. Tsirkin" , "Jinxin (F)" , "Zhanghaoyu (A)" , Luonengjun , "qemu-devel@nongnu.org" , Zanghongyong To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:36232 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757183Ab3KZQ2g (ORCPT ); Tue, 26 Nov 2013 11:28:36 -0500 In-Reply-To: <20131126162414.GC20352@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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