diff options
author | sephe <sephe@FreeBSD.org> | 2016-10-11 06:19:06 +0000 |
---|---|---|
committer | sephe <sephe@FreeBSD.org> | 2016-10-11 06:19:06 +0000 |
commit | 1c245e8a19ad96a68fdb5e9430f715db75ac65f3 (patch) | |
tree | 5922f9abac3461a869957ae398f413b5ea922942 /sys/dev/hyperv/vmbus/hyperv.c | |
parent | e81d81bb8099c83e910d4f93655539db87e3d3a0 (diff) | |
download | FreeBSD-src-1c245e8a19ad96a68fdb5e9430f715db75ac65f3.zip FreeBSD-src-1c245e8a19ad96a68fdb5e9430f715db75ac65f3.tar.gz |
MFC 302607-302612
302607
hyperv/vmbus: Use post message Hypercall APIs for channel open
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6876
302608
hyperv/vmbus: Remove unnecessary check and unapplied comment
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6877
302609
hyperv/vmbus: Use post message Hypercall APIs for GPADL connect.
This also fixes memory leakge if sub-connect messages are needed.
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6878
302610
hyperv/vmbus: Use post message Hypercall APIs for channel close
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6906
302611
hyperv/vmbus: Use post message Hypercall APIs for GPA disconnect
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6912
302612
hyperv: Nuke unused stuffs
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6913
Diffstat (limited to 'sys/dev/hyperv/vmbus/hyperv.c')
-rw-r--r-- | sys/dev/hyperv/vmbus/hyperv.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/sys/dev/hyperv/vmbus/hyperv.c b/sys/dev/hyperv/vmbus/hyperv.c index 0ce033f..94ef5fa 100644 --- a/sys/dev/hyperv/vmbus/hyperv.c +++ b/sys/dev/hyperv/vmbus/hyperv.c @@ -126,51 +126,6 @@ hypercall_post_message(bus_addr_t msg_paddr) } /** - * @brief Post a message using the hypervisor message IPC. - * (This involves a hypercall.) - */ -hv_vmbus_status -hv_vmbus_post_msg_via_msg_ipc( - hv_vmbus_connection_id connection_id, - hv_vmbus_msg_type message_type, - void* payload, - size_t payload_size) -{ - struct alignedinput { - uint64_t alignment8; - hv_vmbus_input_post_message msg; - }; - - hv_vmbus_input_post_message* aligned_msg; - hv_vmbus_status status; - size_t addr; - - if (payload_size > HV_MESSAGE_PAYLOAD_BYTE_COUNT) - return (EMSGSIZE); - - addr = (size_t) malloc(sizeof(struct alignedinput), M_DEVBUF, - M_ZERO | M_NOWAIT); - KASSERT(addr != 0, - ("Error VMBUS: malloc failed to allocate message buffer!")); - if (addr == 0) - return (ENOMEM); - - aligned_msg = (hv_vmbus_input_post_message*) - (HV_ALIGN_UP(addr, HV_HYPERCALL_PARAM_ALIGN)); - - aligned_msg->connection_id = connection_id; - aligned_msg->message_type = message_type; - aligned_msg->payload_size = payload_size; - memcpy((void*) aligned_msg->payload, payload, payload_size); - - status = hv_vmbus_do_hypercall( - HV_CALL_POST_MESSAGE, aligned_msg, 0) & 0xFFFF; - - free((void *) addr, M_DEVBUF); - return (status); -} - -/** * @brief Signal an event on the specified connection using the hypervisor * event IPC. (This involves a hypercall.) */ |