sephe
ef6b6cbf46
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
sephe
3491a0177c
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
sephe
e7d187d843
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
sephe
6d3cd9ab4a
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
sephe
b17c393ac0
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
sephe
b3c68b33ee
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
sephe
a63b8b4b63
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
sephe
e3d23c0367
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
sephe
61e1edf748
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
sephe
e5034558ec
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
sephe
d5273e35be
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
sephe
36aeaa4457
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
sephe
575d5bbbc9
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
sephe
9b6f771362
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
sephe
2bab08ccf2
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
sephe
f7879d9f33
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
sephe
69496392ed
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
sephe
fe99c6a247
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
sephe
65f03aefc4
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
sephe
5e44fc0871
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
sephe
8337a84531
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
sephe
b9fd9c46b0
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
sephe
ffc3ec7c89
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
sephe
dc2684d3a5
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
sephe
55e82d913f
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
sephe
d0e66a45d5
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
sephe
b9dddaba1f
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
sephe
632673c3cb
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
sephe
1d5eeebc86
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
sephe
9f740dd350
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
sephe
089d55deb2
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
sephe
e09f507913
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
sephe
611248e7f0
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
sephe
ebd466b0f7
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
sephe
1cbc5132af
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
sephe
224825f7be
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
sephe
9021b311f5
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
sephe
4c55dfb963
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
sephe
05d204f088
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
sephe
392e784792
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
sephe
962908052b
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
sephe
eb6a63d671
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
sephe
f2c0116d53
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
sephe
5284a17d46
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
sephe
776713aedf
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
sephe
d6534dc2b2
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
sephe
6feb9c9e2d
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
sephe
5f2e1502f8
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
sephe
6ef685651b
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
sephe
40a0cd0c7d
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
sephe
6b19f5e95c
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
sephe
f033e62fd3
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
sephe
b8ae38bff0
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
sephe
0159c1e4b5
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
sephe
e9cc4a9f4e
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
sephe
8c2d93f18a
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
sephe
8bfa0bfb6c
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
sephe
8e81e0f978
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
sephe
cdcc7208ef
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
sephe
da8616cbd8
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
sephe
1dea27b546
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
sephe
6003f3acd0
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
sephe
4dfc26febb
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
sephe
056deab5df
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
sephe
97adb9a66f
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
sephe
10f9cb8545
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
sephe
95650f7121
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
sephe
9eb8845018
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
sephe
ec334e6f7e
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
sephe
8080ef114d
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
sephe
efd4115e0c
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
sephe
0a9d808c0a
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
sephe
9321cae829
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
sephe
37a4b5f644
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
sephe
c172a1e56a
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
sephe
96d2197c7c
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
sephe
f6675b808d
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
sephe
9194fae8ed
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
sephe
bbc8a9fd63
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
sephe
423e60a9f6
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
sephe
214a5c6f9a
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
sephe
a1f46208c6
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
sephe
54b1a4f0d7
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
sephe
d44d2cb6be
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
sephe
953b39a0f0
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
sephe
77f3ce8d74
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
sephe
600fe4f0cc
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
sephe
edfc6f770c
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
sephe
24b9f0b7ad
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
sephe
71485b42e8
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
sephe
81f0bc87c6
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
sephe
e836f313c0
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
sephe
1f27113f2d
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
sephe
a53e8c1810
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
sephe
3737ca6801
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
sephe
1f0b9095a5
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
sephe
19a01c5977
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
sephe
54ecbe72e3
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
sephe
bacfbc0952
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
sephe
10afae237a
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
sephe
e6448344d4
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
sephe
f6411f5ef3
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
sephe
62f3a9db50
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
sephe
c91f47db7a
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
sephe
f5a9c2db29
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
sephe
2340a2d693
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
sephe
35979a025e
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
sephe
22f842425f
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
sephe
1d0f0760f8
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
sephe
02067b6b42
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
sephe
bbb4f18f01
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
sephe
7efc15badd
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
sephe
6c8e86bb6c
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
sephe
2ba028b676
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
sephe
14da105402
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
sephe
2fbd57ad6e
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
sephe
99dd54c816
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
sephe
025a099e5b
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
sephe
cb11e42f2f
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
sephe
a6e6e29d4b
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
sephe
cc4a2417e2
hyperv: Move timer related MSRs into hyperv_reg.h
...
And avoid bit fields for event timer.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6566
2016-05-27 06:12:43 +00:00
sephe
b295eb2eaf
hyperv: Move CPUID related bits to hyperv_reg.h and give them clean name
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6565
2016-05-27 05:58:53 +00:00
sephe
f060a13316
hyperv: Rework guest id settings according to Hyper-V spec
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6553
2016-05-26 03:50:52 +00:00
sephe
de35596831
hyperv: Preserve required bits when disable Hypercall
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6530
2016-05-25 06:01:47 +00:00
sephe
65ac34ef0a
hyperv/vmbus: Rework SynIC setup and teardown
...
- Avoid bit fields.
- Fix SINT setup (preserve required bits).
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6529
2016-05-25 05:53:12 +00:00
sephe
587cba2ddf
hyperv/vmbus: Nuke unnecessary MSR read
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6528
2016-05-25 05:45:43 +00:00
sephe
8eadb055c6
hyperv/vmbus: Pass vmbus softc to vmbus_synic_setup
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6527
2016-05-25 05:37:42 +00:00
sephe
8dd29b205b
hyperv/vmbus: Minor style and white space cleanup
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6523
2016-05-25 05:30:48 +00:00
sephe
ae7646a74b
hyperv/vmbus: Move two global flags into vmbus softc
...
And pack them into one flag field.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6522
2016-05-25 05:22:35 +00:00
sephe
2a3e3576d0
hyperv/vmbus: Move vcpuid into vmbus softc per-cpu data
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6521
2016-05-25 05:06:15 +00:00
sephe
b29320f7e9
hyperv/vmbus: Move event/message taskqueue/task to vmbus softc
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6520
2016-05-25 04:59:20 +00:00
sephe
7379c4d052
hyperv/vmbus: Allocate/setup IDT vector after all ISR resources are ready
...
And release IDT vector before releasing ISR resources on interrupt
teardown path. We still have some work to do on the interrupt tearing
down path.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6519
2016-05-25 03:39:42 +00:00
sephe
d75fddcdf5
hyperv/vmbus: Check hyperv_dmamem_alloc return value
...
Though it is highly unlikely this function would fail w/ BUS_DMA_WAITOK,
we had better to check its return value; better safe then sorry here.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6518
2016-05-25 03:30:56 +00:00
sephe
54d59147ec
hyperv/vmbus: Free message taskqueue during interrupt teardown
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6506
2016-05-24 07:07:11 +00:00
sephe
a5aadae397
hyperv/vmbus: Factor out functions for vmbus interrupt set/teardown
...
This paves way for further cleanup and fix.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6505
2016-05-24 06:42:14 +00:00
sephe
5442766ff0
hyperv/vmbus: Git rid of sc version of pcpu data extraction macro
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6503
2016-05-24 06:10:21 +00:00
sephe
0450eff37f
hyperv/vmbus: Use busdma(9) for messages and event flags
...
And
- Move message and event flags to vmbus_softc per-cpu data.
- Get rid of hv_setup_arg, which serves no purpose now.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6502
2016-05-24 06:01:39 +00:00
sephe
3bdd50f642
hyperv/vmbus: Move SynIC setup/teardown from hyperv file to vmbus file
...
Avoid unnecessary exposure.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6501
2016-05-24 05:51:51 +00:00
sephe
0268d1361d
hyperv/vmbus: Rename local variable and break long lines
...
No functional changes.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6500
2016-05-24 05:43:55 +00:00
sephe
58d0fe7e62
hyperv/busdma: Take BUS_DMA_ZERO into account
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6499
2016-05-24 05:26:52 +00:00
sephe
3152684792
hyperv/vmbus: Pass vmbus_softc and curcpu to hv_vmbus_isr()
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6498
2016-05-24 05:18:26 +00:00
sephe
34fcd5745a
hyperv/vmbus: Move vmbus interrupt counter into vmbus softc
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6497
2016-05-24 05:06:01 +00:00
sephe
b48bf88aec
hyperv/vmbus: Move IDT vector to vmbus_softc
...
Prepare to get rid of the hv_setup_arg.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6449
2016-05-23 07:32:34 +00:00
sephe
fc43db2e9e
hyperv/vmbus: Get rid of vmbus_devp
...
While I'm here, nuke useless print in vmbus_attach().
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6447
2016-05-23 07:23:19 +00:00
sephe
9b8c2e4a6f
hyperv/vmbus: Declare Synic message and event w/ proper types
...
Avoid ugly casts.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6446
2016-05-23 07:14:04 +00:00
sephe
7fe01c346d
hyperv: Move Hypercall setup to an early place.
...
It does not belong to the vmbus.
While I'm here rework the Hypercall setup, e.g. use busdma(9)
and avoid bit fields.
Discussed with: Jun Su <junsu microsoft com>
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6445
2016-05-23 07:06:53 +00:00
sephe
86f0ce9eec
hyperv: Add helpers for busdma(9) operation
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6443
2016-05-23 06:35:11 +00:00
sephe
f5153143b6
hyperv: Move guest id setup to early place
...
And
- Rework the guest id composition.
- Nuke useless saved guest_id.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6430
2016-05-23 05:11:38 +00:00
sephe
a381878b79
hyperv/vmbus: Use consistent device description as other devices
...
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6418
2016-05-18 07:18:11 +00:00
sephe
60d602f8ed
hyperv/vmbus: Minor function definition style fixup
...
Reviewed by: Jun Su <junsu microsoft com>
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6417
2016-05-18 07:09:44 +00:00