From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56847) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vly86-0002Qs-1M for qemu-devel@nongnu.org; Thu, 28 Nov 2013 04:43:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vly7y-00066C-O9 for qemu-devel@nongnu.org; Thu, 28 Nov 2013 04:43:25 -0500 Received: from mail-wg0-f45.google.com ([74.125.82.45]:46634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vly7y-000666-Hf for qemu-devel@nongnu.org; Thu, 28 Nov 2013 04:43:18 -0500 Received: by mail-wg0-f45.google.com with SMTP id y10so6194933wgg.24 for ; Thu, 28 Nov 2013 01:43:17 -0800 (PST) Date: Thu, 28 Nov 2013 11:43:14 +0200 From: Gleb Natapov Message-ID: <20131128094313.GA5822@minantech.com> References: <5294A68F.6060301@redhat.com> <5294B461.5000405@redhat.com> <5294B634.4050801@cloudius-systems.com> <20131126150357.GA20352@redhat.com> <5294BC3B.6070902@redhat.com> <5297050E.6000700@redhat.com> <20131128091903.GA4609@kernel.org> <52970D00.9060109@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52970D00.9060109@redhat.com> 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 Cc: Avi Kivity , "Huangweidong (C)" , KVM , "Michael S. Tsirkin" , "Zhanghaoyu (A)" , Luonengjun , "qemu-devel@nongnu.org" , Zanghongyong , Avi Kivity , "Jinxin (F)" On Thu, Nov 28, 2013 at 10:29:36AM +0100, Paolo Bonzini wrote: > Il 28/11/2013 10:19, Gleb Natapov ha scritto: > > Not changing current behaviour is certainly safer, but I am still not 100% > > convinced we have to ensure this. > > > > Suppose guest does: > > > > 1: change msi interrupt by writing to pci register > > 2: read the pci register to flush the write > > 3: zero idt > > > > I am pretty certain that this code can get interrupt after step 2 on real HW, > > but I cannot tell if guest can rely on it to be delivered exactly after > > read instruction or it can be delayed by couple of instructions. > > I agree it's fragile, but if a dedicated SRCU can meet the requirements > (possibly with synchronize_srcu_expedited), I prefer not to break it. > Definitely. If we can find reasonable solution that preserves current semantics it's preferable path to take. -- Gleb.