History log of /freebsd-11-stable/sys/dev/hyperv/include/hyperv.h
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 331722 29-Mar-2018 eadler

Revert r330897:

This was intended to be a non-functional change. It wasn't. The commit
message was thus wrong. In addition it broke arm, and merged crypto
related code.

Revert with prejudice.

This revert skips files touched in r316370 since that commit was since
MFCed. This revert also skips files that require $FreeBSD$ property
changes.

Thank you to those who helped me get out of this mess including but not
limited to gonzo, kevans, rgrimes.

Requested by: gjb (re)


# 330897 14-Mar-2018 eadler

Partial merge of the SPDX changes

These changes are incomplete but are making it difficult
to determine what other changes can/should be merged.

No objections from: pfg


# 324577 13-Oct-2017 sephe

MFC 324488

hyperv/vmbus: Expose Hyper-V major version.

Sponsored by: Microsoft


# 322612 17-Aug-2017 sephe

MFC 322488
hyperv: Update copyright for the files changed in 2017

Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D11982


# 314003 21-Feb-2017 sephe

MFC 311743

hyperv: Add method to read 64bit Hyper-V specific time value.

Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D9057


# 311376 05-Jan-2017 sephe

MFC 310048,310101,310239

310048
hyperv: Implement "enlightened" time counter, which is rdtsc based.

Reviewed by: kib
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8763

310101
hyperv: Allow userland to ro-mmap reference TSC page

This paves way to implement VDSO for the enlightened time counter.

Reviewed by: kib
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8768

310239
hyperv: Implement userspace gettimeofday(2) with Hyper-V reference TSC

This 6 times gettimeofday performance, as measured by
tools/tools/syscall_timing

Reviewed by: kib
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8789


# 311373 05-Jan-2017 sephe

MFC 309705

hyperv/timesync: Support "sent TC" to improve accuracy.

Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8723


# 308634 13-Nov-2016 sephe

MFC 308194

hyperv: GC unused functions.

Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8406


# 307466 16-Oct-2016 sephe

MFC 303421,303422,303470-303473

303421
hyperv/vmbus: Avoid unnecessary mb()

Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7333

303422
hyperv/vmbus: Inclusion cleanup

Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7334

303470
hyperv/vmbus: Reindent function declarations.

Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7344

303471
hyperv/vmbus: Forward declare static functions

Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7346

303472
hyperv/vmbus: Move driver glue to the beginning of the files

Just as most of other drivers do. And move sysinit function close
to its SYSINIT.

Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7347

303473
hyperv/vmbus: Revoke unnecessary exposure of vmbus softc

Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7348


# 307461 16-Oct-2016 sephe

MFC 303066-303072,303127-303129,303131

303066
hyperv/vmbus: Get rid of unnecessary definition.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7240

303067
hyperv/vmbus: Move IC register definition to Hyper-V utilities

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7241

303068
hyperv/vmbus: Channel struct field rename

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7242

303069
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.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7243

303070
hyperv/vmbus: Deprecate the device private data in channel struct

They are neither flexible nor extensible.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7244

303071
hyperv/vmbus: Hide channel struct definition.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7245

303072
hyperv/vmbus: Save MNF trigger location instead of MNF trigger index.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7246

303127
hyperv/vmbus: Save event flag location and evet flag mask.

This avoids unnecessary access to the vmbus_softc struct on sending path.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7257

303128
hyperv/vmbus: Reorder channel fields.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7258

303129
hyperv/vmbus: Shuffle function declaration and macro definition.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7259

303131
hyperv: hv_vmbus_channel -> vmbus_channel

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7260


# 307459 16-Oct-2016 sephe

MFC 302888-302892,302986,303020-303022

302888
hyperv/hn: Busdma-fy rxbuf and chimney sending buffer

Nuke unused channel GPADL API.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7211

302889
hyperv/vmbus: Back out r302888 temporarily

Committed by accident w/ duplicated commit log

Sponsored by: Microsoft OSTC

302890
hyperv/vmbus: Function rename

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7212

302891
hyperv/vmbus: Cosmetic vmbus channel close cleanup

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7213

302892
hyperv/vmbus: Cleanup channel sysctl tree creation

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7214

302986
hyperv/vmbus: Cosmetic vmbus channel open cleanup

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7217

303020
hyperv/vmbus: Cleanup cpu based channel selection.

And create cpu to channel map at device attach time for storvsc(4).

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7229

303021
hyperv/vmbus: Function rename

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7230

303022
hyperv/vmbus: Temp/internal variable/function rename

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7231


# 307458 16-Oct-2016 sephe

MFC 302887

hyperv/hn: Busdma-fy rxbuf and chimney sending buffer

Nuke unused channel GPADL API.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7211


# 307457 16-Oct-2016 sephe

