summaryrefslogtreecommitdiff
path: root/lib/libvmmapi
diff options
context:
space:
mode:
authorPeter Grehan <grehan@FreeBSD.org>2012-04-28 16:28:00 +0000
committerPeter Grehan <grehan@FreeBSD.org>2012-04-28 16:28:00 +0000
commitcd942e0f257c9d5156cd0a51d73f8b5dcf9b011c (patch)
treee25fe0456b877e9c40defdc19a863563208d18de /lib/libvmmapi
parent38f1b189cd839bd8aa122ae06cc084810ca1e395 (diff)
Notes
Diffstat (limited to 'lib/libvmmapi')
-rw-r--r--lib/libvmmapi/vmmapi.c19
-rw-r--r--lib/libvmmapi/vmmapi.h2
2 files changed, 21 insertions, 0 deletions
diff --git a/lib/libvmmapi/vmmapi.c b/lib/libvmmapi/vmmapi.c
index 17f2063f432a..a33a94eb5a08 100644
--- a/lib/libvmmapi/vmmapi.c
+++ b/lib/libvmmapi/vmmapi.c
@@ -454,6 +454,25 @@ vm_setup_msi(struct vmctx *ctx, int vcpu, int bus, int slot, int func,
return (ioctl(ctx->fd, VM_PPTDEV_MSI, &pptmsi));
}
+int
+vm_setup_msix(struct vmctx *ctx, int vcpu, int bus, int slot, int func,
+ int idx, uint32_t msg, uint32_t vector_control, uint64_t addr)
+{
+ struct vm_pptdev_msix pptmsix;
+
+ bzero(&pptmsix, sizeof(pptmsix));
+ pptmsix.vcpu = vcpu;
+ pptmsix.bus = bus;
+ pptmsix.slot = slot;
+ pptmsix.func = func;
+ pptmsix.idx = idx;
+ pptmsix.msg = msg;
+ pptmsix.addr = addr;
+ pptmsix.vector_control = vector_control;
+
+ return ioctl(ctx->fd, VM_PPTDEV_MSIX, &pptmsix);
+}
+
uint64_t *
vm_get_stats(struct vmctx *ctx, int vcpu, struct timeval *ret_tv,
int *ret_entries)
diff --git a/lib/libvmmapi/vmmapi.h b/lib/libvmmapi/vmmapi.h
index 38533a894b17..7b664215c634 100644
--- a/lib/libvmmapi/vmmapi.h
+++ b/lib/libvmmapi/vmmapi.h
@@ -77,6 +77,8 @@ int vm_map_pptdev_mmio(struct vmctx *ctx, int bus, int slot, int func,
vm_paddr_t gpa, size_t len, vm_paddr_t hpa);
int vm_setup_msi(struct vmctx *ctx, int vcpu, int bus, int slot, int func,
int dest, int vector, int numvec);
+int vm_setup_msix(struct vmctx *ctx, int vcpu, int bus, int slot, int func,
+ int idx, uint32_t msg, uint32_t vector_control, uint64_t addr);
/*
* Return a pointer to the statistics buffer. Note that this is not MT-safe.