History log of /freebsd-11-stable/sys/dev/hyperv/vmbus/vmbus_chan.c
Revision Date Author Comments
# 311389 05-Jan-2017 sephe

MFC 310651

hyperv/vmbus: Nuke unnecessary critical sections.

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


# 311375 05-Jan-2017 sephe

MFC 309874,309875

309874
hyperv/vmbus: Add channel polling support.

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

309875
hyperv/hn: Add polling support

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


# 311372 05-Jan-2017 sephe

MFC 309704

hyperv/vmbus: Utilize vmbus_chan_run_task()

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


# 311369 05-Jan-2017 sephe

MFC 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


# 311367 05-Jan-2017 sephe

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

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


# 311366 05-Jan-2017 sephe

MFC 309236,309237

309236
hyperv/vmbus: Make sure that the allocated GPADL is not zero.

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

309237
hyperv/vmbus: Stringent GPADL parameter assertion.

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


# 311364 05-Jan-2017 sephe

MFC 309128,309129,309131-309136,309138-309140,309224,309225

309128
hyperv/vmbus: Commit the GPADL id only after the connection succeeds.

Minor style change.

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

309129
hyperv/vmbus: Minor style changes.

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

309131
hyperv/vmbus: Fix sysctl tree leakage, if channel open fails.

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

309132
hyperv/vmbus: Don't close unopened channels.

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

309133
hyperv/vmbus: GPADL disconnect error on a revoked channel is benign.

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

309134
hyperv/vmbus: No stranded bufring GPADL is allowed.

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

309135
hyperv/vmbus: Return EISCONN if the bufring GPADL can't be disconnected.

So that the callers of vmbus_chan_open_br() could handle the passed in
bufring memory properly.

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

309136
hyperv/vmbus: Don't free the bufring if its GPADL can't be disconnected.

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

309138
hyperv/vmbus: Always try disconnect/free bufring memory upon channel close

While I'm here, minor wording and style changes.

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

309139
hyperv/vmbus: Propagate close error.

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

309140
hyperv/vmbus: Add a simplified version of channel close.

So that the caller can know the channel close error and react accordingly.

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

309224
hyperv/vmbus: Zero out GPADL if error happens.

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

309225
hyperv/vmbus: Add supportive transaction wait function.

This function supports channel revocation properly.

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


# 311359 05-Jan-2017 sephe

MFC 309030,309039,309080,309081,309083

309030
hyperv/vmbus: Set a mark on the revoked channel.

This will be used to fix device detach DEVMETHOD for revoked primary
channel.

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

309039
hyperv/vmbus: Merge free/active locks.

These functions are only used by management stuffs, so there are
no needs to introduce extra complexity.

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

309080
hyperv/vmbus: Implement orphan support for transaction API

It will be used to fix the primary channel revocation support.

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

309081
hyperv/vmbus: Fix the primary channel revoking on vmbus side.

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.

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

309083
hyperv/vmbus: Fix the multi-channel revoking on vmbus side.

- Reference count the sub-channel when channel offer message is
processed, so that immediate rescind message on the same channel
will not race sub-channel open on driver side.
- Drop the above reference when sub-channel is closed, this closely
mimics the hypervisor's reaction when primary channel is closed
on the VM side. No drivers use sub-channel after primary channel
is closed.

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


# 308634 13-Nov-2016 sephe

MFC 308194

hyperv: GC unused functions.

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


# 308633 13-Nov-2016 sephe

MFC 308168

hyperv/vmbus: Avoid extra header copy.

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


# 308621 13-Nov-2016 sephe

MFC 307952,307953,308278

307952
hyperv/vmbus: Add missing white space.

Submitted by: QianYue You <t-youqi microsoft com>
Sponsored by: Microsoft

307953
hyperv/vmbus: Implement vmbus_chan_printf.

And use it for vmbus channel logging, which can log the channel
owner's name properly, instead of vmbus0.

Submitted by: QianYue You <t-youqi microsoft com>
Sponsored by: Microsoft

308278
hyperv/vmbus: Reset ch_dev, once the child is deleted.

So it will not be mis-used later on, e.g. in vmbus_chan_printf().

Submitted by: dexuan
Reported by: dexuan
Sponsored by: Microsoft


# 308517 11-Nov-2016 sephe

MFC 307624

hyperv/vmbus: Expose channel management taskqueue for driver to use.

MFC after: 3 days
Sponsored by: Microsoft