MFC 302885,302886

302885
hyperv/vmbus: Cleanup channel receiving.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7202

302886
hyperv/vmbus: Cleanup channel packet receiving.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7204


# 307456 16-Oct-2016 sephe

MFC 302882-302884

302882
hyperv/vmbus: Function rename

And reorder the error prone parameters list.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7191

302883
hyperv/vmbus: Field rename

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7193

302884
hyperv/vmbus: Factor out macros to do channel packet length conversion.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7194


# 307455 16-Oct-2016 sephe

MFC 302875,302876,302878-302881

302875
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.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7155

302876
hyperv/vmbus: Rework sglist sending.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7156

302878
hyeprv/vmbus: Rework prplist sending.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7175

302879
hyperv/vmbus: Move channel packet flags definition to vmbus.h

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7176

302880
hyperv/vmbus: Move channel packet types definition to vmbus.h

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7177

302881
hyperv/vmbus: Cleanup channel sending

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7178


# 307454 16-Oct-2016 sephe

MFC 302873,302874

302873
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.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7141

302874
hyperv/vmbus: Field rename

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7146


# 307453 16-Oct-2016 sephe

MFC 302871,302872

302871
hyperv/vmbus: Add vmbus_chan_gpadl_connect, which takes GPA physaddr

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7139

302872
hyperv/vmbus: Busdma-fy channel bufring.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7140


# 307451 16-Oct-2016 sephe

MFC 302864

hyperv/vmbus: Merge hv_channel_mgmt.c into hv_channel.c

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7126


# 307450 16-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


# 307449 16-Oct-2016 sephe

MFC 302808-302815

302808
hyperv/vmbus: Alloc/Free monitor param in vmbus channel alloc/free.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7101

302809
hyperv/vmbus: Move device register and channel free to the caller.

This paves the way for more cleanup/disentangle.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7102

302810
hyperv/vmbus: Move new channel scan notification to device register

And nuke now unnecessary function indirection.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7103

302811
hyperv/vmbus: Cleanup vmbus_chan_msgproc_choffer

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7104

302812
hyperv/vmbus: Nuke the channel open state.

Channel is either opened or not-opened.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7105

302813
hyperv/vmbus: Cleanup vmbus_chan_add()

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7106

302814
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.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7108

302815
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().

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7109


# 307448 16-Oct-2016 sephe

MFC 302733,302737,302801-302806

302733
hyperv/vmbus: Remove unused code

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7089

302737
hyperv/vmbus: Cleanup channel rescind

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7090

302801
hyperv/vmbus: Remove unused bits

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7091

302802
hyperv: hv_guid -> struct hyperv_guid.

This paves way for the further cleanup/disentangle.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7092

302803
hyperv/vmbus: Move channel offer message definition to vmbus_reg.h

- Avoid bit fields.
- Avoid unnecessary indirection.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7093

302804
hyperv/vmbus: Switch to vmbus channel message macros

Prepare for more cleanup.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7094

302805
hyperv/vmbus: Remove unused bits

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7095

302806
hyperv/vmbus: Get rid of rel{_id,id}, use channel id consistently.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7100


# 307310 14-Oct-2016 sephe

MFC 302723,302726,302731

302723
hyperv: All Hypercall parameters have same alignment requirement.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7086

302726
hyperv: Signal event input parameter is shared w/ MNF

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7087

302731
hyperv/vmbus: Reorganize MNF event sending.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7088


# 307308 14-Oct-2016 sephe

MFC 302707-302709

302707
hyperv/vmbus: Nuke unused field from hv_vmbus_channel.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7036

302708
hyperv/bufring: Remove unused fields

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7037

302709
hyperv/vmbus: Pack bool field into flags field

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7038


# 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


# 307306 14-Oct-2016 sephe

MFC 302693-302697

302693
hyperv/vmbus: Make channel id a field of hv_vmbus_channel.

This prepares to remove the unnecessary offer message embedding in
hv_vmbus_channel.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7014

302694
hyperv/vmbus: Make subchan index a field of hv_vmbus_channel.

This prepares to remove the unnecessary offer message embedding in
hv_vmbus_channel.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7015

302695
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.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7019

302696
hyperv/vmbus: Add type/instance guid fields into hv_vmbus_channel

This prepares to remove the unnecessary offer message embedding in
hv_vmbus_channel.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7020

302697
hyperv/vmbus: Remove the embedded offer message from hv_vmbus_channel

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7021


# 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


# 307302 14-Oct-2016 sephe

MFC 302617-302621,302623,302629-302631

302617
hyperv/vmbus: Flatten channel message response processing.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6914

302618
hyperv/vmbus: Avoid tx_evtflags setting code duplication.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6915

