History log of /freebsd-10-stable/sys/dev/hyperv/vmbus/vmbus_var.h
Revision Date Author Comments
# 311257 04-Jan-2017 sephe

MFC 310651

hyperv/vmbus: Nuke unnecessary critical sections.

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


# 310761 29-Dec-2016 sephe

MFC 309240,309242,309244,309245,309319,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

309319
hypver/vmbus: Remove extra assertion.

It is asserted by vmbus_chan_gpadl_connect() now.

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

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


# 309313 29-Nov-2016 dexuan

MFC: 308723-308725,308793-308795,309127

Approved by: sephe (mentor)

r308723
hyperv/vmbus: add a new method to get vcpu_id

vcpu_id is host's representation of guest CPU.
We get the mapping between vcpu_id and FreeBSD kernel's cpu id when VMBus
driver is loaded. Later, when a driver, like the coming pcib driver, talks
to the host and needs to refer to a guest CPU, the driver must use the
vcpu_id.

Reviewed by: jhb, sephe
Approved by: sephe (mentor)
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8410

r308724
hyperv/vmbus: add new vmbus methods to support PCIe pass-through

The new methods will be used by the coming pcib driver.

Reviewed by: sephe
Approved by: sephe (mentor)
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8409

r308725
hyperv/pcib: enable PCIe pass-through (a.k.a. Discrete Device Assignment)

The feature enables us to pass through physical PCIe devices to FreeBSD VM
running on Hyper-V (Windows Server 2016) to get near-native performance with
low CPU utilization.

The patch implements a PCI bridge driver to support the feature:

1) The pcib driver talks to the host to discover device(s) and presents
the device(s) to FreeBSD's pci driver via PCI configuration space (note:
to access the configuration space, we don't use the standard I/O port
0xCF8/CFC method; instead, we use an MMIO-based method supplied by Hyper-V,
which is very similar to the 0xCF8/CFC method).

2) The pcib driver allocates resources for the device(s) and initialize
the related BARs, when the device driver's attach method is invoked;

3) The pcib driver talks to the host to create MSI/MSI-X interrupt
remapping between the guest and the host;

4) The pcib driver supports device hot add/remove.

Reviewed by: sephe
Approved by: sephe (mentor)
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8332

r308793
hyperv/pcib: Fix the build for some kernel configs

Add the dependency on pci explicitly for the pcib and vmbus drivers.
The related Makefiles are updated accordingly too.

Reviewed by: sephe
Approved by: sephe (mentor)
Sponsored by: Microsoft

r308794
hyperv/vmbus,pcib: Add MODULE_DEPEND on pci

We'd better add this dependency explicitly, though usually the pci
driver is built into the kernel by default.

Reviewed by: sephe
Approved by: sephe (mentor)
Sponsored by: Microsoft

r308795
hyperv/pcib: change the file name: pcib.c -> vmbus_pcib.c

This makes the file name and the variable naming in the file consistent.

Reviewed by: sephe
Approved by: sephe (mentor)
Sponsored by: Microsoft

r309127
hyperv/vmbus,pcib: unbreak build in case NEW_PCIB is undefined

vmbus_pcib requires NEW_PCIB, but in case that's not defined, we at
least shouldn't break build.

Reviewed by: sephe
Approved by: sephe (mentor)
Sponsored by: Microsoft


# 307249 13-Oct-2016 sephe

MFC 306360,306387,306389

306360
hyperv/vmbus: Add dynamic device add and remove support

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

306387
hyperv/vmbus: Add functions to test RX/TX bufring emptiness

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

306389
hyperv/vmbus: Add function to drain channel interrupt task.

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


# 307164 12-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


# 307133 12-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


# 307096 11-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


# 307031 11-Oct-2016 sephe

MFC 302867-302870

302867
hyperv/vmbus: Remove unused struct

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

302868
hyperv/vmbus: Function rename

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

302869
hyperv/vmbus: Remove unused function definition/declaration.

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

302870
hyperv/vmbus: Use iovec for bufring scatter/gather list.

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


# 307029 11-Oct-2016 sephe

MFC 302819,302823

302819
hyperv/vmbus: Sub-channel related fields renaming

And reorganize comment.

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

302823
hyperv/vmbus: Move bus related message processing into vmbus.

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


# 307028 11-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


# 307025 11-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


# 307020 11-Oct-2016 sephe

MFC 302636-302638,302692

302636
hyperv/vmbus: Move channel map to vmbus_softc

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

302637
hyperv/vmbus: Remove needed bits

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

302638
hyperv/vmbus: Destroy channel list lock upon attach failure and detach.

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

302692
hyperv/vmbus: Merge hv_connection.c into hv_channel.c

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


# 307018 11-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.

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


# 307017 11-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


# 307016 11-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

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


# 307014 10-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


# 302170 24-Jun-2016 sephe

MFC 301483,301484,301487,301488,301583,301588

301483
hyperv: Move machine dependent bits into machine dependent files.

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

