summaryrefslogtreecommitdiff
path: root/sys/dev/hyperv/include
Commit message (Collapse)AuthorAgeFilesLines
* HyperV socket implementation for FreeBSDWei Hu2020-05-201-2/+29
| | | | | | | | | | | | | | This change adds Hyper-V socket feature in FreeBSD. New socket address family AF_HYPERV and its kernel support are added. Submitted by: Wei Hu <weh@microsoft.com> Reviewed by: Dexuan Cui <decui@microsoft.com> Relnotes: yes Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D24061 Notes: svn path=/head/; revision=361275
* hyperv/vmbus: Update VMBus version 4.0 and 5.0 support.Wei Hu2019-07-092-0/+9
| | | | | | | | | | | | | Add VMBus protocol version 4.0. and 5.0 to support Windows 10 and newer HyperV hosts. For VMBus 4.0 and newer HyperV, the netvsc gpadl teardown must be done after vmbus close. Submitted by: whu MFC after: 2 weeks Sponsored by: Microsoft Notes: svn path=/head/; revision=349856
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326255
* hyperv/vmbus: Expose Hyper-V major version.Sepherosa Ziehau2017-10-101-0/+1
| | | | | | | | MFC after: 3 days Sponsored by: Microsoft Notes: svn path=/head/; revision=324488
* hyperv: Update copyright for the files changed in 2017Sepherosa Ziehau2017-08-141-1/+1
| | | | | | | | | MFC after: 3 days Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11982 Notes: svn path=/head/; revision=322488
* hyperv: Add method to read 64bit Hyper-V specific time value.Sepherosa Ziehau2017-01-091-2/+10
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9057 Notes: svn path=/head/; revision=311743
* hyperv: Allow userland to ro-mmap reference TSC pageSepherosa Ziehau2016-12-151-5/+26
| | | | | | | | | | | | This paves way to implement VDSO for the enlightened time counter. Reviewed by: kib MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8768 Notes: svn path=/head/; revision=310101
* hyperv: Implement "enlightened" time counter, which is rdtsc based.Sepherosa Ziehau2016-12-141-0/+1
| | | | | | | | | | Reviewed by: kib MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8763 Notes: svn path=/head/; revision=310048
* hyperv/vmbus: Add channel polling support.Sepherosa Ziehau2016-12-121-0/+7
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8738 Notes: svn path=/head/; revision=309874
* hyperv/timesync: Support "sent TC" to improve accuracy.Sepherosa Ziehau2016-12-081-0/+19
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8723 Notes: svn path=/head/; revision=309705
* hyperv/vmbus: Add result polling support for xact API.Sepherosa Ziehau2016-11-281-0/+2
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8633 Notes: svn path=/head/; revision=309240
* hyperv/vmbus: Add supportive transaction wait function.Sepherosa Ziehau2016-11-281-0/+3
| | | | | | | | | | | This function supports channel revocation properly. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8611 Notes: svn path=/head/; revision=309225
* hyperv/vmbus: Add a simplified version of channel close.Sepherosa Ziehau2016-11-251-0/+20
| | | | | | | | | | | So that the caller can know the channel close error and react accordingly. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8600 Notes: svn path=/head/; revision=309140
* hyperv/vmbus: Return EISCONN if the bufring GPADL can't be disconnected.Sepherosa Ziehau2016-11-251-0/+11
| | | | | | | | | | | | So that the callers of vmbus_chan_open_br() could handle the passed in bufring memory properly. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8569 Notes: svn path=/head/; revision=309135
* hyperv/vmbus: Fix the primary channel revoking on vmbus side.Sepherosa Ziehau2016-11-241-0/+4
| | | | | | | | | | | | | 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. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8545 Notes: svn path=/head/; revision=309081
* hyperv/vmbus: Implement orphan support for transaction APISepherosa Ziehau2016-11-241-0/+2
| | | | | | | | | | | It will be used to fix the primary channel revocation support. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8525 Notes: svn path=/head/; revision=309080
* hyperv/vmbus: Set a mark on the revoked channel.Sepherosa Ziehau2016-11-231-0/+1
| | | | | | | | | | | | This will be used to fix device detach DEVMETHOD for revoked primary channel. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8522 Notes: svn path=/head/; revision=309030
* hyperv/vmbus: Support transction result busy-wait.Sepherosa Ziehau2016-11-211-0/+2
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8488 Notes: svn path=/head/; revision=308906
* hyperv: GC unused functions.Sepherosa Ziehau2016-11-022-13/+0
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8406 Notes: svn path=/head/; revision=308194
* hyperv/vmbus: Expose channel management taskqueue for driver to use.Sepherosa Ziehau2016-10-191-0/+3
| | | | | | | | MFC after: 3 days Sponsored by: Microsoft Notes: svn path=/head/; revision=307624
* hyperv/vmbus: Allow driver to inject synchronous task into channel taskq.Sepherosa Ziehau2016-10-111-0/+3
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8208 Notes: svn path=/head/; revision=307012
* hyperv/vmbus: Add function to drain channel interrupt task.Sepherosa Ziehau2016-09-281-0/+1
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8045 Notes: svn path=/head/; revision=306389
* hyperv/vmbus: Add functions to test RX/TX bufring emptinessSepherosa Ziehau2016-09-281-0/+2
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8044 Notes: svn path=/head/; revision=306387
* hyperv/vmbus: Allow bufrings preallocation.Sepherosa Ziehau2016-09-211-0/+10
| | | | | | | | | | | | | | | 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. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7960 Notes: svn path=/head/; revision=306072
* hyperv/vmbus: Add function to calculate max # of elements in a bufring.Sepherosa Ziehau2016-08-251-0/+2
| | | | | | | | MFC after: 1 week Sponsored by: Microsoft Notes: svn path=/head/; revision=304790
* hyperv/hn: Factor out hn_nvs_send/hn_nvs_send_sglistSepherosa Ziehau2016-08-161-0/+1
| | | | | | | | | | | | Avoid unnecessary message type setting and centralize the send context to transaction id cast. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7500 Notes: svn path=/head/; revision=304204
* hyperv/vmbus: Use xact APIs to implement post message Hypercall APIsSepherosa Ziehau2016-08-111-1/+6
| | | | | | | | | | | Avoid code duplication. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7458 Notes: svn path=/head/; revision=303949
* hyperv/vmbus: Add APIs for various types of transactions.Sepherosa Ziehau2016-08-111-0/+54
| | | | | | | | | | Reviewed by: Jun Su <junsu microsoft com> MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7456 Notes: svn path=/head/; revision=303947
* hyperv/vmbus: Add macro to get channel packet data length.Sepherosa Ziehau2016-08-111-0/+5
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7455 Notes: svn path=/head/; revision=303945
* hyperv/vmbus: Remove the artificial entry limit of SG and PRP list.Sepherosa Ziehau2016-08-011-3/+0
| | | | | | | | | | | | Just make sure that the total channel packet size does not exceed 1/2 data size of the TX bufring. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7359 Notes: svn path=/head/; revision=303603
* hyperv/vmbus: Reindent function declarations.Sepherosa Ziehau2016-07-293-43/+45
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7344 Notes: svn path=/head/; revision=303470
* hyperv/vmbus: Inclusion cleanupSepherosa Ziehau2016-07-282-26/+5
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7334 Notes: svn path=/head/; revision=303422
* hyperv: hv_vmbus_channel -> vmbus_channelSepherosa Ziehau2016-07-211-25/+25
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7260 Notes: svn path=/head/; revision=303131
* hyperv/vmbus: Shuffle function declaration and macro definition.Sepherosa Ziehau2016-07-212-25/+23
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7259 Notes: svn path=/head/; revision=303129
* hyperv/vmbus: Hide channel struct definition.Sepherosa Ziehau2016-07-202-114/+9
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7245 Notes: svn path=/head/; revision=303071
* hyperv/vmbus: Deprecate the device private data in channel structSepherosa Ziehau2016-07-201-7/+0
| | | | | | | | | | | They are neither flexible nor extensible. MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7244 Notes: svn path=/head/; revision=303070
* hyperv/vmbus: Pass channel as the first argument for channel callbackSepherosa Ziehau2016-07-201-1/+3
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=303069
* hyperv/vmbus: Channel struct field renameSepherosa Ziehau2016-07-201-8/+8
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7242 Notes: svn path=/head/; revision=303068
* hyperv/vmbus: Move IC register definition to Hyper-V utilitiesSepherosa Ziehau2016-07-201-59/+0
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7241 Notes: svn path=/head/; revision=303067
* hyperv/vmbus: Get rid of unnecessary definition.Sepherosa Ziehau2016-07-201-4/+0
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7240 Notes: svn path=/head/; revision=303066
* hyperv/vmbus: Function renameSepherosa Ziehau2016-07-192-14/+6
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7230 Notes: svn path=/head/; revision=303021
* hyperv/vmbus: Cleanup cpu based channel selection.Sepherosa Ziehau2016-07-192-3/+2
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=303020
* hyperv/vmbus: Cosmetic vmbus channel open cleanupSepherosa Ziehau2016-07-181-9/+3
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7217 Notes: svn path=/head/; revision=302986
* hyperv/vmbus: Function renameSepherosa Ziehau2016-07-152-14/+14
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7212 Notes: svn path=/head/; revision=302890
* hyperv/vmbus: Back out r302888 temporarilySepherosa Ziehau2016-07-152-14/+14
| | | | | | | | | | Committed by accident w/ duplicated commit log MFC after: 1 week Sponsored by: Microsoft OSTC Notes: svn path=/head/; revision=302889
* hyperv/hn: Busdma-fy rxbuf and chimney sending bufferSepherosa Ziehau2016-07-152-14/+14
| | | | | | | | | | | Nuke unused channel GPADL API. MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7211 Notes: svn path=/head/; revision=302888
* hyperv/hn: Busdma-fy rxbuf and chimney sending bufferSepherosa Ziehau2016-07-151-8/+0
| | | | | | | | | | | Nuke unused channel GPADL API. MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7211 Notes: svn path=/head/; revision=302887
* hyperv/vmbus: Cleanup channel packet receiving.Sepherosa Ziehau2016-07-152-29/+32
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7204 Notes: svn path=/head/; revision=302886
* hyperv/vmbus: Cleanup channel receiving.Sepherosa Ziehau2016-07-152-7/+3
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7202 Notes: svn path=/head/; revision=302885
* hyperv/vmbus: Function renameSepherosa Ziehau2016-07-152-8/+2
| | | | | | | | | | | And reorder the error prone parameters list. MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7191 Notes: svn path=/head/; revision=302882