Commit Graph

18 Commits

Author SHA1 Message Date
Sepherosa Ziehau
14c9deb6f9 MFC 301017,301018,301019,301020,301021,301022,301106
301017
    hyperv/vmbus: Indentation cleanup

    No functional changes.

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

301018
    hyperv/vmbus: Move global vmbus id array to stack.

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

301019
    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

301020
    hyperv/vmbus: White space cleanup

    No functional changes

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

301021
    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

301022
    hyperv/kvp: Use if_xname.

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

301106
    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-24 01:49:59 +00:00
Sepherosa Ziehau
4a26ada395 MFC 298446
hyperv: Update copyright to 2016 for the files Microsoft changed in 2016

    Sponsored by:       Microsoft OSTC
    Differential Revision:      https://reviews.freebsd.org/D6039
2016-06-21 05:20:41 +00:00
Sepherosa Ziehau
b774f5de06 MFC 297220
hyperv/utils: Allow hint to disable individual utility

    Reviewed by:        kib, Dexuan Cui <decui microsoft com>
    MFC after:  1 week
    Sponsored by:       Microsoft OSTC
    Differential Revision:      https://reviews.freebsd.org/D5714
2016-06-16 03:25:26 +00:00
Sepherosa Ziehau
9b2d0feeca MFC 297142,297143,297176,297177,297178,297221
297142
    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

297143
    hyperv/vmbus: Implement bus_child_pnpinfo_str method

    Submitted by:       Jun Su <junsu microsoft com>
    Sponsored by:       Microsoft OSTC
    Differential Revision:      https://reviews.freebsd.org/D5669

