From patchwork Thu May 17 13:32:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 159901 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4B6CCB6FB9 for ; Thu, 17 May 2012 23:33:15 +1000 (EST) Received: from localhost ([::1]:45706 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SV0pN-0000yY-57 for incoming@patchwork.ozlabs.org; Thu, 17 May 2012 09:33:13 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SV0p6-0000yI-Nl for qemu-devel@nongnu.org; Thu, 17 May 2012 09:33:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SV0p5-0004XZ-3J for qemu-devel@nongnu.org; Thu, 17 May 2012 09:32:56 -0400 Received: from fmmailgate02.web.de ([217.72.192.227]:49679) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SV0p4-0004XU-TB for qemu-devel@nongnu.org; Thu, 17 May 2012 09:32:55 -0400 Received: from moweb002.kundenserver.de (moweb002.kundenserver.de [172.19.20.108]) by fmmailgate02.web.de (Postfix) with ESMTP id 8E6891C4B8FAA for ; Thu, 17 May 2012 15:32:53 +0200 (CEST) Received: from localhost.localdomain ([187.105.13.240]) by smtp.web.de (mrweb001) with ESMTPA (Nemesis) id 0MddXQ-1SjDGJ3UCK-00PNbK; Thu, 17 May 2012 15:32:53 +0200 From: Jan Kiszka To: Avi Kivity , Marcelo Tosatti Date: Thu, 17 May 2012 10:32:30 -0300 Message-Id: <129ddd85312a1d9f7f6e2571ffdcf594bbe53922.1337261556.git.jan.kiszka@web.de> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: References: In-Reply-To: References: X-Provags-ID: V02:K0:+69zQ3wDWKSv8A9vhUS21ZG6S/nmODUSfx04WA6UFny h/URthe6Ff9z6n+U/8auZq2Z94d1sdUEWZXe8YK76f4bpmzCG9 2WNUGQGur523K50JZ4ksBZ/wP15YhuLToMlYcSpwB+vhiBR5tF oEf8YgnNJ2mpRUxSw3TmqBymgJZaQJu7Js5B5tDLOSVVbD5eTx SIzgwNi2LWEW00Bn6V9lQ== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 217.72.192.227 Cc: qemu-devel , kvm@vger.kernel.org, "Michael S. Tsirkin" Subject: [Qemu-devel] [RFC][PATCH v2 02/11] msix: Invoke msix_handle_mask_update on msix_mask_all X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Jan Kiszka In preparation of firing vector notifiers on mask changes, call msix_handle_mask_update also from msix_mask_all. So far, this will have no real effect. Signed-off-by: Jan Kiszka --- hw/msix.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hw/msix.c b/hw/msix.c index 3197465..e1a7d92 100644 --- a/hw/msix.c +++ b/hw/msix.c @@ -231,10 +231,14 @@ static void msix_mmio_setup(PCIDevice *d, MemoryRegion *bar) static void msix_mask_all(struct PCIDevice *dev, unsigned nentries) { int vector; + for (vector = 0; vector < nentries; ++vector) { unsigned offset = vector * PCI_MSIX_ENTRY_SIZE + PCI_MSIX_ENTRY_VECTOR_CTRL; + bool was_masked = msix_is_masked(dev, vector); + dev->msix_table_page[offset] |= PCI_MSIX_ENTRY_CTRL_MASKBIT; + msix_handle_mask_update(dev, vector, was_masked); } }