302619
hyperv/vmbus: Busdma-fy Hypercall signal event input parameter.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6916

302620
hyperv: Nuke unused stuffs

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6917

302621
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.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6918

302623
hyperv/vmbus: Minor renaming

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6919

302629
hyperv/vmbus: Rework vmbus version accessing.

Instead of global variable, vmbus version is accessed through
a vmbus DEVMETHOD now.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6953

302630
hyperv/vmbus: Move GPADL index into vmbus_softc

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6954

302631
hyperv/vmbus: Move channel list to vmbus_softc

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6956


# 307301 14-Oct-2016 sephe

MFC 302607-302612

302607
hyperv/vmbus: Use post message Hypercall APIs for channel open

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6876

302608
hyperv/vmbus: Remove unnecessary check and unapplied comment

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6877

302609
hyperv/vmbus: Use post message Hypercall APIs for GPADL connect.

This also fixes memory leakge if sub-connect messages are needed.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6878

302610
hyperv/vmbus: Use post message Hypercall APIs for channel close

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6906

302611
hyperv/vmbus: Use post message Hypercall APIs for GPA disconnect

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6912

302612
hyperv: Nuke unused stuffs

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6913


# 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


# 307278 14-Oct-2016 sephe

MFC 302540

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.

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6830


# 302408 07-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
# 301021 31-May-2016 sephe

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


# 298955 03-May-2016 pfg

sys/dev: minor spelling fixes.

Most affect comments, very few have user-visible effects.


# 298617 26-Apr-2016 sephe

hyperv/channel: Git rid of the sub-channel creation callback

It is no longer used.

MFC after: 1 week
Sponsored by: Microsoft OSTC


# 298574 25-Apr-2016 sephe

hyperv/channel: Add functions to synchronize sub-channel offers

MFC after: 1 week
Sponsored by: Microsoft OSTC


# 298446 22-Apr-2016 sephe

hyperv: Update copyright to 2016 for the files Microsoft changed in 2016

Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6039


# 297142 21-Mar-2016 sephe

hyperv: Factor out snprinf_hv_guid()

Submitted by: Ju Sun <junsu microsoft com>
Reviewed by: Dexuan Cui <decui microsoft com>, sephe
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5651


# 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


# 296296 02-Mar-2016 sephe

hyperv/hn: Make read buffer per-channel

Submitted by: Hongjiang Zhang <honzhan microsoft com>
Reorganized by: sephe
MFC after: 1 week
Sponsored by: Microsoft OSTC


# 296087 26-Feb-2016 sephe

hyperv/hn: Associate TX/RX ring with channel

This fixes the TX/RX ring selection for TX/RX done.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5454


# 296084 26-Feb-2016 sephe

hyperv: Always set device for channels

And unregister hv_device only for primary channels, who own the hv_device.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5451


# 296083 26-Feb-2016 sephe

hyperv: Remove useless channel inbound_lock

It serves no purpose.

Reviewed by: Hongjiang Zhang <honzhan microsoft com>
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5450


# 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


# 293871 14-Jan-2016 sephe

hyperv: remove unused vmbus definitions

We don't need them at all.

Submitted by: Dexuan Cui <decui microsoft com>
Sponsored by: Microsoft OSTC
Reviewed by: royger, adrian, delphij
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4595


# 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


# 284746 24-Jun-2015 whu

TSO and checksum offloading support for Netvsc driver on Hyper-V.

Submitted by: whu
Reviewed by: royger
Approved by: royger
MFC after: 1 week
Relnotes: yes
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D2517


# 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


# 256350 11-Oct-2013 grehan

Fix vmbus channel memory leak where incorrect length parameter was
being passed to contigfree().

Submitted by: Microsoft hyperv dev team
Approved by: re@ (glebius)


# 255524 13-Sep-2013 grehan

Import Hyper-V paravirtualized drivers from projects/hyperv
branch into head.

Approved by: re@ (hrs)
Obtained from: Microsoft, NetApp, and Citrix.


# 253411 17-Jul-2013 grehan

Microsoft have changed their policy on how the hyper-v code will
be pulled into FreeBSD. From now, FreeBSD will be considered the
upstream repo.

First step: move the drivers away from the contrib area and into
the base system.

A follow-on commit will include the drivers in the amd64 GENERIC kernel.


# 251775 15-Jun-2013 grehan

Import driver source from hyperv-20130502 vendor branch.


# 250200 03-May-2013 grehan

Tag hyperv 20130502


# 250199 03-May-2013 grehan

Initial import of the Microsoft HyperV 'enlightened' drivers.

From https://github.com/FreeBSDonHyper-V/VendorBranchForFreeBSDonHyper-V
rev: 99eaa0ddb0485c9d76046664100f6beb1a0a0c58