diff options
author | dim <dim@FreeBSD.org> | 2014-02-26 22:26:40 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2014-02-26 22:26:40 +0000 |
commit | 09b56e694e5d4e67943f0d9c4668282053726b9f (patch) | |
tree | c09cd2cd8b06020ff76cb9b8f704cb7490621bcd /lib/libvmmapi/vmmapi.c | |
parent | 7d9059111716cc2ad4ad6f2782a9a03edcd2a81f (diff) | |
parent | 6765240e8d836b50e2135e928456ed8923b220ad (diff) | |
download | FreeBSD-src-09b56e694e5d4e67943f0d9c4668282053726b9f.zip FreeBSD-src-09b56e694e5d4e67943f0d9c4668282053726b9f.tar.gz |
Merge from head up to r262536.
Diffstat (limited to 'lib/libvmmapi/vmmapi.c')
-rw-r--r-- | lib/libvmmapi/vmmapi.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/lib/libvmmapi/vmmapi.c b/lib/libvmmapi/vmmapi.c index eba3367..7198c99 100644 --- a/lib/libvmmapi/vmmapi.c +++ b/lib/libvmmapi/vmmapi.c @@ -343,35 +343,32 @@ vm_run(struct vmctx *ctx, int vcpu, uint64_t rip, struct vm_exit *vmexit) } static int -vm_inject_event_real(struct vmctx *ctx, int vcpu, enum vm_event_type type, - int vector, int error_code, int error_code_valid) +vm_inject_exception_real(struct vmctx *ctx, int vcpu, int vector, + int error_code, int error_code_valid) { - struct vm_event ev; + struct vm_exception exc; - bzero(&ev, sizeof(ev)); - ev.cpuid = vcpu; - ev.type = type; - ev.vector = vector; - ev.error_code = error_code; - ev.error_code_valid = error_code_valid; + bzero(&exc, sizeof(exc)); + exc.cpuid = vcpu; + exc.vector = vector; + exc.error_code = error_code; + exc.error_code_valid = error_code_valid; - return (ioctl(ctx->fd, VM_INJECT_EVENT, &ev)); + return (ioctl(ctx->fd, VM_INJECT_EXCEPTION, &exc)); } int -vm_inject_event(struct vmctx *ctx, int vcpu, enum vm_event_type type, - int vector) +vm_inject_exception(struct vmctx *ctx, int vcpu, int vector) { - return (vm_inject_event_real(ctx, vcpu, type, vector, 0, 0)); + return (vm_inject_exception_real(ctx, vcpu, vector, 0, 0)); } int -vm_inject_event2(struct vmctx *ctx, int vcpu, enum vm_event_type type, - int vector, int error_code) +vm_inject_exception2(struct vmctx *ctx, int vcpu, int vector, int errcode) { - return (vm_inject_event_real(ctx, vcpu, type, vector, error_code, 1)); + return (vm_inject_exception_real(ctx, vcpu, vector, errcode, 1)); } int |