Sepherosa Ziehau
031e155216
hyperv/vmbus: Move vmbus bufring definition to vmbus_reg.h
...
And add more comment about its fields.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7269
2016-07-22 05:09:08 +00:00
Sepherosa Ziehau
bafad35c7d
hyperv/vmbus: Cleanup and augment bufring sysctl tree creation
...
Binary state node is added, so that userland programs do not have
to parse human readable state string.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7268
2016-07-22 03:42:32 +00:00
Sepherosa Ziehau
a6c54e7eea
hyperv/vmbus: Cosmetic bufring cleanup.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7267
2016-07-22 03:30:00 +00:00
Sepherosa Ziehau
82b8a87964
hyperv: hv_vmbus_channel -> vmbus_channel
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7260
2016-07-21 06:09:47 +00:00
Sepherosa Ziehau
f62b3ae3be
hyperv/vmbus: Shuffle function declaration and macro definition.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7259
2016-07-21 05:46:26 +00:00
Sepherosa Ziehau
3fcf36f408
hyperv/vmbus: Reorder channel fields.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7258
2016-07-21 05:38:05 +00:00
Sepherosa Ziehau
f617e011c9
hyperv/vmbus: Save event flag location and evet flag mask.
...
This avoids unnecessary access to the vmbus_softc struct on sending path.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7257
2016-07-21 05:30:31 +00:00
Sepherosa Ziehau
e90bb68be6
hyperv/vmbus: Save MNF trigger location instead of MNF trigger index.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7246
2016-07-20 06:12:32 +00:00
Sepherosa Ziehau
6254947245
hyperv/vmbus: Hide channel struct definition.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7245
2016-07-20 06:00:27 +00:00
Sepherosa Ziehau
fda1c6ee42
hyperv/vmbus: Deprecate the device private data in channel struct
...
They are neither flexible nor extensible.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7244
2016-07-20 05:48:52 +00:00
Sepherosa Ziehau
ca871fb75c
hyperv/vmbus: Pass channel as the first argument for channel callback
...
The prepares to kill device private fields in channel struct, which
are not flexible and extensible.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7243
2016-07-20 05:34:28 +00:00
Sepherosa Ziehau
9129ad2d70
hyperv/vmbus: Channel struct field rename
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7242
2016-07-20 05:26:04 +00:00
Sepherosa Ziehau
4cd995ff5d
hyperv/vmbus: Move IC register definition to Hyper-V utilities
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7241
2016-07-20 05:16:23 +00:00
Sepherosa Ziehau
267fb25f21
hyperv/vmbus: Get rid of unnecessary definition.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7240
2016-07-20 05:03:04 +00:00
Sepherosa Ziehau
e62409966b
hyperv/vmbus: Rename laundered vmbus channel code
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7232
2016-07-19 07:51:22 +00:00
Sepherosa Ziehau
d9687005ae
hyperv/vmbus: Temp/internal variable/function rename
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7231
2016-07-19 06:04:44 +00:00
Sepherosa Ziehau
e93854c495
hyperv/vmbus: Function rename
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7230
2016-07-19 05:57:19 +00:00
Sepherosa Ziehau
742fb4f669
hyperv/vmbus: Cleanup cpu based channel selection.
...
And create cpu to channel map at device attach time for storvsc(4).
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7229
2016-07-19 05:46:15 +00:00
Sepherosa Ziehau
367d703632
hyperv/vmbus: Cosmetic vmbus channel open cleanup
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7217
2016-07-18 05:36:31 +00:00
Sepherosa Ziehau
d745ae11c9
hyperv/vmbus: Cleanup channel sysctl tree creation
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7214
2016-07-15 08:40:22 +00:00
Sepherosa Ziehau
3ccc0ce030
hyperv/vmbus: Cosmetic vmbus channel close cleanup
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7213
2016-07-15 08:31:53 +00:00
Sepherosa Ziehau
d0856980e4
hyperv/vmbus: Function rename
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7212
2016-07-15 08:23:33 +00:00
Sepherosa Ziehau
a91e5fd55f
hyperv/vmbus: Back out r302888 temporarily
...
Committed by accident w/ duplicated commit log
MFC after: 1 week
Sponsored by: Microsoft OSTC
2016-07-15 08:13:44 +00:00
Sepherosa Ziehau
047affd165
hyperv/hn: Busdma-fy rxbuf and chimney sending buffer
...
Nuke unused channel GPADL API.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7211
2016-07-15 08:08:13 +00:00
Sepherosa Ziehau
8c209c9206
hyperv/hn: Busdma-fy rxbuf and chimney sending buffer
...
Nuke unused channel GPADL API.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7211
2016-07-15 08:06:48 +00:00
Sepherosa Ziehau
43bbe6b27f
hyperv/vmbus: Cleanup channel packet receiving.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7204
2016-07-15 07:53:45 +00:00
Sepherosa Ziehau
7c55724859
hyperv/vmbus: Cleanup channel receiving.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7202
2016-07-15 07:45:30 +00:00
Sepherosa Ziehau
7bf5900964
hyperv/vmbus: Factor out macros to do channel packet length conversion.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7194
2016-07-15 07:35:01 +00:00
Sepherosa Ziehau
a47c066339
hyperv/vmbus: Field rename
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7193
2016-07-15 07:26:31 +00:00
Sepherosa Ziehau
12140675e8
hyperv/vmbus: Function rename
...
And reorder the error prone parameters list.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7191
2016-07-15 07:16:46 +00:00
Sepherosa Ziehau
4817a5a58d
hyperv/vmbus: Cleanup channel sending
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7178
2016-07-15 07:07:17 +00:00
Sepherosa Ziehau
03055a2cea
hyperv/vmbus: Move channel packet types definition to vmbus.h
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7177
2016-07-15 06:58:21 +00:00
Sepherosa Ziehau
1680fb300c
hyperv/vmbus: Move channel packet flags definition to vmbus.h
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7176
2016-07-15 06:49:45 +00:00
Sepherosa Ziehau
66e132bd0f
hyeprv/vmbus: Rework prplist sending.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7175
2016-07-15 06:40:59 +00:00
Sepherosa Ziehau
6199f16549
hyperv/vmbus: Rework sglist sending.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7156
2016-07-15 06:29:19 +00:00
Sepherosa Ziehau
d64ec3506d
hyperv/vmbus: Redefine channel packet.
...
The channel packet header will be shared w/ PRP (physical region page)
list channel packet and SG (scatter gather) list channel packet.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7155
2016-07-15 06:16:39 +00:00
Sepherosa Ziehau
013c69bf17
hyperv/vmbus: Field rename
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7146
2016-07-15 06:08:48 +00:00
Sepherosa Ziehau
23eaa43cc8
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.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7141
2016-07-15 05:59:27 +00:00
Sepherosa Ziehau
29bf5462b5
hyperv/vmbus: Busdma-fy channel bufring.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7140
2016-07-15 05:51:58 +00:00
Sepherosa Ziehau
9ab42c2138
hyperv/vmbus: Add vmbus_chan_gpadl_connect, which takes GPA physaddr
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7139
2016-07-15 05:40:34 +00:00
Sepherosa Ziehau
b3a6435528
hyperv/vmbus: Use iovec for bufring scatter/gather list.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7134
2016-07-15 05:29:04 +00:00
Sepherosa Ziehau
4ad849ba82
hyperv/vmbus: Remove unused function definition/declaration.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7131
2016-07-15 05:15:21 +00:00
Sepherosa Ziehau
9ef6240130
hyperv/vmbus: Function rename
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7129
2016-07-15 05:06:15 +00:00
Sepherosa Ziehau
1bb1ecfc00
hyperv/vmbus: Remove unused struct
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7127
2016-07-15 04:54:07 +00:00
Sepherosa Ziehau
7d590c7345
hyperv/vmbus: Merge hv_channel_mgmt.c into hv_channel.c
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7126
2016-07-15 04:42:08 +00:00
Sepherosa Ziehau
e11f3043cd
hyperv/vmbus: Move bus related message processing into vmbus.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7125
2016-07-14 08:40:59 +00:00
Sepherosa Ziehau
7e70f1cbaf
hyperv/vmbus: Sub-channel related fields renaming
...
And reorganize comment.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7113
2016-07-14 08:15:13 +00:00
Sepherosa Ziehau
e480791797
hyperv/vmbus: Fix the racy channel close.
...
It is not safe to iterate the sub-channel list w/o lock on the
close path, while it's even more difficult to hold the lock
and iterate the sub-channel list. We leverage the
vmbua_{get,rel}_subchan() functions to solve this dilemma.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7112
2016-07-14 07:59:01 +00:00
Sepherosa Ziehau
c1bea00ed1
hyperv/vmbus: Field renaming to reflect reality
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7111
2016-07-14 07:48:26 +00:00
Sepherosa Ziehau
77321df6e4
hyperv/vmbus: Release vmbus channel lock before detach devices
...
Device detach method may sleep.
While I'm here, rename the function, fix indentation and function
comment.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7110
2016-07-14 07:39:34 +00:00
Sepherosa Ziehau
4cf4f2248e
hyperv/vmbus: Only add primary channels to vmbus channel list
...
- Make the vmbus_chan_add more straightforward.
- Partially fix the hv_vmbus_release_unattached_channels().
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7109
2016-07-14 07:31:43 +00:00
Sepherosa Ziehau
3a1079321c
hyperv/vmbus: Use sub-channel index to detect primary channel
...
In case that VMBUS_CHAN_ISPRIMARY is needed in the early place of
channel setup.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7108
2016-07-14 07:24:03 +00:00
Sepherosa Ziehau
ea505e3821
hyperv/vmbus: Cleanup vmbus_chan_add()
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7106
2016-07-14 07:08:59 +00:00
Sepherosa Ziehau
8c1ac91660
hyperv/vmbus: Nuke the channel open state.
...
Channel is either opened or not-opened.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7105
2016-07-14 06:59:04 +00:00
Sepherosa Ziehau
0b1e5b0fd0
hyperv/vmbus: Cleanup vmbus_chan_msgproc_choffer
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7104
2016-07-14 06:48:24 +00:00
Sepherosa Ziehau
dab4260c90
hyperv/vmbus: Move new channel scan notification to device register
...
And nuke now unnecessary function indirection.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7103
2016-07-14 06:40:42 +00:00
Sepherosa Ziehau
245903228c
hyperv/vmbus: Move device register and channel free to the caller.
...
This paves the way for more cleanup/disentangle.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7102
2016-07-14 06:29:12 +00:00
Sepherosa Ziehau
88cafda3b1
hyperv/vmbus: Alloc/Free monitor param in vmbus channel alloc/free.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7101
2016-07-14 06:18:11 +00:00
Sepherosa Ziehau
d805de567f
hyperv/vmbus: Get rid of rel{_id,id}, use channel id consistently.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7100
2016-07-14 06:10:00 +00:00
Sepherosa Ziehau
5ef8204d4b
hyperv/vmbus: Remove unused bits
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7095
2016-07-14 06:00:40 +00:00
Sepherosa Ziehau
f15c787ae7
hyperv/vmbus: Switch to vmbus channel message macros
...
Prepare for more cleanup.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7094
2016-07-14 05:49:14 +00:00
Sepherosa Ziehau
e979461031
hyperv/vmbus: Move channel offer message definition to vmbus_reg.h
...
- Avoid bit fields.
- Avoid unnecessary indirection.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7093
2016-07-14 05:33:33 +00:00
Sepherosa Ziehau
71ac1309f0
hyperv: hv_guid -> struct hyperv_guid.
...
This paves way for the further cleanup/disentangle.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7092
2016-07-14 05:25:31 +00:00
Sepherosa Ziehau
6c3a5c5759
hyperv/vmbus: Remove unused bits
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7091
2016-07-14 05:14:12 +00:00
Sepherosa Ziehau
e2d8dbe438
hyperv/vmbus: Cleanup channel rescind
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7090
2016-07-13 09:44:24 +00:00
Sepherosa Ziehau
37a911a59b
hyperv/vmbus: Remove unused code
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7089
2016-07-13 09:36:46 +00:00
Sepherosa Ziehau
8c8cf3f2e2
hyperv/vmbus: Reorganize MNF event sending.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7088
2016-07-13 09:28:46 +00:00
Sepherosa Ziehau
562d480b7d
hyperv: Signal event input parameter is shared w/ MNF
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7087
2016-07-13 09:19:33 +00:00
Sepherosa Ziehau
a570251d00
hyperv: All Hypercall parameters have same alignment requirement.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7086
2016-07-13 09:11:03 +00:00
Sepherosa Ziehau
782b0df476
hyperv/vmbus: Install different task function for batch/non-batch channels
...
This avoids bunch of unnecessary checks on hot path and simplifies the
channel processing.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7085
2016-07-13 08:30:14 +00:00
Sepherosa Ziehau
817c040c3f
hyperv/vmbus: Remove unnecessary callback check.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7046
2016-07-13 06:55:21 +00:00
Sepherosa Ziehau
df1021e7bf
hyperv/vmbus: Pack bool field into flags field
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7038
2016-07-13 06:46:29 +00:00
Sepherosa Ziehau
7c2abef176
hyperv/bufring: Remove unused fields
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7037
2016-07-13 06:39:04 +00:00
Sepherosa Ziehau
6de616d3a0
hyperv/vmbus: Nuke unused field from hv_vmbus_channel.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7036
2016-07-13 06:30:33 +00:00
Sepherosa Ziehau
3b50b13baa
hyperv: Get rid of hv_device, which is unnecessary indirection.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7034
2016-07-13 06:17:15 +00:00
Sepherosa Ziehau
6a2ff2cbf7
hyperv/hn: Avoid the hv_device
...
This paves way to nuke the hv_device, which is actually an unncessary
indirection.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7033
2016-07-13 05:58:46 +00:00
Sepherosa Ziehau
47575345ba
hyperv/vmbus: Deprecate the usage of hv_device.
...
This paves way to nuke the hv_device, which is actually an unncessary
indirection.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7032
2016-07-13 05:47:09 +00:00
Sepherosa Ziehau
2d19acf75b
hyperv/util: Avoid the hv_device
...
This paves way to nuke the hv_device, which is actually an unncessary
indirection.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7028
2016-07-13 05:35:28 +00:00
Sepherosa Ziehau
d2c2a2ef36
hyperv/stor: Avoid the hv_device and nuke the broken get_stor_device
...
This paves way to nuke the hv_device, which is actually an unncessary
indirection.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7027
2016-07-13 05:28:07 +00:00
Sepherosa Ziehau
edd0c2c7c7
hyperv/vmbus: Add channel ivar accessor.
...
This makes life easier during the transition period to nuke the hv_device.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7026
2016-07-13 05:19:45 +00:00
Sepherosa Ziehau
93637258fd
hyperv/vmbus: All ivars are read-only; nuke unnecessary write_ivar
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7025
2016-07-13 05:11:45 +00:00
Sepherosa Ziehau
884d26c84c
hyperv/vmbus: Add vmbus method for GUID base device probing.
...
Reduce the exposure of hv_device.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7024
2016-07-13 05:01:12 +00:00
Sepherosa Ziehau
abe9fa4996
hyperv/vmbus: Remove the embedded offer message from hv_vmbus_channel
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7021
2016-07-13 04:51:37 +00:00
Sepherosa Ziehau
5c604feb67
hyperv/vmbus: Add type/instance guid fields into hv_vmbus_channel
...
This prepares to remove the unnecessary offer message embedding in
hv_vmbus_channel.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7020
2016-07-13 04:39:16 +00:00
Sepherosa Ziehau
d74e22ed4a
hyperv/vmbus: Add flags field into hv_vmbus_channel for MNF indication
...
This prepares to remove the unnecessary offer message embedding in
hv_vmbus_channel.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7019
2016-07-13 04:31:08 +00:00
Sepherosa Ziehau
4ac0a9bf1e
hyperv/vmbus: Make subchan index a field of hv_vmbus_channel.
...
This prepares to remove the unnecessary offer message embedding in
hv_vmbus_channel.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7015
2016-07-13 03:35:22 +00:00
Sepherosa Ziehau
2c4888c75b
hyperv/vmbus: Make channel id a field of hv_vmbus_channel.
...
This prepares to remove the unnecessary offer message embedding in
hv_vmbus_channel.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7014
2016-07-13 03:24:29 +00:00
Sepherosa Ziehau
e71d17193d
hyperv/vmbus: Merge hv_connection.c into hv_channel.c
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7004
2016-07-13 03:14:29 +00:00
Sepherosa Ziehau
283ec9df45
hyperv/vmbus: Destroy channel list lock upon attach failure and detach.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7003
2016-07-12 09:06:25 +00:00
Sepherosa Ziehau
250ca4ca3b
hyperv/vmbus: Remove needed bits
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7002
2016-07-12 08:55:08 +00:00
Sepherosa Ziehau
af3be0bfa5
hyperv/vmbus: Move channel map to vmbus_softc
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6982
2016-07-12 08:47:04 +00:00
Sepherosa Ziehau
99e315276a
hyperv/vmbus: Fix sub-channel re-open support.
...
For multi-channel devices, once the primary channel is closed,
a set of 'rescind' messages for sub-channels will be delivered
by Hypervisor. Sub-channel MUST be freed according to these
'rescind' messages; directly re-openning sub-channels in the
same fashion as the primary channel's re-opening does NOT work
at all.
After the primary channel is re-opened, requested # of sub-
channels will be delivered though 'channel offer' messages, and
this set of newly offered channels can be opened along side with
the primary channel.
This unbreaks the MTU setting for hn(4), which requires re-
openning all existsing channels upon MTU change.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6978
2016-07-12 08:38:03 +00:00
Sepherosa Ziehau
81e1f05268
hyperv/vmbus: Free sysctl properly upon channel close.
...
Prepare for sub-channel re-open.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6977
2016-07-12 08:28:51 +00:00
Sepherosa Ziehau
3dee05577d
hyperv/vmbus: More verbose for GPADL_connect/chan_{rescind,offer}
...
Reviewed by: Dexuan Cui <decui microsoft com>, Hongjiang Zhang <honzhan microsoft com>
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6976
2016-07-12 08:21:28 +00:00
Sepherosa Ziehau
7fbf073008
hyperv/vmbus: Move channel list to vmbus_softc
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6956
2016-07-12 08:11:16 +00:00
Sepherosa Ziehau
ee7e313f03
hyperv/vmbus: Move GPADL index into vmbus_softc
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6954
2016-07-12 07:49:38 +00:00
Sepherosa Ziehau
38d19df6ff
hyperv/vmbus: Rework vmbus version accessing.
...
Instead of global variable, vmbus version is accessed through
a vmbus DEVMETHOD now.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6953
2016-07-12 07:33:39 +00:00
Sepherosa Ziehau
f24517f037
hyperv/vmbus: Minor renaming
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6919
2016-07-12 05:55:11 +00:00
Sepherosa Ziehau
9e6efea698
hyperv/vmbus: Don't be oversmart in default cpu selection.
...
Pin the channel to cpu0 by default. Drivers having special channel-cpu
mapping requirement should call vmbus_channel_cpu_{set,rr}() themselves.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6918
2016-07-12 05:31:33 +00:00
Sepherosa Ziehau
fc7ddc1e23
hyperv: Nuke unused stuffs
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6917
2016-07-12 05:23:14 +00:00
Sepherosa Ziehau
e44bdd84c9
hyperv/vmbus: Busdma-fy Hypercall signal event input parameter.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6916
2016-07-12 05:09:07 +00:00
Sepherosa Ziehau
44d03f9a5f
hyperv/vmbus: Avoid tx_evtflags setting code duplication.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6915
2016-07-12 04:58:21 +00:00
Sepherosa Ziehau
88d2677299
hyperv/vmbus: Flatten channel message response processing.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6914
2016-07-12 04:35:32 +00:00
Sepherosa Ziehau
1f175550a0
hyperv: Nuke unused stuffs
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6913
2016-07-12 03:38:29 +00:00
Sepherosa Ziehau
e90ec741f9
hyperv/vmbus: Use post message Hypercall APIs for GPA disconnect
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6912
2016-07-12 03:32:07 +00:00
Sepherosa Ziehau
e9bd7c4417
hyperv/vmbus: Use post message Hypercall APIs for channel close
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6906
2016-07-12 03:25:36 +00:00
Sepherosa Ziehau
2bf62f9a89
hyperv/vmbus: Use post message Hypercall APIs for GPADL connect.
...
This also fixes memory leakge if sub-connect messages are needed.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6878
2016-07-12 03:19:40 +00:00
Sepherosa Ziehau
df9f40d810
hyperv/vmbus: Remove unnecessary check and unapplied comment
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6877
2016-07-12 03:14:35 +00:00
Sepherosa Ziehau
fc1208d658
hyperv/vmbus: Use post message Hypercall APIs for channel open
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6876
2016-07-12 03:09:10 +00:00
Sepherosa Ziehau
796a90bf5d
hyperv/vmbus: Reorganize vmbus scan process.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6875
2016-07-12 03:03:17 +00:00
Sepherosa Ziehau
7a49521a4b
hyperv/stor: Save the response status and xfer length properly.
...
The current command response handling discards status and xfer
length unconditionally, so that all of the commands would be
considered successful, even if errors happened. When errors
really happens, this causes all kinds of wiredness, since the
buffer will not be filled on the host side and sense data will
be ignored.
Most of the time, errors do not happen, however, error does
happen for the request sent immediately after the disk resizing.
Discarding the SCSI status (SCSI_STATUS_CHECK_COND) and sense
data (capacity changes) prevents the disk resizing from working
properly.
This commit saves the response status and xfer length properly
for later use.
Submitted by: Dexuan Cui <decui microsoft com>
Noticed by: sephe
MFC after: 3 days
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7181
2016-07-12 02:57:13 +00:00
Sepherosa Ziehau
60169cb210
hyperv/vmbus: Embed channel detach task in channel itself.
...
GC work queue stuffs.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6864
2016-07-11 08:12:04 +00:00
Sepherosa Ziehau
3e1c325e63
hyperv/vmbus: Save vmbus softc to channels.
...
So that we don't need to access the global vmbus softc.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6863
2016-07-11 07:54:58 +00:00
Sepherosa Ziehau
fd5831c624
hyperv/vmbus: Create channel synchronously.
...
The device probe/attach has been move to a different thread, so the
reasons to create the channel asynchronously are no longer valid.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6862
2016-07-11 07:45:31 +00:00
Sepherosa Ziehau
1ecb24660f
hyperv/vmbus: Use post message Hypercall APIs for unload
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6861
2016-07-11 07:28:15 +00:00
Sepherosa Ziehau
47a3ee5c60
hyperv/vmbus: Add sysctl to expose vmbus version.
...
Requested by: Hongxiong Xian <v-hoxian microsoft com>
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6860
2016-07-11 06:55:02 +00:00
Sepherosa Ziehau
833cfa5fcb
hyperv/vmbus: Explicitly assign channel message process array.
...
While I'm here, remove the useless message type from message process
array, which is not used and serves no purposes at all.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6858
2016-07-11 06:37:04 +00:00
Sepherosa Ziehau
dd012a57a7
hyperv/vmbus: Function renaming.
...
And pass vmbus_softc to vmbus_doattach()
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6842
2016-07-11 06:29:56 +00:00
Sepherosa Ziehau
57bb267df3
hyperv/hn: Add tunable to allow tcp_lro_queue_mbuf()
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6841
2016-07-11 06:23:01 +00:00
Sepherosa Ziehau
c1cc5bdfe8
hyperv/vmbus: Use post message Hypercall APIs for channel request
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6831
2016-07-11 06:11:24 +00:00
Sepherosa Ziehau
2d774f207c
hyperv/stor: Fix the INQUIRY checks
...
Don't check the area that the host has not filled.
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209443
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210425
Submitted by: Hongjiang Zhang <honzhan microsoft com>
Reviewed by: sephe, Dexuan Cui <decui microsoft com>
MFC after: 3 days
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6955
2016-07-11 05:17:48 +00:00
Sepherosa Ziehau
236764b1c2
hyperv/vmbus: Implement a new set of APIs for post message Hypercall
...
And use this new APIs for Initial Contact post message Hypercall.
More post message Hypercalls will be converted.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6830
2016-07-11 04:52:11 +00:00
Sepherosa Ziehau
51a9a000ee
hyperv/vmbus: Change tx_evtflags type to u_long to match vmbus_evtflags
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6745
2016-06-08 07:47:21 +00:00
Sepherosa Ziehau
6523ab7e00
hyperv/vmbus: Busdma-fy MNF and event flags.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6744
2016-06-08 05:34:22 +00:00
Sepherosa Ziehau
36ad8372d4
net: Use M_HASHTYPE_OPAQUE_HASH if the mbuf flowid has hash properties
...
Reviewed by: hps, erj, tuexen
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6688
2016-06-07 04:51:50 +00:00
Sepherosa Ziehau
43926ba13f
hyperv/vmbus: Constify channel message
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6708
2016-06-06 07:39:44 +00:00
Sepherosa Ziehau
12ea25ae4f
hyperv/vmbus: Factor out channel message processing
...
This paves the way for further cleanup.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6707
2016-06-06 07:27:57 +00:00
Sepherosa Ziehau
fa4828b0ab
hyperv/vmbus: Define type for channel messages.
...
And fix message processing; only channel messages are supported.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6706
2016-06-06 06:18:18 +00:00
Sepherosa Ziehau
d8bf51683d
hyperv: Move machine dependent bits into machine dependent files.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6701
2016-06-06 05:55:37 +00:00
Sepherosa Ziehau
b7bb4816a0
hyperv: Rename some cleaned up/almost cleaned up files
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
2016-06-01 09:20:52 +00:00
Sepherosa Ziehau
5d8fdc7fe4
hyperv/channel: Only cpu0 is supported as channel target cpu on WIN7
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
2016-06-01 07:11:54 +00:00
Sepherosa Ziehau
417afb00cb
hyperv/vmbus: Redefine event flags.
...
- Nuke unnecessary union.
- Avoid convoluted macro indirection.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6671
2016-06-01 06:51:44 +00:00
Sepherosa Ziehau
7f9e539e14
hyperv/kvp: Use if_xname.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6641
2016-05-31 06:00:18 +00:00
Sepherosa Ziehau
7df850a759
hyperv: Move guid2str from vmbus file to hyperv file
...
- Use uint8_t for GUID byte array.
- Define GUID string length.
- Break long lines.
- Nuke unnecessary stack variable.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6640
2016-05-31 05:43:59 +00:00
Sepherosa Ziehau
b8ec7cd1e0
hyperv/vmbus: White space cleanup
...
No functional changes
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6637
2016-05-31 05:34:46 +00:00
Sepherosa Ziehau
3ae6d31281
hyperv/vmbus: Redefine SynIC message.
...
- Avoid unnecessary indirection.
- Avoid bit fields.
- Use __packed.
Reviewed by: Jun Su <junsu microsoft com>
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6636
2016-05-31 05:18:55 +00:00
Sepherosa Ziehau
3b2f526463
hyperv/vmbus: Move global vmbus id array to stack.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6603
2016-05-31 05:10:20 +00:00
Sepherosa Ziehau
e4a8553128
hyperv/vmbus: Indentation cleanup
...
No functional changes.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6602
2016-05-31 05:01:43 +00:00
Sepherosa Ziehau
98a68947d4
hyperv/vmbus: Rename ISR functions
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6601
2016-05-31 04:47:53 +00:00
Sepherosa Ziehau
387d355588
hyperv/vmbus: Process event timer before checking events
...
And update comment.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6600
2016-05-31 04:10:15 +00:00
Sepherosa Ziehau
496d023db3
hyperv/et: Allow Hyper-V event timer be disabled
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6599
2016-05-30 09:44:17 +00:00
Sepherosa Ziehau
6072b2511c
hyperv/et: Device renaming; consistent w/ other Hyper-V utils
...
While I'm here, prefix function names w/ vmbus, since unlike Hyper-V
timecounter, Hyper-V event timer will not work w/o vmbus.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6598
2016-05-30 09:35:36 +00:00
Sepherosa Ziehau
3f07976a64
hyperv: Move timer frequency definition to common place.
...
And cleanup event timer period settings.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6597
2016-05-30 09:20:08 +00:00
Sepherosa Ziehau
efe8791a64
hyperv/et: Make sure only one event timer will be registered
...
This nullifies the need to use softc.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6591
2016-05-30 08:50:33 +00:00
Sepherosa Ziehau
430d28dbb3
hyperv/vmbus: Move SINT settings to vmbus_var.h
...
While I'm here remove the event timer's dependency on hv_vmbus_priv.h
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6574
2016-05-30 08:42:35 +00:00
Sepherosa Ziehau
d7bc16443e
hyperv/et: Fix STIMER0 operations.
...
- Make sure that STIMER0 is disabled before writting to it, since
writing to an enabled STIMER will result in undefined behaviour.
- It is unnecessary to reconfigure STIMER0 upon each et_start().
- Make sure that MSR_HV_REF_TIME_COUNT will not return 0, since
writing 0 to STIMER_COUNT will disable the target STIMER.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6573
2016-05-30 08:25:09 +00:00
Sepherosa Ziehau
5cb904dc2f
hyperv: Test features before enabling optional functionalities
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6571
2016-05-27 07:29:31 +00:00
Sepherosa Ziehau
7da9c32e83
hyperv: Clean up Hyper-V timecounter a bit.
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6569
2016-05-27 07:05:30 +00:00
Sepherosa Ziehau
62eb6e21b6
hyperv: GC unneeded bits
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6568
2016-05-27 06:55:05 +00:00
Sepherosa Ziehau
e3ebe93016
hyperv/vmbus: Move MSR EOM to hyperv_reg.h
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6567
2016-05-27 06:47:04 +00:00