From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [RFC][PATCH 23/45] qemu-kvm: Rework MSI-X mask notifier to generic MSI config notifiers Date: Mon, 17 Oct 2011 13:45:04 +0200 Message-ID: <4E9C1540.5080607@siemens.com> References: <069dc7131dfb32467e04aad52c634f1ad2c16d06.1318843693.git.jan.kiszka@siemens.com> <20111017114055.GD4537@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Marcelo Tosatti , "kvm@vger.kernel.org" , Alex Williamson , "qemu-devel@nongnu.org" To: "Michael S. Tsirkin" Return-path: Received: from goliath.siemens.de ([192.35.17.28]:21922 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750850Ab1JQLpL (ORCPT ); Mon, 17 Oct 2011 07:45:11 -0400 In-Reply-To: <20111017114055.GD4537@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 2011-10-17 13:40, Michael S. Tsirkin wrote: > On Mon, Oct 17, 2011 at 11:27:57AM +0200, Jan Kiszka wrote: >> MSI config notifiers are supposed to be triggered on every relevant >> configuration change of MSI vectors or if MSI is enabled/disabled. >> >> Two notifiers are established, one for vector changes and one for general >> enabling. The former notifier additionally passes the currently active >> MSI message. >> This will allow to update potential in-kernel IRQ routes on >> changes. The latter notifier is optional and will only be used by a >> subset of clients. >> >> These notifiers are currently only available for MSI-X but will be >> extended to legacy MSI as well. >> >> Signed-off-by: Jan Kiszka > > Passing message, always, does not seem to make sense: message is only > valid if it is unmasked. If we go from unmasked to masked, the consumer could just ignore the message. > Further, IIRC the spec requires any changes to be done while > message is masked. So mask notifier makes more sense to me: > it does the same thing using one notifier that you do > using two notifiers. That's in fact a possible optimization (only invoke the callback on mask transitions). Not sure if that applies to MSI as well, probably not. To have common types, I would prefer to stay with vector config notifiers as name then. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux