From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [RFC][PATCH] KVM: Introduce direct MSI message injection for in-kernel irqchips Date: Mon, 24 Oct 2011 19:23:12 +0200 Message-ID: <20111024172311.GC30385@redhat.com> References: <4EA54759.902@redhat.com> <4EA554B0.7030808@siemens.com> <20111024124355.GA28822@redhat.com> <4EA563FD.5060308@siemens.com> <4EA56B99.2030201@siemens.com> <20111024144039.GB29886@redhat.com> <4EA57D8B.7020905@siemens.com> <20111024160526.GA30385@redhat.com> <4EA58DF4.2050100@siemens.com> <20111024170508.GB30385@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , Marcelo Tosatti , kvm To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:34427 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755823Ab1JXRWJ (ORCPT ); Mon, 24 Oct 2011 13:22:09 -0400 Content-Disposition: inline In-Reply-To: <20111024170508.GB30385@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Oct 24, 2011 at 07:05:08PM +0200, Michael S. Tsirkin wrote: > On Mon, Oct 24, 2011 at 06:10:28PM +0200, Jan Kiszka wrote: > > On 2011-10-24 18:05, Michael S. Tsirkin wrote: > > >> This is what I have in mind: > > >> - devices set PBA bit if MSI message cannot be sent due to mask (*) > > >> - core checks&clears PBA bit on unmask, injects message if bit was set > > >> - devices clear PBA bit if message reason is resolved before unmask (*) > > > > > > OK, but practically, when exactly does the device clear PBA? > > > > Consider a network adapter that signals messages in a RX ring: If the > > corresponding vector is masked while the guest empties the ring, I > > strongly assume that the device is supposed to take back the pending bit > > in that case so that there is no interrupt inject on a later vector > > unmask operation. > > > > Jan > > Do you mean virtio here? Do you expect this optimization to give > a significant performance gain? It would also be challenging to implement this in a race free manner. Clearing on interrupt status read seems straight-forward. > > -- > > Siemens AG, Corporate Technology, CT T DE IT 1 > > Corporate Competence Center Embedded Linux