297176
    hyperv/evttimer: Use an independent message slot so that it can work

    Using the same message slot as the other types of the messages has
    the side effect that the event timer message could be deferred to
    the swi threads to run (lacking of trapframe and the original code
    didn't even handle that, so the event timer was actually broken).

    As of this commit we use an independent message slot for event timer,
    so that we could handle all of event timer messages in the interrupt
    handler directly.  Note, the message slot for event timer is still
    bind to the same interrupt vector as the other types of messages.

    Submitted by:       Jun Su <junsu microsoft com>
    Reviewed by:        sephe
    Discussed with: Jun Su <junsu microsoft com>, Dexuan Cui <decui microsoft com>
    MFC after:  1 week
    Sponsored by:       Microsoft OSTC
    Differential Revision:      https://reviews.freebsd.org/D5696

297177
    hyperv/vmbus: Use taskqueue_fast for non-performance critical messages

    This gets rid of the per-cpu SWIs.

    Submitted by:       Jun Su <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/D5215

297178
    hyperv/vmbus: Remove NULL check for taskqueue_create_fast(M_WAITOK)

    Submitted by:       Jun Su <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/D5215

297221
    hyperv/vmbus: Create per-cpu fast taskqueue for msg handling

    Using one taskqueue does not work, since the EOM MSR must be written
    on the msg's owner CPU.

    Noticed by: Jun Su <junsu microsoft com>
    Discussed with:     Jun Su <junsu microsoft com>, Dexuan Cui <decui microsoft com>
    MFC after:  1 week
    Sponsored by:       Microsoft OSTC
2016-06-16 03:04:16 +00:00
Sepherosa Ziehau
05702e645d MFC 295919,295958,295964
295919
    hyperv/stor: Fix print format

    Detected by:        PVS Static Analysis
    MFC after:  1 week
    Sponsored by:       Microsoft OSTC
    Differential Revision:      https://reviews.freebsd.org/D5388

295958
    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

295964
    hyperv/vmbus: Use free(9) for interrupt page; it is allocated by malloc(9)

    MFC after:  1 week
    Sponsored by:       Microsoft OSTC
    Differential Revision:      https://reviews.freebsd.org/D5417
2016-06-13 09:02:08 +00:00
Sepherosa Ziehau
9decf019b5 MFC 295307,295308,295309,295606
295307
    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

295308
    hyperv: Use WAITOK in the places where we can wait

    And convert rndis non-hot path spinlock to mutex.

    Submitted by:       Jun Su <junsu microsoft com>
    Reviewed by:        adrian, sephe
    Approved by:        adrian (mentor)
    MFC after:  1 week
    Sponsored by:       Microsoft OSTC
    Differential Revision:      https://reviews.freebsd.org/D5081

295309
    hyperv: Use malloc for page allocation.

    We will eventually convert them to use busdma.

    Submitted by:       Jun Su <junsu microsoft com>
    Reviewed by:        adrian, sephe, Dexuan Cui <decui microsoft com>
    Approved by:        adrian (mentor)
    MFC after:  1 week
    Sponsored by:       Microsoft OSTC
    Differential Revision:      https://reviews.freebsd.org/D5087

295606
    hyperv/hn: Fix typo in comment

    Noticed by: avos
    Reviewed by:        adrian, avos, Hongjiang Zhang <honzhan microsoft com>
    Approved by:        adrian
    MFC after:  1 week
    Sponsored by:       Microsoft OSTC
    Differential Revision:      https://reviews.freebsd.org/D5199
2016-06-13 06:38:46 +00:00
Roger Pau Monné
fcdc2fd7ce MFC r292258:
hyperv/kvp: wake up the daemon if it's sleeping due to poll()

Submitted by:           Dexuan Cui <decui@microsoft.com>
Sponsored by:		Microsoft OSTC
2015-12-18 14:52:12 +00:00
Wei Hu
e2e50e87ae MFC r282212:
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
Approved by:    royger
Relnotes:       yes
Sponsored by:   Microsoft OSTC
Differential Revision:  https://reviews.freebsd.org/D2575
2015-05-22 09:03:55 +00:00
Xin LI
90ab6e6584 MFC r273577:
Return BUS_PROBE_DEFAULT instead of BUS_PROBE_VENDOR or 0 for in-tree
driver.  This change was verified by Microsoft.

Instant MFC approved by:	re (kib)
2014-10-24 07:06:01 +00:00
Xin LI
7d4c989458 MFC r271493,271688-271689,271696,271854,272139-272143:
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.

Approved by:	re (gjb)
2014-09-30 17:54:57 +00:00
Glen Barber
0e9f75ffb3 Properly revert r272128.
Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2014-09-26 03:03:58 +00:00
Glen Barber
e65be82a9c Revert r272149, which introduces obscure vestiges from the
r272128 reversal.

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2014-09-26 02:30:47 +00:00
Glen Barber
de7ab04350 Revert r272128:
Though this passes the buildworld test, this fails during
  installworld with:

  make[3]: "/releng/scripts-release/chroots/10/i386/release/etc/devd/Makefile"
  line 13: Malformed conditional (${MK_HYPERV} != "no")

Approved by:	re (implicit)
Sponsored by:	The FreeBSD Foundation
2014-09-26 01:08:31 +00:00
Xin LI
ef3e75da65 MFC r271493,271688,271689,271696,271854:
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.

Approved by:	re (gjb)
2014-09-25 20:34:13 +00:00
Peter Grehan
2ee2dc6fd6 Revert the kvp code - there's still some work that
needs to be done for that.

Discussed with:	Microsoft hyper-v devs
2013-09-09 19:27:44 +00:00
Peter Grehan
d940bfec8c Latest update from Microsoft.
Obtained from:	Microsoft Hyper-v dev team
2013-09-09 08:07:46 +00:00
Peter Grehan
672ed870a7 IFC @ r253862
- change the SI_SUB_RUN_SCHEDULER sysinits in hv_utilc and
hv_netvsc_drv_freebsd.c to SI_SUB_KTHREAD_IDLE, since the
former is no longer in FreeBSD.
  The use of these SYSINITs can probably be removed.
2013-08-01 22:09:57 +00:00
Peter Grehan
cc759c1995 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.
2013-07-17 06:30:23 +00:00