diff options
author | sephe <sephe@FreeBSD.org> | 2016-10-11 09:02:55 +0000 |
---|---|---|
committer | sephe <sephe@FreeBSD.org> | 2016-10-11 09:02:55 +0000 |
commit | 0b1be69027a57c0c2eb9ba0b51010bb075a941ea (patch) | |
tree | 5f7bf41de1a03cad1f97aeca62a5a94a001283c0 /sys/dev/hyperv/include | |
parent | 947a88d79db2e7e1f25ccf489fff5c3d10dd8803 (diff) | |
download | FreeBSD-src-0b1be69027a57c0c2eb9ba0b51010bb075a941ea.zip FreeBSD-src-0b1be69027a57c0c2eb9ba0b51010bb075a941ea.tar.gz |
MFC 302873,302874
302873
hyperv/vmbus: Set vcpuid to 0, if MSR_HV_VP_INDEX does not exist.
Mainly for compatibility. While I'm here, rename cpuid related
fields in hv_vmbus_channel.
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7141
302874
hyperv/vmbus: Field rename
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7146
Diffstat (limited to 'sys/dev/hyperv/include')
-rw-r--r-- | sys/dev/hyperv/include/hyperv.h | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/sys/dev/hyperv/include/hyperv.h b/sys/dev/hyperv/include/hyperv.h index c4ec18c..9b59e20 100644 --- a/sys/dev/hyperv/include/hyperv.h +++ b/sys/dev/hyperv/include/hyperv.h @@ -242,7 +242,7 @@ typedef struct { uint32_t ring_data_size; /* ring_size */ } hv_vmbus_ring_buffer_info; -typedef void (*hv_vmbus_pfn_channel_callback)(void *context); +typedef void (*vmbus_chan_callback_t)(void *); typedef struct hv_vmbus_channel { device_t ch_dev; @@ -266,24 +266,21 @@ typedef struct hv_vmbus_channel { */ hv_vmbus_ring_buffer_info inbound; - struct taskqueue * rxq; - struct task channel_task; - hv_vmbus_pfn_channel_callback on_channel_callback; - void* channel_callback_context; + struct taskqueue *ch_tq; + struct task ch_task; + vmbus_chan_callback_t ch_cb; + void *ch_cbarg; struct hyperv_mon_param *ch_monprm; struct hyperv_dma ch_monprm_dma; + int ch_cpuid; /* owner cpu */ /* - * From Win8, this field specifies the target virtual process - * on which to deliver the interupt from the host to guest. - * Before Win8, all channel interrupts would only be - * delivered on cpu 0. Setting this value to 0 would preserve - * the earlier behavior. + * Virtual cpuid for ch_cpuid; it is used to communicate cpuid + * related information w/ Hyper-V. If MSR_HV_VP_INDEX does not + * exist, ch_vcpuid will always be 0 for compatibility. */ - uint32_t target_vcpu; - /* The corresponding CPUID in the guest */ - uint32_t target_cpu; + uint32_t ch_vcpuid; /* * If this is a primary channel, ch_subchan* fields @@ -365,9 +362,8 @@ int hv_vmbus_channel_open( uint32_t recv_ring_buffer_size, void* user_data, uint32_t user_data_len, - hv_vmbus_pfn_channel_callback - pfn_on_channel_callback, - void* context); + vmbus_chan_callback_t cb, + void *cbarg); void hv_vmbus_channel_close(hv_vmbus_channel *channel); |