311367 |
05-Jan-2017 |
sephe |
MFC 309240,309242,309244,309245,309670
309240 hyperv/vmbus: Add result polling support for xact API.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8633
309242 hyperv/vmbus: Add result polling support for message Hypercall API.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8634
309244 hyperv/vmbus: Add exec cancel support for message Hypercall API.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8635
309245 hyperv/vmbus: Use poll/cancel APIs to wait for the CHOPEN response.
Since hypervisor does not respond CHOPEN to a revoked channel.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8636
309670 hyperv/vmbus: Use pause if possible.
This makes booting on Hyper-V w/ small # of vCPUs work properly.
Reported by: Hongxiong Xian <v-hoxian microsoft com>, Hongjiang Zhang <honzhan microsoft com> Sponsored by: Microsoft |
311364 |
05-Jan-2017 |
sephe |
MFC 309128,309129,309131-309136,309138-309140,309224,309225
309128 hyperv/vmbus: Commit the GPADL id only after the connection succeeds.
Minor style change.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8563
309129 hyperv/vmbus: Minor style changes.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8564
309131 hyperv/vmbus: Fix sysctl tree leakage, if channel open fails.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8565
309132 hyperv/vmbus: Don't close unopened channels.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8566
309133 hyperv/vmbus: GPADL disconnect error on a revoked channel is benign.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8567
309134 hyperv/vmbus: No stranded bufring GPADL is allowed.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8568
309135 hyperv/vmbus: Return EISCONN if the bufring GPADL can't be disconnected.
So that the callers of vmbus_chan_open_br() could handle the passed in bufring memory properly.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8569
309136 hyperv/vmbus: Don't free the bufring if its GPADL can't be disconnected.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8570
309138 hyperv/vmbus: Always try disconnect/free bufring memory upon channel close
While I'm here, minor wording and style changes.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8598
309139 hyperv/vmbus: Propagate close error.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8599
309140 hyperv/vmbus: Add a simplified version of channel close.
So that the caller can know the channel close error and react accordingly.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8600
309224 hyperv/vmbus: Zero out GPADL if error happens.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8601
309225 hyperv/vmbus: Add supportive transaction wait function.
This function supports channel revocation properly.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8611 |
311359 |
05-Jan-2017 |
sephe |
MFC 309030,309039,309080,309081,309083
309030 hyperv/vmbus: Set a mark on the revoked channel.
This will be used to fix device detach DEVMETHOD for revoked primary channel.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8522
309039 hyperv/vmbus: Merge free/active locks.
These functions are only used by management stuffs, so there are no needs to introduce extra complexity.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8524
309080 hyperv/vmbus: Implement orphan support for transaction API
It will be used to fix the primary channel revocation support.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8525
309081 hyperv/vmbus: Fix the primary channel revoking on vmbus side.
Drivers can now use vmbus_chan_{is_revoked,set_orphan,unset_orphan}() and vmbus_xact_ctx_orphan() to fix their attach/detach DEVMETHODs for revoked primary channels.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8545
309083 hyperv/vmbus: Fix the multi-channel revoking on vmbus side.
- Reference count the sub-channel when channel offer message is processed, so that immediate rescind message on the same channel will not race sub-channel open on driver side. - Drop the above reference when sub-channel is closed, this closely mimics the hypervisor's reaction when primary channel is closed on the VM side. No drivers use sub-channel after primary channel is closed.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8546 |
307595 |
19-Oct-2016 |
sephe |
MFC 306072-306074,306076
306072 hyperv/vmbus: Allow bufrings preallocation.
The assumption that the channel is only opened upon synthetic device attach time no longer holds, e.g. Hyper-V network device MTU changes. We have to allow device drivers to preallocate bufrings, e.g. in attach DEVMETHOD, to prevent bufring allocation failure once the system memory is fragmented after running for a while.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7960
306073 hyperv/hn: Allocate bufrings in attach DEVMETHOD.
So that reinitialization, e.g. MTU change, will not fail when the system memory is excessively fragmented.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7961
306074 hyperv/vmbus: Assert that the bufring address is page aligned.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7962
306076 hyperv/hn: Put debug messages under bootverbose
While I'm here, strip blank line.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7963 |
307475 |
17-Oct-2016 |
sephe |
MFC 303945,303947-303949,303989,303992,303998,304001,304002,304109,304111
303945 hyperv/vmbus: Add macro to get channel packet data length.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7455
303947 hyperv/vmbus: Add APIs for various types of transactions.
Reviewed by: Jun Su <junsu microsoft com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7456
303948 hyperv/hn: Switch to vmbus xact APIs for NVS initialization
Reviewed by: Jun Su <junsu microsoft com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7457
303949 hyperv/vmbus: Use xact APIs to implement post message Hypercall APIs
Avoid code duplication.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7458
303989 hyperv/hn: Simplify NDIS configuration.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7466
303992 hyperv/hn: Simplify NDIS initialization.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7467
303998 hyperv/hn: Switch to vmbus xact APIs for NVS RXBUF connection.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7469
304001 hyperv/hn: Switch to vmbus xact APIs for NVS chimney buffer connection.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7470
304002 hyperv/hn: Simplify RXBUF disconnection.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7472
304109 hyperv/hn: Simplify chimney sending buffer disconnection.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7479
304111 hyperv/hn: Switch to vmbus xact APIs for sub-channel alloc request.
Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7480 |
307450 |
17-Oct-2016 |
sephe |
MFC 302816-302818
302816 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.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7110
302817 hyperv/vmbus: Field renaming to reflect reality
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7111
302818 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.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7112 |
307307 |
14-Oct-2016 |
sephe |
MFC 302698-302704,302706
302698 hyperv/vmbus: Add vmbus method for GUID base device probing.
Reduce the exposure of hv_device.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7024
302699 hyperv/vmbus: All ivars are read-only; nuke unnecessary write_ivar
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7025
302700 hyperv/vmbus: Add channel ivar accessor.
This makes life easier during the transition period to nuke the hv_device.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7026
302701 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.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7027
302702 hyperv/util: Avoid the hv_device
This paves way to nuke the hv_device, which is actually an unncessary indirection.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7028
302703 hyperv/vmbus: Deprecate the usage of hv_device.
This paves way to nuke the hv_device, which is actually an unncessary indirection.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7032
302704 hyperv/hn: Avoid the hv_device
This paves way to nuke the hv_device, which is actually an unncessary indirection.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7033
302706 hyperv: Get rid of hv_device, which is unnecessary indirection.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7034 |
307303 |
14-Oct-2016 |
sephe |
MFC 302632-302634
302632 hyperv/vmbus: More verbose for GPADL_connect/chan_{rescind,offer}
Reviewed by: Dexuan Cui <decui microsoft com>, Hongjiang Zhang <honzhan microsoft com> Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6976
302633 hyperv/vmbus: Free sysctl properly upon channel close.
Prepare for sub-channel re-open.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6977
302634 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.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6978 |
307291 |
14-Oct-2016 |
sephe |
MFC 302543-302545,302547,302549,302554,302556,302557,302559,302606
302543 hyperv/vmbus: Use post message Hypercall APIs for channel request
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6831
302544 hyperv/hn: Add tunable to allow tcp_lro_queue_mbuf()
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6841
302545 hyperv/vmbus: Function renaming.
And pass vmbus_softc to vmbus_doattach()
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6842
302547 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.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6858
302549 hyperv/vmbus: Add sysctl to expose vmbus version.
Requested by: Hongxiong Xian <v-hoxian microsoft com> Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6860
302554 hyperv/vmbus: Use post message Hypercall APIs for unload
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6861
302556 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.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6862
302557 hyperv/vmbus: Save vmbus softc to channels.
So that we don't need to access the global vmbus softc.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6863
302559 hyperv/vmbus: Embed channel detach task in channel itself.
GC work queue stuffs.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6864
302606 hyperv/vmbus: Reorganize vmbus scan process.
Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6875 |
296379 |
04-Mar-2016 |
sephe |
hyperv/hn: Add multiple channel support, a.k.a. vRSS
Each channel contains one RX ring and one TX ring. And we try to distribute the channels to different evenly.
Note: Currently we don't have enough information to extract the RSS type and RSS hash value from the received packets.
This greatly improves the TX/RX performance for 8 virtual CPU Hyper-V over 10Ge: it can max out 10Ge for TCP when multiple RX/TX rings are enabled.
This almost doubles the TX/RX performance for locally connected Hyper-Vs: was 6Gbps w/ 128 TCP streams, now 11Gbps w/ multiple RX/TX rings enabled.
It is not enabled by default; it will be switched on after more tests.
Collaborated with: Hongjiang Zhang <honzhan microsoft com> MFC after: 2 week Sponsored by: Microsoft OSTC
|
295958 |
24-Feb-2016 |
sephe |
hyperv/utils: Code rearrange and cleanup
Split heartbeat, shutdown and timesync out of utils code and name them properly.
Submitted by: Jun Su <junsu microsoft com> Reviewed by: adrian, sephe, Hongjiang Zhang <honzhan microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5216
|
295307 |
05-Feb-2016 |
sephe |
hyperv: Use standard taskqueue instead of hv_work_queue
HyperV code was ported from Linux. There is an implementation of work queue called hv_work_queue. In FreeBSD, taskqueue could be used for the same purpose. Convert all the consumer of hv_work_queue to use taskqueue, and remove work queue implementation.
Submitted by: Jun Su <junsu microsoft com> Reviewed by: adrian, Hongjiang Zhang <honzhan microsoft com> Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4963
|
294886 |
27-Jan-2016 |
sephe |
hyperv/vmbus: Event handling code refactor.
- Use taskqueue instead of swi for event handling. - Scan the interrupt flags in filter - Disable ringbuffer interrupt mask in filter to ensure no unnecessary interrupts.
Submitted by: Jun Su <junsu microsoft com> Reviewed by: adrian, sephe, Dexuan <decui microsoft com> Approved by: adrian (mentor) MFC after: 2 weeks Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4920
|
292859 |
29-Dec-2015 |
delphij |
hyperv: vmbus: remove the per-channel control_work_queue
Now vmbus_channel_on_offer() -> vmbus_channel_process_offer() can safely run on the global hv_vmbus_g_connection.work_queue now.
We remove the per-channel control_work_queue to achieve the proper serialization of the message handling.
I removed the bogus TODO in vmbus_channel_on_offer(): a vmbus offer can only come from the parent partition, i.e., the host.
PR: kern/205156 Submitted by: Dexuan Cui <decui microsoft com> Reviewed by: Howard Su <howard0su gmail com>, delphij MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D4597
|
282212 |
29-Apr-2015 |
whu |
Microsoft vmbus, storage and other related driver enhancements for HyperV. - Vmbus multi channel support. - Vector interrupt support. - Signal optimization. - Storvsc driver performance improvement. - Scatter and gather support for storvsc driver. - Minor bug fix for KVP driver. Thanks royger, jhb and delphij from FreeBSD community for the reviews and comments. Also thanks Hovy Xu from NetApp for the contributions to the storvsc driver.
PR: 195238 Submitted by: whu Reviewed by: royger, jhb, delphij Approved by: royger MFC after: 2 weeks Relnotes: yes Sponsored by: Microsoft OSTC
|
271493 |
13-Sep-2014 |
delphij |
Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft, many thanks for their continued support of FreeBSD.
While I'm there, also implement a new build knob, WITHOUT_HYPERV to disable building and installing of the HyperV utilities when necessary.
The HyperV utilities are only built for i386 and amd64 targets.
This is a stable/10 candidate for inclusion with 10.1-RELEASE.
Submitted by: Wei Hu <weh microsoft com> MFC after: 1 week
|