thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone
b38b0f
From 010bfb94c27cbdf2c8491606620be47a17d8279c Mon Sep 17 00:00:00 2001
b38b0f
From: Peter Xu <peterx@redhat.com>
b38b0f
Date: Tue, 2 Apr 2019 07:25:30 +0100
b38b0f
Subject: [PATCH 6/7] pci/msi: export msi_is_masked()
b38b0f
b38b0f
RH-Author: Peter Xu <peterx@redhat.com>
b38b0f
Message-id: <20190402072531.23771-4-peterx@redhat.com>
b38b0f
Patchwork-id: 85300
b38b0f
O-Subject: [RHEL-8.1 qemu-kvm PATCH 3/4] pci/msi: export msi_is_masked()
b38b0f
Bugzilla: 1662272
b38b0f
RH-Acked-by: Wei Huang <wei@redhat.com>
b38b0f
RH-Acked-by: Xiao Wang <jasowang@redhat.com>
b38b0f
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
b38b0f
b38b0f
It is going to be used later on outside MSI code to detect whether one
b38b0f
MSI vector is masked out.
b38b0f
b38b0f
Signed-off-by: Peter Xu <peterx@redhat.com>
b38b0f
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
b38b0f
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
b38b0f
(cherry picked from commit afa26ecc3010d2851a065edc7817d31e07d236ec)
b38b0f
Signed-off-by: Peter Xu <peterx@redhat.com>
b38b0f
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
b38b0f
---
b38b0f
 hw/pci/msi.c         | 2 +-
b38b0f
 include/hw/pci/msi.h | 1 +
b38b0f
 2 files changed, 2 insertions(+), 1 deletion(-)
b38b0f
b38b0f
diff --git a/hw/pci/msi.c b/hw/pci/msi.c
b38b0f
index 5e05ce5..47d2b0f 100644
b38b0f
--- a/hw/pci/msi.c
b38b0f
+++ b/hw/pci/msi.c
b38b0f
@@ -286,7 +286,7 @@ void msi_reset(PCIDevice *dev)
b38b0f
     MSI_DEV_PRINTF(dev, "reset\n");
b38b0f
 }
b38b0f
 
b38b0f
-static bool msi_is_masked(const PCIDevice *dev, unsigned int vector)
b38b0f
+bool msi_is_masked(const PCIDevice *dev, unsigned int vector)
b38b0f
 {
b38b0f
     uint16_t flags = pci_get_word(dev->config + msi_flags_off(dev));
b38b0f
     uint32_t mask, data;
b38b0f
diff --git a/include/hw/pci/msi.h b/include/hw/pci/msi.h
b38b0f
index 4837bcf..8440eae 100644
b38b0f
--- a/include/hw/pci/msi.h
b38b0f
+++ b/include/hw/pci/msi.h
b38b0f
@@ -39,6 +39,7 @@ int msi_init(struct PCIDevice *dev, uint8_t offset,
b38b0f
              bool msi_per_vector_mask, Error **errp);
b38b0f
 void msi_uninit(struct PCIDevice *dev);
b38b0f
 void msi_reset(PCIDevice *dev);
b38b0f
+bool msi_is_masked(const PCIDevice *dev, unsigned int vector);
b38b0f
 void msi_notify(PCIDevice *dev, unsigned int vector);
b38b0f
 void msi_send_message(PCIDevice *dev, MSIMessage msg);
b38b0f
 void msi_write_config(PCIDevice *dev, uint32_t addr, uint32_t val, int len);
b38b0f
-- 
b38b0f
1.8.3.1
b38b0f