From nobody Mon Feb 9 19:07:33 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549292346388244.85471242866333; Mon, 4 Feb 2019 06:59:06 -0800 (PST) Received: from localhost ([127.0.0.1]:44032 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqfiB-0003wC-47 for importer@patchew.org; Mon, 04 Feb 2019 09:59:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqfaa-0006G7-Lq for qemu-devel@nongnu.org; Mon, 04 Feb 2019 09:51:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqfTP-0005VQ-Hp for qemu-devel@nongnu.org; Mon, 04 Feb 2019 09:43:49 -0500 Received: from mail-qt1-f176.google.com ([209.85.160.176]:34687) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gqfTP-0005Tt-AF for qemu-devel@nongnu.org; Mon, 04 Feb 2019 09:43:47 -0500 Received: by mail-qt1-f176.google.com with SMTP id b8so129717qtj.1 for ; Mon, 04 Feb 2019 06:43:47 -0800 (PST) Received: from redhat.com (pool-173-76-246-42.bstnma.fios.verizon.net. [173.76.246.42]) by smtp.gmail.com with ESMTPSA id g23sm16186934qta.24.2019.02.04.06.43.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Feb 2019 06:43:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=v4S+8HvHfr+NHFnecbdnwWI0W1/6eekxTs9WgQa/fuQ=; b=gKktHv3fllinkcZkRB4MnHmy2jx95G8JlxKm1ITzj8PXlg7QqHeu96S0EUowWjGGhq cTADXfImhpZuq8qEY5jthMcSWtmMe532X9bBeA7iJvbAzQhTwUAW34Rk/OZZROtmgulQ LQCmT13TrQFvGax0++/RcnCwy/+h/2PwhdBAWXNylouJ87//DUIBtNLmkD8+FCohpriy N9/b1CIGyvbZygmiKgnVioy+K3Y8Ue07IKNI3kmz423qYErwgDq93y2vBl+zUSxexDy2 QROfe/de6O+rWrCICID7zyyN4Yv/9n1+ZDCnfwqAxrT7zGoXpdYD3C7LkXgk+L3TnUXG Qqsg== X-Gm-Message-State: AJcUukfHNV5RfjXEsn8waXUyZDgCXotHIJ+vofSn90VH0BFfMYdmFUNR 7K8kwPTGh2tffboqlk8hKdmVfOjYWog= X-Google-Smtp-Source: ALg8bN5v42CeWLXztz4nLp9cUc4pSs1jPdv2uvtWKrRQJ/tb3YP/IC0+ojhlTrsVQTm02fOas1h9vQ== X-Received: by 2002:aed:29c7:: with SMTP id o65mr49803860qtd.353.1549291426240; Mon, 04 Feb 2019 06:43:46 -0800 (PST) Date: Mon, 4 Feb 2019 09:43:44 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <20190204142638.27021-14-mst@redhat.com> References: <20190204142638.27021-1-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190204142638.27021-1-mst@redhat.com> X-Mailer: git-send-email 2.17.1.1206.gb667731e2e.dirty X-Mutt-Fcc: =sent X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.160.176 Subject: [Qemu-devel] [PULL 13/25] pci/msi: export msi_is_masked() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Peter Xu Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Peter Xu It is going to be used later on outside MSI code to detect whether one MSI vector is masked out. Signed-off-by: Peter Xu Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/pci/msi.h | 1 + hw/pci/msi.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/hw/pci/msi.h b/include/hw/pci/msi.h index 4837bcf490..8440eaee11 100644 --- a/include/hw/pci/msi.h +++ b/include/hw/pci/msi.h @@ -39,6 +39,7 @@ int msi_init(struct PCIDevice *dev, uint8_t offset, bool msi_per_vector_mask, Error **errp); void msi_uninit(struct PCIDevice *dev); void msi_reset(PCIDevice *dev); +bool msi_is_masked(const PCIDevice *dev, unsigned int vector); void msi_notify(PCIDevice *dev, unsigned int vector); void msi_send_message(PCIDevice *dev, MSIMessage msg); void msi_write_config(PCIDevice *dev, uint32_t addr, uint32_t val, int len= ); diff --git a/hw/pci/msi.c b/hw/pci/msi.c index 5e05ce5ec2..47d2b0f33c 100644 --- a/hw/pci/msi.c +++ b/hw/pci/msi.c @@ -286,7 +286,7 @@ void msi_reset(PCIDevice *dev) MSI_DEV_PRINTF(dev, "reset\n"); } =20 -static bool msi_is_masked(const PCIDevice *dev, unsigned int vector) +bool msi_is_masked(const PCIDevice *dev, unsigned int vector) { uint16_t flags =3D pci_get_word(dev->config + msi_flags_off(dev)); uint32_t mask, data; --=20 MST