From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RG8wk-0003Aw-9P for qemu-devel@nongnu.org; Tue, 18 Oct 2011 08:39:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RG8we-0005sE-FL for qemu-devel@nongnu.org; Tue, 18 Oct 2011 08:39:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RG8we-0005s7-5M for qemu-devel@nongnu.org; Tue, 18 Oct 2011 08:39:00 -0400 Date: Tue, 18 Oct 2011 14:40:04 +0200 From: "Michael S. Tsirkin" Message-ID: <20111018124004.GN28776@redhat.com> References: <20111017121620.GH4537@redhat.com> <4E9C7B3C.3010703@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E9C7B3C.3010703@web.de> Subject: Re: [Qemu-devel] [RFC][PATCH 22/45] qemu-kvm: msix: Fire mask notifier on global mask changes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Alex Williamson , Marcelo Tosatti , Avi Kivity , "kvm@vger.kernel.org" , "qemu-devel@nongnu.org" On Mon, Oct 17, 2011 at 09:00:12PM +0200, Jan Kiszka wrote: > On 2011-10-17 14:16, Michael S. Tsirkin wrote: > > On Mon, Oct 17, 2011 at 11:27:56AM +0200, Jan Kiszka wrote: > >> Also invoke the mask notifier if the global MSI-X mask is modified. For > >> this purpose, we push the notifier call from the per-vector mask update > >> to the central msix_handle_mask_update. > >> > >> Signed-off-by: Jan Kiszka > > > > This is a bugfix, isn't it? > > If yes it should be separated and put on -stable. > > Yep, will pull this to the front. I'll apply this to qemu.git, no need to mix bugfixes with features ... > > > >> --- > >> hw/msix.c | 16 +++++++++------- > >> 1 files changed, 9 insertions(+), 7 deletions(-) > >> > >> diff --git a/hw/msix.c b/hw/msix.c > >> index 739b56f..247b255 100644 > >> --- a/hw/msix.c > >> +++ b/hw/msix.c > >> @@ -221,7 +221,15 @@ static bool msix_is_masked(PCIDevice *dev, int vector) > >> > >> static void msix_handle_mask_update(PCIDevice *dev, int vector) > >> { > >> - if (!msix_is_masked(dev, vector) && msix_is_pending(dev, vector)) { > >> + bool masked = msix_is_masked(dev, vector); > >> + int ret; > >> + > >> + if (dev->msix_mask_notifier) { > >> + ret = dev->msix_mask_notifier(dev, vector, > >> + msix_is_masked(dev, vector)); > > > > Use 'masked' value here as well? > > Yes. > > Jan >