diff options
author | John Levon <john.levon@nutanix.com> | 2021-03-09 16:24:27 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-09 16:24:27 +0000 |
commit | 997536eee6609827b5053afef497f94bc6f6dbf4 (patch) | |
tree | 5f2c556a8a1a8f5f991f84bb6e4ba975f0574d37 /lib/irq.c | |
parent | a8242d117118d5191dad69a96e28a21d66fe8b50 (diff) | |
download | libvfio-user-997536eee6609827b5053afef497f94bc6f6dbf4.zip libvfio-user-997536eee6609827b5053afef497f94bc6f6dbf4.tar.gz libvfio-user-997536eee6609827b5053afef497f94bc6f6dbf4.tar.bz2 |
remove vfu_irq_message() (#389)
This sends a message to a vfio-user client to trigger an IRQ, instead of writing
to an eventfd. However, this isn't necessary on the cases we care about, where
eventfds *are* available. Furthermore, this isn't something an API user should
need to know about: if we ever care, the better way to do this is to make
vfu_irq_trigger() automatically use a message if an eventfd isn't available.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'lib/irq.c')
-rw-r--r-- | lib/irq.c | 22 |
1 files changed, 0 insertions, 22 deletions
@@ -419,26 +419,4 @@ vfu_irq_trigger(vfu_ctx_t *vfu_ctx, uint32_t subindex) return eventfd_write(vfu_ctx->irqs->efds[subindex], val); } -int -vfu_irq_message(vfu_ctx_t *vfu_ctx, uint32_t subindex) -{ - int ret, msg_id = 1; - struct vfio_user_irq_info irq_info; - - if (!validate_irq_subindex(vfu_ctx, subindex)) { - return ERROR_INT(EINVAL); - } - - irq_info.subindex = subindex; - ret = vfu_ctx->tran->send_msg(vfu_ctx, msg_id, - VFIO_USER_VM_INTERRUPT, - &irq_info, sizeof(irq_info), - NULL, NULL, 0); - if (ret < 0) { - return ERROR_INT(-ret); - } - - return 0; -} - /* ex: set tabstop=4 shiftwidth=4 softtabstop=4 expandtab: */ |