aboutsummaryrefslogtreecommitdiff
path: root/hw/pci/msix.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2012-12-18 13:54:32 +0200
committerMichael S. Tsirkin <mst@redhat.com>2012-12-26 11:49:29 +0200
commit70f8ee395afda6d96b15cb9a5b311af7720dded0 (patch)
tree0df1809edb2e2a3608a7f14fde4ae027e738bd1d /hw/pci/msix.c
parentbbef882cc1938fa5a6e1b36a50d79ce5c0cefb81 (diff)
msix: expose access to masked/pending state
For use by poll handler. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci/msix.c')
-rw-r--r--hw/pci/msix.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/pci/msix.c b/hw/pci/msix.c
index a285d18197..9eee6570c2 100644
--- a/hw/pci/msix.c
+++ b/hw/pci/msix.c
@@ -65,7 +65,7 @@ static int msix_is_pending(PCIDevice *dev, int vector)
return *msix_pending_byte(dev, vector) & msix_pending_mask(vector);
}
-static void msix_set_pending(PCIDevice *dev, int vector)
+void msix_set_pending(PCIDevice *dev, unsigned int vector)
{
*msix_pending_byte(dev, vector) |= msix_pending_mask(vector);
}
@@ -75,13 +75,13 @@ static void msix_clr_pending(PCIDevice *dev, int vector)
*msix_pending_byte(dev, vector) &= ~msix_pending_mask(vector);
}
-static bool msix_vector_masked(PCIDevice *dev, int vector, bool fmask)
+static bool msix_vector_masked(PCIDevice *dev, unsigned int vector, bool fmask)
{
unsigned offset = vector * PCI_MSIX_ENTRY_SIZE + PCI_MSIX_ENTRY_VECTOR_CTRL;
return fmask || dev->msix_table[offset] & PCI_MSIX_ENTRY_CTRL_MASKBIT;
}
-static bool msix_is_masked(PCIDevice *dev, int vector)
+bool msix_is_masked(PCIDevice *dev, unsigned int vector)
{
return msix_vector_masked(dev, vector, dev->msix_function_masked);
}