diff --git a/lib/libvmmapi/aarch64/vmmapi_machdep.c b/lib/libvmmapi/aarch64/vmmapi_machdep.c --- a/lib/libvmmapi/aarch64/vmmapi_machdep.c +++ b/lib/libvmmapi/aarch64/vmmapi_machdep.c @@ -99,17 +99,14 @@ } int -vm_raise_msi(struct vmctx *ctx, uint64_t addr, uint64_t msg, int bus, int slot, - int func) +vm_raise_msi(struct vmctx *ctx, uint64_t addr, uint64_t msg) { struct vm_msi vmsi; bzero(&vmsi, sizeof(vmsi)); vmsi.addr = addr; vmsi.msg = msg; - vmsi.bus = bus; - vmsi.slot = slot; - vmsi.func = func; + /* Other fields are currently ignored. */ return (ioctl(ctx->fd, VM_RAISE_MSI, &vmsi)); } diff --git a/lib/libvmmapi/amd64/vmmapi_machdep.c b/lib/libvmmapi/amd64/vmmapi_machdep.c --- a/lib/libvmmapi/amd64/vmmapi_machdep.c +++ b/lib/libvmmapi/amd64/vmmapi_machdep.c @@ -165,6 +165,12 @@ return (ioctl(ctx->fd, VM_LAPIC_MSI, &vmmsi)); } +int +vm_raise_msi(struct vmctx *ctx, uint64_t addr, uint64_t msg) +{ + return (vm_lapic_msi(ctx, addr, msg)); +} + int vm_apicid2vcpu(struct vmctx *ctx __unused, int apicid) { diff --git a/lib/libvmmapi/vmmapi.h b/lib/libvmmapi/vmmapi.h --- a/lib/libvmmapi/vmmapi.h +++ b/lib/libvmmapi/vmmapi.h @@ -158,17 +158,16 @@ int vm_run(struct vcpu *vcpu, struct vm_run *vmrun); int vm_suspend(struct vmctx *ctx, enum vm_suspend_how how); int vm_reinit(struct vmctx *ctx); -int vm_apicid2vcpu(struct vmctx *ctx, int apicid); +int vm_raise_msi(struct vmctx *ctx, uint64_t addr, uint64_t msg); #ifdef __aarch64__ int vm_attach_vgic(struct vmctx *ctx, uint64_t dist_start, size_t dist_size, uint64_t redist_start, size_t redist_size); int vm_assert_irq(struct vmctx *ctx, uint32_t irq); int vm_deassert_irq(struct vmctx *ctx, uint32_t irq); -int vm_raise_msi(struct vmctx *ctx, uint64_t addr, uint64_t msg, int bus, - int slot, int func); int vm_inject_exception(struct vcpu *vcpu, uint64_t esr, uint64_t far); #endif #ifdef __amd64__ +int vm_apicid2vcpu(struct vmctx *ctx, int apicid); int vm_inject_exception(struct vcpu *vcpu, int vector, int errcode_valid, uint32_t errcode, int restart_instruction); int vm_lapic_irq(struct vcpu *vcpu, int vector);