summaryrefslogtreecommitdiffstats
path: root/sys/dev/hyperv
Commit message (Collapse)AuthorAgeFilesLines
* Fix heimdal KDC-REP service name validation vulnerability [SA-17:05]delphij2017-07-125-124/+189
| | | | | | Boot compatibility improvements with Azure VMs. [EN-17:06] Approved by: so
* Release 6 errata notices for 10.3-RELEASE, all related to Microsoft Hyper-V.glebius2016-08-127-142/+304
| | | | | Submitted by: Dexuan Cui <decui microsoft.com>, gjb Approved by: so
* MFC [Hyper-V]: r296028sephe2016-03-013-6/+9
| | | | | | | | | | | | hyperv: Wait 5 seconds for hyperv result, instead of 500ms This addresses various devices (network, stoarge) attach failure. Approved by: re (gjb) Reported by: Hongxiong Xian <v-hoxian microsoft com> Tested by: Hongxiong Xian <v-hoxian microsoft com> Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5435
* MFC [Hyper-V]: r294553, r294700sephe2016-02-249-188/+593
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r294553 hyperv/vmbus: Lookup channel through id table Vmbus event handler will need to find the channel by its relative id, when software interrupt for event happens. The original lookup searches the channel list, which is not very efficient. We now create a table indexed by the channel relative id to speed up the channel lookup. Submitted by: Hongjiang Zhang <honzhan microsoft com> Reviewed by: delphij, adrain, sephe, Dexuan Cui <decui microsoft com> Approved by: adrian (mentor) Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4802 ------------- r294700 hyperv/hn: Partly rework transmission path - Avoid unnecessary malloc/free on transmission path. - busdma(9)-fy transmission path. - Properly handle IFF_DRV_OACTIVE. This should fix the network stalls reported by many. - Properly setup TSO parameters. - Properly handle bpf(4) tapping. This 5 times the performance during TCP sending test, when there is one bpf(4) attached. - Allow size of chimney sending be tuned on a running system. Default value still needs more test to determine. Reviewed by: adrian, delphij Approved by: adrian (mentor) Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4972 Approved by: re (marius) Sponsored by: Microsoft OSTC
* MFC [Hyper-V]: r293719-r293722, r293869-r293871, r293873-r293875, r293877sephe2016-02-1912-188/+597
| | | | | | | | | | | | | | | | | r293719 hyperv/hn: Implement LRO r293720 hyperv/hn: Implement SIOC[SG]IFMEDIA support r293721 hyperv/hn: Avoid mbuf cluster allocation, if the packet is small. r293722 hyperv/hn: Removed unused netvsc_init() r293869 hyperv/hn: Unbreak LINT-NOIP r293870 hyperv: use x86 generic code to do the hypervisor detection r293871 hyperv: remove unused vmbus definitions r293873 hyperv: implement an event timer r293874 hyperv: add interrupt counters r293875 hyperv: set receive buffer size according to NVSP protocol version r293877 Unbreak `make depend` with sys/modules/hyperv/vmbus after r293870 Approved by: re (glebius), adrian (mentor) Sponsored by: Microsoft OSTC
* MFC r294557:sephe2016-01-271-3/+85
| | | | | | | | | | | | | | | | | | | hyperv/stor: Verify returned inquiry data before further dispatching Windows 10 and Window 2016 will return all zero inquiry data for non-existing slots. If we dispatched them, then a lot of useless (0 sized) disks would be created. So we verify the returned inquiry data (valid type, non-empty vendor/product/revision etc.), before further dispatching. Minor white space cleanup and wording fix. Submitted by: Hongjiang Zhang <honzhan microsoft com> Reviewed by: adrian, sephe, Jun Su <junsu microsoft com> Approved by: adrian (mentor) Modified by: sephe Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4928
* MFC r292861:delphij2016-01-134-59/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hyperv: vmbus: run non-blocking message handlers in vmbus_msg_swintr() We'll remove the per-channel control_work_queue because it can't properly do serialization of message handling, e.g., when there are 2 NIC devices, vmbus_channel_on_offer() -> hv_queue_work_item() has a race condition: for an SMP VM, vmbus_channel_process_offer() can run concurrently on different CPUs and if the second NIC's vmbus_channel_process_offer() -> hv_vmbus_child_device_register() runs first, the second NIC's name will be hn0 and the first NIC's name will be hn1! We can fix the race condition by removing the per-channel control_work_queue and run all the message handlers in the global hv_vmbus_g_connection.work_queue -- we'll do this in the next patch. With the coming next patch, we have to run the non-blocking handlers directly in the kernel thread vmbus_msg_swintr(), because the special handling of sub-channel: when a sub-channel (e.g., of the storvsc driver) is received and being handled in vmbus_channel_on_offer() running on the global hv_vmbus_g_connection.work_queue, vmbus_channel_process_offer() invokes channel->sc_creation_callback, i.e., storvsc_handle_sc_creation, and the callback will invoke hv_vmbus_channel_open() -> hv_vmbus_post_message and expect a further reply from the host, but the handling of the further messag can't be done because the current message's handling hasn't finished yet; as result, hv_vmbus_channel_open() -> sema_timedwait() will time out and th device can't work. Also renamed the handler type from hv_pfn_channel_msg_handler to vmbus_msg_handler: the 'pfn' and 'channel' in the old name make no sense. Submitted by: Dexuan Cui <decui microsoft com> Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D4596 MFC r292859: 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 Differential Revision: https://reviews.freebsd.org/D4597
* MFC r292661:ngie2015-12-271-2/+0
| | | | | | | | | | | Remove redundant vmbus_select_outgoing_channel declaration already handled in include/hyperv.h This unbreaks the gcc 4.2.1 kernel build of hyperv Differential Revision: https://reviews.freebsd.org/D4684 Reviewed by: royger Sponsored by: EMC / Isilon Storage Division
* MFC r291156:royger2015-12-181-1/+11
| | | | | | | | Ignore the inbound checksum flags when doing packet forwarding in netvsc driver. Sponsored by: Microsoft OSTC PR: 203630
* MFC r292258:royger2015-12-181-1/+10
| | | | | | | hyperv/kvp: wake up the daemon if it's sleeping due to poll() Submitted by: Dexuan Cui <decui@microsoft.com> Sponsored by: Microsoft OSTC
* MFC r285785 Do not enable UDP checksum offloading when running on thewhu2015-07-281-2/+20
| | | | | | | | | | | Hyper-V on Windows Server 2012 and earlier hosts. Submitted by: whu Reviewed by: royger Approved by: royger Relnotes: No Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D3217
* MFC r284746 and r284889 TSO and checksum offloading support for Netvscwhu2015-07-077-577/+916
| | | | | | | | | | | driver on Hyper-V. Submitted by: whu Reviewed by: royger Approved by: re Relnotes: yes Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D2906
* MFC r283053whu2015-05-282-19/+101
| | | | | | | | Submitted by: whu Reviewed by: royger Approved by: royger Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D2661
* MFC r282212:whu2015-05-2212-474/+1764
| | | | | | | | | | | | | | | | | | | | | 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
* MFC r279819:delphij2015-05-191-1/+10
| | | | | | | | | | | | | Fix CARP when in use in a HyperV environment: - Bump link state when stopping or starting the interface; - Don't handle SIOCGIFADDR specially, similar to r277103. This change is based on a previous revision from Andy Zhang (Microsoft) who did the diagnostic work and many thanks to them for their help in supporting the HyperV work. PR: kern/187203
* MFC r274819:smh2014-12-211-6/+5
| | | | | | | | | Prevent overflow issues in timeout processing MFC r274852: Fix build with asr driver Sponsored by: Multiplay
* MFC r273577:delphij2014-10-244-5/+5
| | | | | | | 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)
* MFC r273402:gjb2014-10-211-2/+1
| | | | | | | | | | Fix an issue where a FreeBSD virtual machine provisioned in the Microsoft Azure service does not recognize the second attached disk on the system. PR: 194376 Insta-MFC OK: re (rodrigc) Sponsored by: The FreeBSD Foundation
* MFC r271493,271688-271689,271696,271854,272139-272143:delphij2014-09-305-102/+1319
| | | | | | | | | | | | 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)
* Properly revert r272128.gjb2014-09-265-1319/+102
| | | | | Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
* Revert r272149, which introduces obscure vestiges from thegjb2014-09-265-104/+1319
| | | | | | | r272128 reversal. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
* Revert r272128:gjb2014-09-265-1319/+104
| | | | | | | | | | | 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
* MFC r271493,271688,271689,271696,271854:delphij2014-09-255-102/+1319
| | | | | | | | | | | | 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)
* MFC: r264177marius2014-05-284-21/+26
| | | | | Make some unwise casts. On i386 these casts wind up being safe. Rather than disturb the API, go with these casts to shut gcc up.
* MFC r257334, r257336, r257337, r257338, r257341, r257342, r257343, r257370,ian2014-05-141-1/+1
| | | | | | | r257368, r257416 Hints-only devices should return BUS_PROBE_NOWILDCARD from their probe methods.
* MFC r259180 (pjd) + r263123:delphij2014-03-281-6/+11
| | | | Hide a few messages under bootverbose.
* MFC r262789, r262847:mav2014-03-121-86/+1
| | | | | | | | | Remove custom bus scanner code and fix use of CAM's default scanner. This fixes kernel panic during boot, caused by incompatibility of recent CAM locking changes and this bus scanner code. Submitted by: Microsoft
* MFC r257369:delphij2013-11-011-1/+3
| | | | | | | | | Don't reference pointer before testing whether it is NULL. Submitted by: Clement Lecigne <clecigne google com> Reviewed by: grehan Approved by: re (kib)
* MFC r256425:gibbs2013-10-183-44/+15
| | | | | | | | | | | | | | | | | | | | Centralize the detection logic for the Hyper-V hypervisor. Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Reviewed by: gibbs, grehan Approved by: re (gjb) sys/sys/systm.h: * Add a new VM_GUEST type, VM_GUEST_HV (HyperV guest). sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c: sys/dev/hyperv/vmbus/hv_hv.c: sys/dev/hyperv/stordisengage/hv_ata_pci_disengage.c: * Set vm_guest to VM_GUEST_HV and use that on other HyperV related devices instead of cloning the cpuid hypervisor check. * Cleanup the vmbus_identify function. ------------------------------------------------------------------------
* MFC r256362grehan2013-10-122-19/+86
| | | | | | | | | | Fix a lock-order reversal in the net driver by dropping the lock and holding a reference prior to calling further into the hyperv stack. Added missing FreeBSD idents. Approved by: re@ (gjb)
* MFC r256350grehan2013-10-112-8/+11
| | | | | | | Fix vmbus channel memory leak where incorrect length parameter was being passed to contigfree(). Approved by: re@ (glebius)
* MFC r256304grehan2013-10-111-22/+8
| | | | | | | Allow the legacy CDROM device to be accessed in a FreeBSD guest, while still using enlightened drivers for other block devices. Approved by: re@ (gjb)
* In sys/dev/hyperv, fix a number of gcc warnings about usage of anonymousdim2013-10-106-49/+60
| | | | | | | | union members in strict C99, by giving them names. While here, add some FreeBSD keywords where they were missing. Approved by: re (gjb) Reviewed by: grehan
* Correct panic caused by attaching both Xen PV and HyperV virtualizationgibbs2013-10-051-0/+10
| | | | | | | | | | | | | | | | | | | | aware drivers on Xen hypervisors that advertise support for some HyperV features. x86/xen/hvm.c: When running in HVM mode on a Xen hypervisor, set vm_guest to VM_GUEST_XEN so other virtualization aware components in the FreeBSD kernel can detect this mode is active. dev/hyperv/vmbus/hv_hv.c: Use vm_guest to ignore Xen's HyperV emulation when Xen is detected and Xen PV drivers are active. Reported by: Shanker Balan Submitted by: Roger Pau Monné Sponsored by: Citrix Systems R&D Reviewed by: gibbs Approved by: re (Xen blanket)
* Reorder the hypervisor presence test to avoid claiming ATA disksgrehan2013-09-191-28/+38
| | | | | | | on non hyperv systems. Reviewed by: neel, abgupta at microsoft dot com Approved by: re@ (hrs)
* Revert the kvp code - there's still some work thatgrehan2013-09-093-999/+6
| | | | | | needs to be done for that. Discussed with: Microsoft hyper-v devs
* Latest update from Microsoft.grehan2013-09-097-215/+1391
| | | | Obtained from: Microsoft Hyper-v dev team
* IFC @ r253862grehan2013-08-012-2/+2
| | | | | | | - 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.
* Microsoft have changed their policy on how the hyper-v code willgrehan2013-07-1719-0/+12526
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.
OpenPOWER on IntegriCloud