diff options
author | Felipe Franciosi <felipe@nutanix.com> | 2019-11-02 07:24:41 +0000 |
---|---|---|
committer | Felipe Franciosi <felipe@nutanix.com> | 2019-11-04 11:35:26 +0000 |
commit | 2ab50e0476d46148a2bbc81ea051aafc3593b13a (patch) | |
tree | 76429cd0f5f44b5df9848e5031304d474cd6b51b /lib | |
parent | 204a658378329eb39065cf3b48611d7f5968dc5c (diff) | |
download | libvfio-user-2ab50e0476d46148a2bbc81ea051aafc3593b13a.zip libvfio-user-2ab50e0476d46148a2bbc81ea051aafc3593b13a.tar.gz libvfio-user-2ab50e0476d46148a2bbc81ea051aafc3593b13a.tar.bz2 |
Hide ERR/REQ IRQs from clients
Users of libmuser do not need to know about ERR/REQ IRQs. We can later
plumb the correct support to fire REQ IRQs (for graceful removal of
devices) via a dedicated method (if ever needed). Similarly we should
offer a method to raise an ERR IRQ accordingly.
Signed-off-by: Felipe Franciosi <felipe@nutanix.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libmuser.c | 9 | ||||
-rw-r--r-- | lib/muser.h | 4 |
2 files changed, 4 insertions, 9 deletions
diff --git a/lib/libmuser.c b/lib/libmuser.c index b5cc60e..d747c1b 100644 --- a/lib/libmuser.c +++ b/lib/libmuser.c @@ -116,10 +116,10 @@ vfio_irq_idx_to_str(int index) { [VFIO_PCI_INTX_IRQ_INDEX] = "INTx", [VFIO_PCI_MSI_IRQ_INDEX] = "MSI", [VFIO_PCI_MSIX_IRQ_INDEX] = "MSI-X", - [VFIO_PCI_ERR_IRQ_INDEX] = "ERR", - [VFIO_PCI_REQ_IRQ_INDEX] = "REQ" }; - /* FIXME need to validate index */ + + assert(index < LM_DEV_NUM_IRQS); + return s[index]; } @@ -1188,9 +1188,6 @@ lm_ctx_create(lm_dev_info_t *dev_info) goto out; } - lm_ctx->pci_info.irq_count[LM_DEV_ERR_IRQ_IDX] = 1; - lm_ctx->pci_info.irq_count[LM_DEV_REQ_IRQ_IDX] = 1; - lm_ctx->extended = dev_info->extended; if (lm_ctx->extended) { size = PCI_CFG_SPACE_EXP_SIZE; diff --git a/lib/muser.h b/lib/muser.h index dc0e358..7095468 100644 --- a/lib/muser.h +++ b/lib/muser.h @@ -149,9 +149,7 @@ enum { LM_DEV_INTX_IRQ_IDX, LM_DEV_MSI_IRQ_IDX, LM_DEV_MSIX_IRQ_IDX, - LM_DEV_ERR_IRQ_IDX, - LM_DEV_REQ_IRQ_IDX, - LM_DEV_NUM_IRQS = 5 + LM_DEV_NUM_IRQS = 3 }; enum { |