# 307614 19-Oct-2016 sephe

MFC 307012,307013,307262

307012
hyperv/vmbus: Allow driver to inject synchronous task into channel taskq.

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

307013
hyperv/hn: Rework link status support.

This is the preamble for network device SR-IOV and
NDIS_STATUS_NETWORK_CHANGE handling.

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

307262
hyperv/hn: Management parts always need suspend and resume.

Sponsored by: Microsoft


# 307599 18-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


# 307595 18-Oct-2016 sephe

MFC 306072-306074,306076

306072
hyperv/vmbus: Allow bufrings preallocation.

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.

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

306073
hyperv/hn: Allocate bufrings in attach DEVMETHOD.

So that reinitialization, e.g. MTU change, will not fail when the system
memory is excessively fragmented.

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

306074
hyperv/vmbus: Assert that the bufring address is page aligned.

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

306076
hyperv/hn: Put debug messages under bootverbose

While I'm here, strip blank line.

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


# 307510 17-Oct-2016 sephe

MFC 305789

hyperv/vmbus: Make sure that the sub-channel count is valid.

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


# 307498 17-Oct-2016 sephe

MFC 305405,305407,305408,305410,305411,305453

305405
hyperv/vmbus: Stringent header length and total length check.

While I'm here, minor style changes.

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

305407
hyperv/hn: Stringent NVS notification length check.

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

305408
hyperv/hn: Stringent NVS RNDIS packets length checks.

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

305410
net/rndis: Define RNDIS status message, which could be sent by device.

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

305411
hyperv/hn: Stringent RNDIS control message length check.

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

305453
hyperv/hn: Stringent RNDIS packet message length/offset check.

While I'm here, use definition in net/rndis.h

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


# 307486 17-Oct-2016 sephe

MFC 304790,304791

304790
hyperv/vmbus: Add function to calculate max # of elements in a bufring.

Sponsored by: Microsoft

304791
hyperv/storvsc: Increase queue depth and rework channel selection.

- Increasing queue depth gives ~100% performance improvement for
randwrite fio test in Azure.
- New channel selection, which takes LUN id and the current cpuid
into consideration, gives additional ~20% performance improvement
for ranwrite fio test in Azure.

Submitted by: Hongzhang Jiang <honzhan microsoft com>
Modified by: sephe
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7622


# 307471 16-Oct-2016 sephe

MFC 303603-303605,303764

303603
hyperv/vmbus: Remove the artificial entry limit of SG and PRP list.

Just make sure that the total channel packet size does not exceed 1/2
data size of the TX bufring.

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

303604
hyperv/storvsc: Set maxio to 128KB.

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

303605
hyperv/storvsc: Stringent PRP list assertions

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

303764
hyperv/vmbus: Only make sure the TX bufring will not be closed.

KVP can write data, whose size is > 1/2 TX bufring size.

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


# 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


# 307464 16-Oct-2016 sephe

MFC 303284,303329,303361,303362,303366,303368-303370

303284
hyperv/vmbus: Move bufring info definition to vmbus_brvar.h

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

303329
hyperv/vmbus: Nuke unnecessary accessor functions.

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

303361
hyperv/vmbus: Initialize RX/TX bufring mutex at channel creation time

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

303362
hyperv/vmbus: Use different struct for RX/TX bufring.

So that they can use suitable MP synchronization mechanism.

While I'm here change the bufring init/read/write function names.

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

303366
hyperv/vmbus: Update comment for bufring

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

303368
hyperv/vmbus: Cleanup TX bufring write process.

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

303369
hyperv/vmbus: Stringent RX bufring data length checks.

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

303370
hyperv/vmbus: Cleanup RX bufring read process.

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


# 307463 16-Oct-2016 sephe

MFC 303283

hyperv/vmbus: Rename hv_vmbus_priv.h to vmbus_brvar.h

It only contains bufring related bits for a while.

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


# 307462 16-Oct-2016 sephe

MFC 303178,303180,303182

303178
hyperv/vmbus: Cosmetic bufring cleanup.

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

303180
hyperv/vmbus: Cleanup and augment bufring sysctl tree creation

Binary state node is added, so that userland programs do not have
to parse human readable state string.

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

303182
hyperv/vmbus: Move vmbus bufring definition to vmbus_reg.h

And add more comment about its fields.

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


# 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


# 307460 16-Oct-2016 sephe

MFC 303023

hyperv/vmbus: Rename laundered vmbus channel code

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