summaryrefslogtreecommitdiff
path: root/usr/src/lib/libvmmapi/common/vmmapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib/libvmmapi/common/vmmapi.c')
-rw-r--r--usr/src/lib/libvmmapi/common/vmmapi.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/usr/src/lib/libvmmapi/common/vmmapi.c b/usr/src/lib/libvmmapi/common/vmmapi.c
index 0b22ca7522..fcb098a74f 100644
--- a/usr/src/lib/libvmmapi/common/vmmapi.c
+++ b/usr/src/lib/libvmmapi/common/vmmapi.c
@@ -1162,7 +1162,22 @@ vm_get_pptdev_limits(struct vmctx *ctx, int bus, int slot, int func,
return (error);
}
+
+int
+vm_disable_pptdev_msix(struct vmctx *ctx, int bus, int slot, int func)
+{
+ struct vm_pptdev ppt;
+
+ bzero(&ppt, sizeof(ppt));
+ ppt.bus = bus;
+ ppt.slot = slot;
+ ppt.func = func;
+
+ return ioctl(ctx->fd, VM_PPTDEV_DISABLE_MSIX, &ppt);
+}
+
#else /* __FreeBSD__ */
+
int
vm_assign_pptdev(struct vmctx *ctx, int pptfd)
{
@@ -1238,6 +1253,15 @@ vm_get_pptdev_limits(struct vmctx *ctx, int pptfd, int *msi_limit,
*msix_limit = pptlimits.msix_limit;
return (error);
}
+
+int
+vm_disable_pptdev_msix(struct vmctx *ctx, int pptfd)
+{
+ struct vm_pptdev pptdev;
+
+ pptdev.pptfd = pptfd;
+ return (ioctl(ctx->fd, VM_PPTDEV_DISABLE_MSIX, &pptdev));
+}
#endif /* __FreeBSD__ */
uint64_t *
@@ -1905,7 +1929,8 @@ vm_get_ioctls(size_t *len)
VM_ISA_DEASSERT_IRQ, VM_ISA_PULSE_IRQ, VM_ISA_SET_IRQ_TRIGGER,
VM_SET_CAPABILITY, VM_GET_CAPABILITY, VM_BIND_PPTDEV,
VM_UNBIND_PPTDEV, VM_MAP_PPTDEV_MMIO, VM_PPTDEV_MSI,
- VM_PPTDEV_MSIX, VM_INJECT_NMI, VM_STATS, VM_STAT_DESC,
+ VM_PPTDEV_MSIX, VM_PPTDEV_DISABLE_MSIX,
+ VM_INJECT_NMI, VM_STATS, VM_STAT_DESC,
VM_SET_X2APIC_STATE, VM_GET_X2APIC_STATE,
VM_GET_HPET_CAPABILITIES, VM_GET_GPA_PMAP, VM_GLA2GPA,
VM_GLA2GPA_NOFAULT,