aboutsummaryrefslogtreecommitdiff
path: root/sys/modules/hyperv
Commit message (Collapse)AuthorAgeFilesLines
* Remove residual blank line at start of MakefileWarner Losh2024-07-158-8/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* Hyper-V: TLB flush enlightment using hypercallSouradeep Chakrabarti2024-06-071-2/+2
| | | | | | | | | | | | | | | | | | | | Currently FreeBSD uses IPI based TLB flushing for remote TLB flushing. Hyper-V allows hypercalls to flush local and remote TLB. The use of Hyper-V hypercalls gives significant performance improvement in TLB operations. This patch set during test has shown near to 40 percent TLB performance improvement. Also this patch adds rep hypercall implementation as well. Reviewed by: whu, kib Tested by: whu Authored-by: Souradeep Chakrabarti <schakrabarti@microsoft.com> Co-Authored-by: Erni Sri Satya Vennela <ernis@microsoft.com> MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D45521
* sys: Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-168-8/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* hv_hid: Hyper-V HID driverYuri2023-02-052-1/+13
| | | | | | | | | Hyper-V HID driver using hidbus/hms. Reviewed by: wulf MFC after: 1 week PR: 221074 Differential revision: https://reviews.freebsd.org/D38140
* arm64: Hyper-V: enablement for ARM64 in Hyper-V (Part 3, final)Souradeep Chakrabarti2022-10-272-4/+8
| | | | | | | | | | | | This is the last part for ARM64 Hyper-V enablement. This includes commone files and make file changes to enable the ARM64 FreeBSD guest on Hyper-V. With this patch, it should be able to build the ARM64 image and install it on Hyper-V. Reviewed by: emaste, andrew, whu Tested by: Souradeep Chakrabarti <schakrabarti@microsoft.com> Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D36744
* Fix some modules to export more used symbolsKonstantin Belousov2021-11-181-0/+2
| | | | | | | | | and remove non-present symbols that are now reported by kmod_syms.awk. Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32878
* hyperv: Fix vmbus after the i386 4/4 splitMark Johnston2021-06-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | The vmbus ISR needs to live in a trampoline. Dynamically allocating a trampoline at driver initialization time poses some difficulties due to the fact that the KENTER macro assumes that the offset relative to tramp_idleptd is fixed at static link time. Another problem is that native_lapic_ipi_alloc() uses setidt(), which assumes a fixed trampoline offset. Rather than fight this, move the Hyper-V ISR to i386/exception.s. Add a new HYPERV kernel option to make this optional, and configure it by default on i386. This is sufficient to make use of vmbus(4) after the 4/4 split. Note that vmbus cannot be loaded dynamically and both the HYPERV option and device must be configured together. I think this is not too onerous a requirement, since vmbus(4) was previously non-functional. Reported by: Harry Schmalzbauer <freebsd@omnilan.de> Tested by: Harry Schmalzbauer <freebsd@omnilan.de> Reviewed by: whu, kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30577
* Fix directly building in sys/modulesLi-Wen Hsu2020-05-311-0/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=361660
* HyperV socket implementation for FreeBSDWei Hu2020-05-202-1/+14
| | | | | | | | | | | | | | This change adds Hyper-V socket feature in FreeBSD. New socket address family AF_HYPERV and its kernel support are added. Submitted by: Wei Hu <weh@microsoft.com> Reviewed by: Dexuan Cui <decui@microsoft.com> Relnotes: yes Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D24061 Notes: svn path=/head/; revision=361275
* Move most of the contents of opt_compat.h to opt_global.h.Brooks Davis2018-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | opt_compat.h is mentioned in nearly 180 files. In-progress network driver compabibility improvements may add over 100 more so this is closer to "just about everywhere" than "only some files" per the guidance in sys/conf/options. Keep COMPAT_LINUX32 in opt_compat.h as it is confined to a subset of sys/compat/linux/*.c. A fake _COMPAT_LINUX option ensure opt_compat.h is created on all architectures. Move COMPAT_LINUXKPI to opt_dontuse.h as it is only used to control the set of compiled files. Reviewed by: kib, cem, jhb, jtl Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14941 Notes: svn path=/head/; revision=332122
* Rename assym.s to assym.incEd Maste2018-03-201-2/+2
| | | | | | | | | | | | assym is only to be included by other .s files, and should never actually be assembled by itself. Reviewed by: imp, bdrewery (earlier) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D14180 Notes: svn path=/head/; revision=331254
* Move assym.s to DPSRCS in vmbus moduleEd Maste2018-03-171-2/+2
| | | | | | | | assym.s is only to be included by other .s files, and should not actually be assembled by itself. Notes: svn path=/head/; revision=331096
* hyperv/vmbus: Reorganize vmbus device treeSepherosa Ziehau2017-05-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | For GEN1 Hyper-V, vmbus is attached to pcib0, which contains the resources for PCI passthrough and SR-IOV. There is no acpi_syscontainer0 on GEN1 Hyper-V. For GEN2 Hyper-V, vmbus is attached to acpi_syscontainer0, which contains the resources for PCI passthrough and SR-IOV. There is no pcib0 on GEN2 Hyper-V. The ACPI VMBUS device now only holds its _CRS, which is empty as of this commit; its existence is mainly for upward compatibility. Device tree structure is suggested by jhb@. Tested-by: dexuan@ Collabrated-wth: dexuan@ MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D10565 Notes: svn path=/head/; revision=318136
* sys/modules: normalize .CURDIR-relative paths to SRCTOPEnji Cooper2017-03-045-18/+18
| | | | | | | | | | | This simplifies make output/logic Tested with: `cd sys/modules; make ALL_MODULES=` on amd64 MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314651
* hyperv/ic: Rename cleaned up files.Sepherosa Ziehau2016-12-201-3/+3
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8850 Notes: svn path=/head/; revision=310324
* hyperv/ic: Rname cleaned up file.Sepherosa Ziehau2016-12-201-1/+6
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8848 Notes: svn path=/head/; revision=310317
* hyperv/hn: Add 'options RSS' support.Sepherosa Ziehau2016-12-011-1/+2
| | | | | | | | | | Reviewed by: adrian MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8676 Notes: svn path=/head/; revision=309353
* hyperv/hn: Add HN_DEBUG kernel option.Sepherosa Ziehau2016-12-011-1/+1
| | | | | | | | | | | | If bufring is used for per-TX ring descs, don't update "available" counter, which is only used to help debugging. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8674 Notes: svn path=/head/; revision=309346
* hyperv/pcib: change the file name: pcib.c -> vmbus_pcib.cDexuan Cui2016-11-181-1/+1
| | | | | | | | | | | | This makes the file name and the variable naming in the file consistent. Reviewed by: sephe Approved by: sephe (mentor) MFC after: 1 week Sponsored by: Microsoft Notes: svn path=/head/; revision=308795
* hyperv/pcib: Fix the build for some kernel configsDexuan Cui2016-11-182-2/+2
| | | | | | | | | | | | | 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) MFC after: 1 week Sponsored by: Microsoft Notes: svn path=/head/; revision=308793
* hyperv/pcib: enable PCIe pass-through (a.k.a. Discrete Device Assignment)Dexuan Cui2016-11-161-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8332 Notes: svn path=/head/; revision=308725
* hyperv/vss: Add driver and tools for VSSSepherosa Ziehau2016-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VSS stands for "Volume Shadow Copy Service". Unlike virtual machine snapshot, it only takes snapshot for the virtual disks, so both filesystem and applications have to aware of it, and cooperate the whole VSS process. This driver exposes two device files to the userland: /dev/hv_fsvss_dev Normally userland programs should _not_ mess with this device file. It is currently used by the hv_vss_daemon(8), which freezes and thaws the filesystem. NOTE: currently only UFS is supported, if the system mounts _any_ other filesystems, the hv_vss_daemon(8) will veto the VSS process. If hv_vss_daemon(8) was disabled, then this device file must be opened, and proper ioctls must be issued to keep the VSS working. /dev/hv_appvss_dev Userland application can opened this device file to receive the VSS freeze notification, hold the VSS for a while (mainly to flush application data to filesystem), release the VSS process, and receive the VSS thaw notification i.e. applications can run again. The VSS will still work, even if this device file is not opened. However, only filesystem consistency is promised, if this device file is not opened or is not operated properly. hv_vss_daemon(8) is started by devd(8) by default. It can be disabled by editting /etc/devd/hyperv.conf. Submitted by: Hongjiang Zhang <honzhan microsoft com> Reviewed by: kib, mckusick MFC after: 3 weeks Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8224 Notes: svn path=/head/; revision=308664
* hyperv/hn: Rename cleaned up file.Sepherosa Ziehau2016-11-011-1/+1
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8390 Notes: svn path=/head/; revision=308163
* hyperv/hn: Rename cleaned up RNDIS source file.Sepherosa Ziehau2016-10-311-3/+1
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8361 Notes: svn path=/head/; revision=308116
* hyperv/hn: Rename cleaned up NVS source file.Sepherosa Ziehau2016-10-281-1/+1
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8354 Notes: svn path=/head/; revision=308012
* hyperv/vmbus: Add missing vmbus_if.c to module build.Sepherosa Ziehau2016-09-301-0/+1
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8067 Notes: svn path=/head/; revision=306484
* hyperv/storvsc: Fix the blkvsc disk attachment issues.Sepherosa Ziehau2016-09-292-10/+1
| | | | | | | | | | | | | | | | | | - The original 'disengage' ATA controller model does not work properly for all possible disk configurations. Use the newly added ATA disk veto eventhandler to fit into all possible disk configuration. - If the 'invalid LUN' happens on blkvsc controllers, return CAM_DEV_NOT_THERE so that CAM will not destroy attached disks under the blkvsc controllers. Submitted by: Hongjiang Zhang <honzhan microsoft com> Discussed with: mav MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7693 Notes: svn path=/head/; revision=306426
* hyperv/vmbus: Add APIs for various types of transactions.Sepherosa Ziehau2016-08-111-1/+2
| | | | | | | | | | Reviewed by: Jun Su <junsu microsoft com> MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7456 Notes: svn path=/head/; revision=303947
* opt_apic.h is only used on i386.Bryan Drewery2016-07-271-1/+4
| | | | | | | | MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=303415
* hyperv/vmbus: Rename cleaned up bufring codeSepherosa Ziehau2016-07-271-2/+2
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7318 Notes: svn path=/head/; revision=303379
* hyperv/vmbus: Rename laundered vmbus channel codeSepherosa Ziehau2016-07-191-2/+2
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7232 Notes: svn path=/head/; revision=303023
* hyperv/vmbus: Merge hv_channel_mgmt.c into hv_channel.cSepherosa Ziehau2016-07-151-1/+0
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7126 Notes: svn path=/head/; revision=302864
* hyperv/vmbus: Add vmbus method for GUID base device probing.Sepherosa Ziehau2016-07-131-1/+1
| | | | | | | | | | | Reduce the exposure of hv_device. MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7024 Notes: svn path=/head/; revision=302698
* hyperv/vmbus: Merge hv_connection.c into hv_channel.cSepherosa Ziehau2016-07-131-1/+0
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D7004 Notes: svn path=/head/; revision=302692
* hyperv/vmbus: Rework vmbus version accessing.Sepherosa Ziehau2016-07-123-5/+7
| | | | | | | | | | | | Instead of global variable, vmbus version is accessed through a vmbus DEVMETHOD now. MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6953 Notes: svn path=/head/; revision=302629
* hyperv: Move machine dependent bits into machine dependent files.Sepherosa Ziehau2016-06-061-0/+1
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6701 Notes: svn path=/head/; revision=301483
* hyperv: Rename some cleaned up/almost cleaned up filesSepherosa Ziehau2016-06-011-7/+6
| | | | | | | | MFC after: 1 week Sponsored by: Microsoft OSTC Notes: svn path=/head/; revision=301113
* hyperv: Add helpers for busdma(9) operationSepherosa Ziehau2016-05-231-1/+2
| | | | | | | | | MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6443 Notes: svn path=/head/; revision=300478
* hyperv: Deprecate HYPERV option by moving Hyper-V IDT vector into vmbusSepherosa Ziehau2016-04-151-3/+12
| | | | | | | | | | Submitted by: Jun Su <junsu microsoft com> Reviewed by: jhb, kib, sephe Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5910 Notes: svn path=/head/; revision=298022
* hyperv/utils: Code rearrange and cleanupSepherosa Ziehau2016-02-241-1/+1
| | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=295958
* Unbreak `make depend` with sys/modules/hyperv/vmbus after r293870Enji Cooper2016-01-141-1/+1
| | | | | | | Pointyhat to: sephe Notes: svn path=/head/; revision=293877
* hyperv: implement an event timerSepherosa Ziehau2016-01-141-0/+1
| | | | | | | | | | | Submitted by: Howard Su <howard0su@gmail.com> Reviewed by: delphij, royger, adrian Approved by: adrian (mentor) Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D4676 Notes: svn path=/head/; revision=293873
* - Fix `make depend` in sys/modulesLi-Wen Hsu2015-06-301-1/+1
| | | | | | | | Differential Revision: https://reviews.freebsd.org/D2951 Approved by: delphij Notes: svn path=/head/; revision=284969
* Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft,Xin LI2014-09-131-1/+1
| | | | | | | | | | | | | | | | | 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. This is a stable/10 candidate for inclusion with 10.1-RELEASE. Submitted by: Wei Hu <weh microsoft com> MFC after: 1 week Notes: svn path=/head/; revision=271493
* Fix make depend, apply a bit of style.Ulrich Spörlein2013-09-285-16/+16
| | | | | | | | Approved by: re (marius) Reviewed by: grehan Notes: svn path=/head/; revision=255923
* Fix module build when device ata is not in kernel config.Konstantin Belousov2013-09-141-1/+1
| | | | | | | | | Sponsored by: The FreeBSD Foundation Build-tested by: gjb Approved by: re (delphij) Notes: svn path=/head/; revision=255561
* Revert the kvp code - there's still some work thatPeter Grehan2013-09-091-3/+2
| | | | | | | | | needs to be done for that. Discussed with: Microsoft hyper-v devs Notes: svn path=/projects/hyperv/; revision=255427
* Latest update from Microsoft.Peter Grehan2013-09-092-3/+3
| | | | | | | Obtained from: Microsoft Hyper-v dev team Notes: svn path=/projects/hyperv/; revision=255414
* Microsoft have changed their policy on how the hyper-v code willPeter Grehan2013-07-175-20/+16
| | | | | | | | | | | | | 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. Notes: svn path=/projects/hyperv/; revision=253411
* Connect the stordisengage driver to the build.Peter Grehan2013-07-032-1/+10
| | | | Notes: svn path=/projects/hyperv/; revision=252649