301484
hyperv/vmbus: Define type for channel messages.

And fix message processing; only channel messages are supported.

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

301487
hyperv/vmbus: Factor out channel message processing

This paves the way for further cleanup.

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

301488
hyperv/vmbus: Constify channel message

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

301583
hyperv/vmbus: Busdma-fy MNF and event flags.

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

301588
hyperv/vmbus: Change tx_evtflags type to u_long to match vmbus_evtflags

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


# 302166 24-Jun-2016 sephe

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


# 302165 23-Jun-2016 sephe

MFC 301015

hyperv/vmbus: Rename ISR functions

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


# 302135 23-Jun-2016 sephe

MFC 300987,300988,300989,300992,300993,300994,301009

300987
hyperv/et: Fix STIMER0 operations.

- Make sure that STIMER0 is disabled before writting to it, since
writing to an enabled STIMER will result in undefined behaviour.
- It is unnecessary to reconfigure STIMER0 upon each et_start().
- Make sure that MSR_HV_REF_TIME_COUNT will not return 0, since
writing 0 to STIMER_COUNT will disable the target STIMER.

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

300988
hyperv/vmbus: Move SINT settings to vmbus_var.h

While I'm here remove the event timer's dependency on hv_vmbus_priv.h

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

300989
hyperv/et: Make sure only one event timer will be registered

This nullifies the need to use softc.

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

300992
hyperv: Move timer frequency definition to common place.

And cleanup event timer period settings.

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

300993
hyperv/et: Device renaming; consistent w/ other Hyper-V utils

While I'm here, prefix function names w/ vmbus, since unlike Hyper-V
timecounter, Hyper-V event timer will not work w/o vmbus.

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

300994
hyperv/et: Allow Hyper-V event timer be disabled

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

301009
hyperv/vmbus: Process event timer before checking events

And update comment.

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


# 302127 23-Jun-2016 sephe

MFC 300647,300650,300651,300652,300653

300647
hyperv/vmbus: Move vcpuid into vmbus softc per-cpu data

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

300650
hyperv/vmbus: Move two global flags into vmbus softc

And pack them into one flag field.

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

300651
hyperv/vmbus: Minor style and white space cleanup

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

300652
hyperv/vmbus: Pass vmbus softc to vmbus_synic_setup

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

300653
hyperv/vmbus: Nuke unnecessary MSR read

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


# 302126 23-Jun-2016 sephe

MFC 300646

hyperv/vmbus: Move event/message taskqueue/task to vmbus softc

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


# 302119 23-Jun-2016 sephe

MFC 300573

hyperv/vmbus: Git rid of sc version of pcpu data extraction macro

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


# 302118 23-Jun-2016 sephe

MFC 300572

hyperv/vmbus: Use busdma(9) for messages and event flags

And
- Move message and event flags to vmbus_softc per-cpu data.
- Get rid of hv_setup_arg, which serves no purpose now.

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


# 302116 23-Jun-2016 sephe

MFC 300565,300567,300568,300570,300571

300565
hyperv/vmbus: Move vmbus interrupt counter into vmbus softc

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

300567
hyperv/vmbus: Pass vmbus_softc and curcpu to hv_vmbus_isr()

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

300568
hyperv/busdma: Take BUS_DMA_ZERO into account

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

300570
hyperv/vmbus: Rename local variable and break long lines

No functional changes.

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

300571
hyperv/vmbus: Move SynIC setup/teardown from hyperv file to vmbus file

Avoid unnecessary exposure.

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


# 302115 23-Jun-2016 sephe

MFC 300487

hyperv/vmbus: Move IDT vector to vmbus_softc

Prepare to get rid of the hv_setup_arg.

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


# 302114 23-Jun-2016 sephe

MFC 300480,300481,300486

300480
hyperv: Move Hypercall setup to an early place.

It does not belong to the vmbus.

While I'm here rework the Hypercall setup, e.g. use busdma(9)
and avoid bit fields.

Discussed with: Jun Su <junsu microsoft com>
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6445

300481
hyperv/vmbus: Declare Synic message and event w/ proper types

Avoid ugly casts.

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

300486
hyperv/vmbus: Get rid of vmbus_devp

While I'm here, nuke useless print in vmbus_attach().

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


# 302109 23-Jun-2016 sephe

MFC 299927,300101,300102,300105,300107

299927
hyperv/vmbus: Use atomic_testandclear

Prepare to use unsigned long for event channel bit array.

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

300101
hyperv/vmbus: Use unsigned long for event bits.

And move base channel id calculation out of inner loop. This prepares
for more event processing optimization.

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

300102
hyperv/vmbus: Reduce the # of event loops by recording event flag count

Use vmbus softc to save vmbus per-cpu data. More stuffs will be moved
into vmbus softc.

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

300105
hyperv/vmbus: Use atomic swap and flsl to process event flags

Greatly reduce the locked instructions and reduce number of inner loops.

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

300107
hyperv/vmbus: Avoid two unnecessary protocol checks on isr handling path

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