summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* wait: Do not copyout uninitialized status/rusage/wrusage.jilles2016-10-113-4/+75
| | | | | | | | If wait4() or wait6() return 0 because of WNOHANG, the status, rusage and wrusage information should not be returned. PR: 212048 Reported by: Casey Lucas
* MFC r305207: MFV r302659: 6931 lib/libzfs: cleanup gcc warningsmav2016-10-118-56/+72
| | | | | | | | | | | | | | | illumos/illumos-gate@88f61dee20b358671b1b643e9d1dbf220a1d69be https://github.com/illumos/illumos-gate/commit/88f61dee20b358671b1b643e9d1dbf220a1d69be https://www.illumos.org/issues/6931 need cleanup: CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-function Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: Igor Kozhukhov <ikozhukhov@gmail.com>
* MFC r305200: MFV r302651:mav2016-10-116-122/+197
| | | | | | | | | | | | | | | | | | | 7054 dmu_tx_hold_t should use refcount_t to track space illumos/illumos-gate@0c779ad424a92a84d1e07d47cab7f8009189202b https://github.com/illumos/illumos-gate/commit/0c779ad424a92a84d1e07d47cab7f8009 189202b https://www.illumos.org/issues/7054 upstream: ee0003de7d3e598499be7ac3fe6b61efcc47cb7f DLPX-40399 dmu_tx_hold_t should use refcount_t to track space Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Paul Dagnelie <pcd@delphix.com> Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com> Approved by: Dan McDonald <danmcd@omniti.com> Author: Matthew Ahrens <mahrens@delphix.com>
* MFC r305199: MFV r302648: 7019 zfsdev_ioctl skips secpolicy when FKIOCTL is setmav2016-10-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that the bulk of the upstream change is not applicable to FreeBSD and the affected files are not even in the vendor area. illumos/illumos-gate@45b1747515a17db45e8971501ee84a26bdff37b2 https://github.com/illumos/illumos-gate/commit/45b1747515a17db45e8971501ee84a26bdff37b2 https://www.illumos.org/issues/7019 Currently zfsdev_ioctl, when confronted by a request with the FKIOCTL flag set, skips all processing of secpolicy functions. This means that ZFS is not doing any kind of verification of the credentials or access rights of the caller and assuming that (as it is an in-kernel client) all such checks have already been done. This turns out to be quite a dangerous assumption, especially with respect to sdev. In general I don't think it's particularly reasonable to offload this enforcement of access rights onto other kernel subsystems when ZFS has some particular local semantics in this area (delegated datasets etc) and does not provide any kind of API to allow other subsystems to avoid code duplication when doing it. ZFS should apply its normal access policy to requests from within the kernel, and callers should take care to give it the correct credentials and call it from the correct context in order to get the results they need. You can observe the currently unfortunate consequences of this bug in any non- global zone that has access to /dev/zvol or any subset of it via sdev profiles. In particular, a zone used to contain a KVM or similar which has a single zvol passed through to it using a <device match= block in its zone XML. Even though sdev makes something of an attempt to control for whether the caller should have access to nodes in /dev/zvol, it doesn't do this correctly, or really at all in the lookup call path. So, if we have a zone that's been given access to any part of /dev/zvol, it can simply look up the full path to any other zvol on the entire system, and the node will appear and be able to be used. Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Richard Lowe <richlowe@richlowe.net> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Dan McDonald <danmcd@omniti.com> Author: Alex Wilson <alex.wilson@joyent.com>
* MFC r305198: MFV r302647:mav2016-10-112-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | 6922 Emit ESC_ZFS_VDEV_REMOVE_AUX after removing an aux device illumos/illumos-gate@63364b0ee2604783e7a55f8425888867768eafa4 https://github.com/illumos/illumos-gate/commit/63364b0ee2604783e7a55f84258888677 68eafa4 https://www.illumos.org/issues/6922 ZFS does not do a config_sync after removing an aux (spare, log, or cache) device. AFAICT this isn't being done because it is slow and was deemed unnecessary. However, it should be such a rare operation that speed doesn't matter, and not doing it results in two problems: 1) It is theoretically possible to remove an aux device from one pool and attach it to another, then lose power. When power is restored, both pools woul d think that they own the aux device. 2) Removal of the aux device doesn't send any useful sysevents to userland. Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Approved by: Dan McDonald <danmcd@omniti.com> Author: Alan Somers <asomers@gmail.com>
* MFC r305197: MFV r302646:mav2016-10-114-3/+156
| | | | | | | | | | | | | | | | | | 6980 6902 causes zfs send to break due to 32-bit/64-bit struct mismatch illumos/illumos-gate@ea4a67f462de0a39a9adea8197bcdef849de5371 https://github.com/illumos/illumos-gate/commit/ea4a67f462de0a39a9adea8197bcdef84 9de5371 https://www.illumos.org/issues/6980 doing zfs send -i snap1 snap2 >testfile results in internal error: Invalid argument Abort (core dumped) Reviewed by: Paul Dagnelie <pcd@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: Matthew Ahrens <mahrens@delphix.com>
* MFC r305195: MFV r302643:mav2016-10-1110-20/+14
| | | | | | 6902 speed up listing of snapshots if requesting name only and sorting by name This was our change from the beginning, so just reduce the upstream diff.
* MFC r305193: MFV r302642:mav2016-10-111-0/+21
| | | | | | | | | | | | | | | | | | | 6876 Stack corruption after importing a pool with a too-long name illumos/illumos-gate@c971037baa5d64dfecf6d87ed602fc3116ebec41 https://github.com/illumos/illumos-gate/commit/c971037baa5d64dfecf6d87ed602fc3116ebec41 https://www.illumos.org/issues/6876 Calling dsl_dataset_name on a dataset with a 256 byte buffer is asking for trouble. We should check every dataset on import, using a 1024 byte buffer and checking each time to see if the dataset's new name is longer than 256 bytes. Reviewed by: Prakash Surya <prakash.surya@delphix.com> Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com> Approved by: Richard Lowe <richlowe@richlowe.net> Author: Paul Dagnelie <pcd@delphix.com>
* build: Add vmbus_if.msephe2016-10-111-0/+1
| | | | | | | This is a direct commit, which reflects the difference between current and 10-stable. Sponsored by: Microsoft
* MFC 302875,302876,302878-302881sephe2016-10-1115-374/+308
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFC 302873,302874sephe2016-10-113-67/+50
| | | | | | | | | | | | | | | | | 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
* MFC 302871,302872sephe2016-10-112-53/+76
| | | | | | | | | | | | | | 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
* MFC 302867-302870sephe2016-10-115-96/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFC 302864sephe2016-10-115-524/+480
| | | | | | | hyperv/vmbus: Merge hv_channel_mgmt.c into hv_channel.c Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7126
* MFC 302819,302823sephe2016-10-115-95/+96
| | | | | | | | | | | | | | | | 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
* MFC 302816-302818sephe2016-10-116-48/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFC 302808-302815sephe2016-10-117-220/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFC 302733,302737,302801-302806sephe2016-10-1114-418/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFC 302723,302726,302731sephe2016-10-119-47/+89
| | | | | | | | | | | | | | | | | | | | 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
* MFC 302710,302713sephe2016-10-111-35/+44
| | | | | | | | | | | | | | | | | 302710 hyperv/vmbus: Remove unnecessary callback check. Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7046 302713 hyperv/vmbus: Install different task function for batch/non-batch channels This avoids bunch of unnecessary checks on hot path and simplifies the channel processing. Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7085
* MFC 302707-302709sephe2016-10-114-36/+28
| | | | | | | | | | | | | | | | | | | | 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
* MFC 302698-302704,302706sephe2016-10-1119-470/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFC 302693-302697sephe2016-10-116-65/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFC 302636-302638,302692sephe2016-10-119-230/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFC 302632-302634sephe2016-10-115-32/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFC 302617-302621,302623,302629-302631sephe2016-10-1119-422/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFC 302607-302612sephe2016-10-119-794/+321
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFC 302543,302545,302547,302549,302554,302556,302557,302559,302606sephe2016-10-118-251/+261
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFC 302544sephe2016-10-111-2/+22
| | | | | | | hyperv/hn: Add tunable to allow tcp_lro_queue_mbuf() Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6841
* MFC 302540sephe2016-10-1110-232/+518
| | | | | | | | | | 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
* MFC 306480sephe2016-10-111-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | linuxkpi: Fix PCI BAR lazy allocation support. FreeBSD supports lazy allocation of PCI BAR, that is, when a device driver's attach method is invoked, even if the device's PCI BAR address wasn't initialized, the invocation of bus_alloc_resource_any() (the call chain: pci_alloc_resource() -> pci_alloc_multi_resource() -> pci_reserve_map() -> pci_write_bar()) would allocate a proper address for the PCI BAR and write this 'lazy allocated' address into the PCI BAR. This model works fine for native FreeBSD device drivers, but _not_ for device drivers shared with Linux (e.g. dev/mlx5/mlx5_core/mlx5_main.c and ofed/drivers/net/mlx4/main.c. Both of them use pci_request_regions(), which doesn't work properly with the PCI BAR lazy allocation, because pci_resource_type() -> _pci_get_rle() always returns NULL, so pci_request_regions() doesn't have the opportunity to invoke bus_alloc_resource_any(). We now use pci_find_bar() in pci_resource_type(), which is able to locate all available PCI BARs even if some of them will be lazy allocated. Submitted by: Dexuan Cui <decui microsoft com> Reviewed by: hps Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8071
* MFC r306610:sevan2016-10-101-28/+44
| | | | | | | | | | Note mount_fusefs appeared in FreeBSD 10. Move note regarding implementation to caveats. Address issued raised by Igor. PR: 212513 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8105
* MFC r306607:sevan2016-10-101-2/+2
| | | | | | | | mksnap_ffs appeared in FreeBSD 5.1. PR: 212510 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8105
* MFC r306606:sevan2016-10-101-2/+2
| | | | | | | | | mknod appeared in V4 UNIX http://minnie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man8/mknod.8 PR: 212509 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8105
* MFC r306605:sevan2016-10-101-2/+2
| | | | | | | | | init was there in UNIX from V1 http://minnie.tuhs.org/cgi-bin/utree.pl?file=V1/init.s PR: 212503 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8105
* MFC r306604:sevan2016-10-101-1/+4
| | | | | | | | gbde first appeared in FreeBSD 5.0 PR: 212478 Approved by: brc (mentor) Differential Revision: https://reviews.freebsd.org/D8105
* MFC r306603:sevan2016-10-101-8/+9
| | | | | | | | | Document which version of BSD first showed up in and add the version info for NetBSD & FreeBSD. PR: 212477 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8105
* MFC r306602:sevan2016-10-101-2/+5
| | | | | | | | Mention the version of NetBSD the utility originated from. PR: 212476 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8105
* MFC r306601:sevan2016-10-101-2/+2
| | | | | | | | | dumpon(8) appears to be present in FreeBSD 2.0.5, despite initial import of man page listed FreeBSD 2.1. PR: 212445 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8105
* MFC r306600:sevan2016-10-101-2/+2
| | | | | | | | | | dump(8) first appeared in V4 UNIX http://minnie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man8 PR: 212444 Approved by: bcr (mentor) Obtained from: TUHS Differential Revision: https://reviews.freebsd.org/D8105
* MFC r306598sevan2016-10-101-3/+3
| | | | | | | | | | | | | | ccdconfig first appeared in NetBSD 1.1 From NetBSD man page, confirmed with repo tags in CVS [1] (there was also no 1.0a release according to [2]) [1] http://cvsweb.netbsd.org/bsdweb.cgi/src/sbin/ccdconfig/ccdconfig.c [2] http://netbsd.org/releases/formal.html#history PR: 212437 Approved by: bcr (mentor) Obtained from: NetBSD Differential Revision: https://reviews.freebsd.org/D8105
* MFC r306582:sevan2016-10-101-6/+5
| | | | | | | | | | "POSIX doesn't specify -h." - r1.27 from NetBSD http://man.openbsd.org/?query=chmod&apropos=0&sec=0&arch=default&manpath=POSIX-2013 PR: 212337 Approved by: bcr (mentor) Obtained from: NetBSD Differential Revision: https://reviews.freebsd.org/D8118
* MFC r306581:sevan2016-10-101-2/+2
| | | | | | | | Use .At macro instead of specifying AT&T UNIX literaly. PR: 212034 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8114
* MFC r306714:sevan2016-10-101-1/+9
| | | | | | | | | Document where chio(1) originated from & which version of FreeBSD first included it. PR: 211776 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D8104
* MFC r306584:sevan2016-10-101-5/+7
| | | | | | | | | | | Move the description of CHANGER variable to ENVIRONMENT section rather than in the DESCRIPTION section. From OpenBSD src/bin/chio/chio.1 r1.23 PR: 212158 Approved by: bjk Obtained from: OpenBSD Differential Revision: https://reviews.freebsd.org/D8117
* MFC: r306318tijl2016-10-101-1/+1
| | | | | | | | | | | | Allocate a zeroed LDT. Failing to do this might result in the LDT appearing to run out of free descriptors because of random junk in the descriptor's 'sd_type' field. http://lists.freebsd.org/pipermail/freebsd-amd64/2014-May/016088.html PR: 212639 Submitted by: wheelcomplex@gmail.com
* MFC r306478:hselasky2016-10-102-5/+7
| | | | | | | | | Add new USB ID. While at it remove some whitespaces. Submitted by: Jose Luis Duran <jlduran@gmail.com> PR: 213110
* MFC r306454:hselasky2016-10-101-0/+1
| | | | | | | Set hardware stats flag to avoid double counting the number of incoming bytes. Found by: Ben RUBSON <ben.rubson@gmail.com> Sponsored by: Mellanox Technologies
* MFC r306453:hselasky2016-10-101-0/+1
| | | | | | | Set hardware stats flag to avoid double counting the number of incoming bytes. Found by: Ben RUBSON <ben.rubson@gmail.com> Sponsored by: Mellanox Technologies
* MFC r306451:hselasky2016-10-101-9/+20
| | | | | | | | The IORESOURCE_XXX defines should resemble a bitmask while SYS_RES_XXX are not bitmasks. Fix return value of pci_resource_flags() to reflect this change. Sponsored by: Mellanox Technologies
OpenPOWER on IntegriCloud