summaryrefslogtreecommitdiff
path: root/sys/dev/hyperv/include
AgeCommit message (Collapse)Author
2023-08-16sys: Remove $FreeBSD$: two-line .h patternWarner Losh
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2023-06-06Switch to contigmalloc in the Hyper-V codeAndrew Turner
In the Hyper-V drivers we need to allocate buffers shared between the host and guest. This memory has been allocated with bus_dma, however it doesn't use this correctly, e.g. it is missing calls to bus_dmamap_sync. Along with this on arm64 we need this memory to be mapped with the correct memory type that bus_dma may not use. Switch to contigmalloc to allocate this memory as this will correctly allocate cacheable memory. Reviewed by: Souradeep Chakrabarti <schakrabarti@microsoft.com> Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D40227
2023-05-12spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
2022-10-27arm64: Hyper-V: enablement for ARM64 in Hyper-V (Part 3, final)Souradeep Chakrabarti
This is the last part for ARM64 Hyper-V enablement. This includes commone files and make file changes to enable the ARM64 FreeBSD guest on Hyper-V. With this patch, it should be able to build the ARM64 image and install it on Hyper-V. Reviewed by: emaste, andrew, whu Tested by: Souradeep Chakrabarti <schakrabarti@microsoft.com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D36744
2022-09-04hyperv: Remove a double word in a source code commentGordon Bergling
- s/the the/the/ MFC after: 3 days
2020-05-20HyperV socket implementation for FreeBSDWei Hu
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
2019-07-09hyperv/vmbus: Update VMBus version 4.0 and 5.0 support.Wei Hu
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
2017-11-27sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni
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
2017-10-10hyperv/vmbus: Expose Hyper-V major version.Sepherosa Ziehau
MFC after: 3 days Sponsored by: Microsoft Notes: svn path=/head/; revision=324488
2017-08-14hyperv: Update copyright for the files changed in 2017Sepherosa Ziehau
MFC after: 3 days Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D11982 Notes: svn path=/head/; revision=322488
2017-01-09hyperv: Add method to read 64bit Hyper-V specific time value.Sepherosa Ziehau
MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D9057 Notes: svn path=/head/; revision=311743
2016-12-15hyperv: Allow userland to ro-mmap reference TSC pageSepherosa Ziehau
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
2016-12-14hyperv: Implement "enlightened" time counter, which is rdtsc based.Sepherosa Ziehau
Reviewed by: kib MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8763 Notes: svn path=/head/; revision=310048
2016-12-12hyperv/vmbus: Add channel polling support.Sepherosa Ziehau
MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8738 Notes: svn path=/head/; revision=309874
2016-12-08hyperv/timesync: Support "sent TC" to improve accuracy.Sepherosa Ziehau
MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8723 Notes: svn path=/head/; revision=309705
2016-11-28hyperv/vmbus: Add result polling support for xact API.Sepherosa Ziehau
MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8633 Notes: svn path=/head/; revision=309240
2016-11-28hyperv/vmbus: Add supportive transaction wait function.Sepherosa Ziehau
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
2016-11-25hyperv/vmbus: Add a simplified version of channel close.Sepherosa Ziehau
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
2016-11-25hyperv/vmbus: Return EISCONN if the bufring GPADL can't be disconnected.Sepherosa Ziehau
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
2016-11-24hyperv/vmbus: Fix the primary channel revoking on vmbus side.Sepherosa Ziehau
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
2016-11-24hyperv/vmbus: Implement orphan support for transaction APISepherosa Ziehau
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
2016-11-23hyperv/vmbus: Set a mark on the revoked channel.Sepherosa Ziehau
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
2016-11-21hyperv/vmbus: Support transction result busy-wait.Sepherosa Ziehau
MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8488 Notes: svn path=/head/; revision=308906
2016-11-02hyperv: GC unused functions.Sepherosa Ziehau
MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8406 Notes: svn path=/head/; revision=308194
2016-10-19hyperv/vmbus: Expose channel management taskqueue for driver to use.Sepherosa Ziehau
MFC after: 3 days Sponsored by: Microsoft Notes: svn path=/head/; revision=307624
2016-10-11hyperv/vmbus: Allow driver to inject synchronous task into channel taskq.Sepherosa Ziehau
MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8208 Notes: svn path=/head/; revision=307012
2016-09-28hyperv/vmbus: Add function to drain channel interrupt task.Sepherosa Ziehau
MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8045 Notes: svn path=/head/; revision=306389
2016-09-28hyperv/vmbus: Add functions to test RX/TX bufring emptinessSepherosa Ziehau
MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8044 Notes: svn path=/head/; revision=306387
2016-09-21hyperv/vmbus: Allow bufrings preallocation.Sepherosa Ziehau
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
2016-08-25hyperv/vmbus: Add function to calculate max # of elements in a bufring.Sepherosa Ziehau
MFC after: 1 week Sponsored by: Microsoft Notes: svn path=/head/; revision=304790
2016-08-16hyperv/hn: Factor out hn_nvs_send/hn_nvs_send_sglistSepherosa Ziehau
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
2016-08-11hyperv/vmbus: Use xact APIs to implement post message Hypercall APIsSepherosa Ziehau
Avoid code duplication. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7458 Notes: svn path=/head/; revision=303949
2016-08-11hyperv/vmbus: Add APIs for various types of transactions.Sepherosa Ziehau
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
2016-08-11hyperv/vmbus: Add macro to get channel packet data length.Sepherosa Ziehau
MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7455 Notes: svn path=/head/; revision=303945
2016-08-01hyperv/vmbus: Remove the artificial entry limit of SG and PRP list.Sepherosa Ziehau
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
2016-07-29hyperv/vmbus: Reindent function declarations.Sepherosa Ziehau
MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7344 Notes: svn path=/head/; revision=303470
2016-07-28hyperv/vmbus: Inclusion cleanupSepherosa Ziehau
MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7334 Notes: svn path=/head/; revision=303422
2016-07-21hyperv: hv_vmbus_channel -> vmbus_channelSepherosa Ziehau
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7260 Notes: svn path=/head/; revision=303131
2016-07-21hyperv/vmbus: Shuffle function declaration and macro definition.Sepherosa Ziehau
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7259 Notes: svn path=/head/; revision=303129
2016-07-20hyperv/vmbus: Hide channel struct definition.Sepherosa Ziehau
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7245 Notes: svn path=/head/; revision=303071
2016-07-20hyperv/vmbus: Deprecate the device private data in channel structSepherosa Ziehau
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
2016-07-20hyperv/vmbus: Pass channel as the first argument for channel callbackSepherosa Ziehau
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
2016-07-20hyperv/vmbus: Channel struct field renameSepherosa Ziehau
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7242 Notes: svn path=/head/; revision=303068
2016-07-20hyperv/vmbus: Move IC register definition to Hyper-V utilitiesSepherosa Ziehau
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7241 Notes: svn path=/head/; revision=303067
2016-07-20hyperv/vmbus: Get rid of unnecessary definition.Sepherosa Ziehau
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7240 Notes: svn path=/head/; revision=303066
2016-07-19hyperv/vmbus: Function renameSepherosa Ziehau
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7230 Notes: svn path=/head/; revision=303021
2016-07-19hyperv/vmbus: Cleanup cpu based channel selection.Sepherosa Ziehau
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
2016-07-18hyperv/vmbus: Cosmetic vmbus channel open cleanupSepherosa Ziehau
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7217 Notes: svn path=/head/; revision=302986
2016-07-15hyperv/vmbus: Function renameSepherosa Ziehau
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7212 Notes: svn path=/head/; revision=302890
2016-07-15hyperv/vmbus: Back out r302888 temporarilySepherosa Ziehau
Committed by accident w/ duplicated commit log MFC after: 1 week Sponsored by: Microsoft OSTC Notes: svn path=/head/; revision=302889