From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table Date: Tue, 26 Nov 2013 18:29:17 +0200 Message-ID: <5294CC5D.7010706@cloudius-systems.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> <5294CC27.4090202@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Avi Kivity , "Huangweidong (C)" , KVM , "Michael S. Tsirkin" , "Jinxin (F)" , "Zhanghaoyu (A)" , Luonengjun , "qemu-devel@nongnu.org" , Zanghongyong To: Paolo Bonzini , Gleb Natapov Return-path: Received: from mail-bk0-f44.google.com ([209.85.214.44]:54343 "EHLO mail-bk0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757183Ab3KZQ3W (ORCPT ); Tue, 26 Nov 2013 11:29:22 -0500 Received: by mail-bk0-f44.google.com with SMTP id d7so2726584bkh.31 for ; Tue, 26 Nov 2013 08:29:21 -0800 (PST) In-Reply-To: <5294CC27.4090202@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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.