From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCHv3 RFC 1/2] kvm: implement kvm_set_msi_inatomic Date: Thu, 14 Jun 2012 10:00:07 +0300 Message-ID: <20120614070007.GA6533@redhat.com> References: <20120613130124.GU580@redhat.com> <20120613155950.GB21603@redhat.com> <20120613160101.GC19440@redhat.com> <20120613161226.GA21821@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, Jan Kiszka To: "Michael S. Tsirkin" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:51365 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751849Ab2FNHAR (ORCPT ); Thu, 14 Jun 2012 03:00:17 -0400 Content-Disposition: inline In-Reply-To: <20120613161226.GA21821@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Jun 13, 2012 at 07:12:26PM +0300, Michael S. Tsirkin wrote: > > > > > @@ -134,10 +141,30 @@ int kvm_set_msi(struct kvm_kernel_irq_routing_entry *e, > > > > > irq.level = 1; > > > > > irq.shorthand = 0; > > > > > > > > > > + /* Multicast MSI doesn't really block but might take a long time. */ > > > > > + if (unlikely(noblock && kvm_msi_is_multicast(irq.dest_id, > > > > > + irq.delivery_mode))) > > > > delivery_mode? Should be dest_mode. > > Yes. Good catch, thanks. > > > But you probably need to check that > > > > delivery_mode is not ExtINT either. > > It does not look like anything happens with ExtInt > if you try to trigger it from MSI. > Currently no, but it should appear as if interrupt comes from PIC. I wouldn't allow anything but fixed mode here just to be on a safe side. Lowest prio will have to loop even after introducing irq cache. -- Gleb.