thebeanogamer / rpms / qemu-kvm

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