summaryrefslogtreecommitdiffstats
path: root/sys/dev/pv/hyperv.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* dev/rndvar.h no longer has statistical interfaces (removed during variousderaadt2020-05-291-2/+0
| | | | | | conversion steps). it only contains kernel prototypes for 4 interfaces, all of which legitimately belong in sys/systm.h, which are already included by all enqueue_randomness() users.
* Attach Hyper-V guest services to VMBus 4.0mikeb2019-10-071-0/+1
| | | | | | Tested by Andre Stoebe and Remi Locherer. ok deraadt, tb
* Provide a handler stub for the "channel rescind" messagemikeb2017-06-271-1/+12
|
* Rework the deferred interrupt loopmikeb2017-06-261-12/+15
| | | | | | | By performing a task_add an interrupt handler can rely on the taskq_thread to invoke it again with an additional benefit of being able to sched_pause when required. In the long run more than 99.8% of calls do not require an additional iteration.
* Event interrupt handler should call hv_channel_schedule nowmikeb2017-06-231-2/+1
|
* Introduce deferred interrupt processing capabilitymikeb2017-06-231-0/+80
| | | | | | | Hyper-V interrupts seem to be sometimes delivered before the message becomes available on the channel ring. This is reproducible on hvs(4) under load. This change is modelled on the workaround found in the Linux driver.
* s/membar_sync/virtio_membar_sync/mikeb2017-06-231-4/+4
|
* Don't defer attaching PV devicesmikeb2017-06-151-11/+2
| | | | | Now that both hvn(4) and hvs(4) can perform VMBus channel operations during autoconf, it's no longer necessary to defer their attachment.
* Make sure we can free GPA handles when coldmikeb2017-06-151-1/+2
|
* Add another type of a scatter-gather list operation used by StorVSCmikeb2017-06-141-0/+44
| | | | Obtained from FreeBSD.
* Make sure we're producing a 64-bit value when shifting leftmikeb2017-01-161-1/+1
| | | | | Reported by brad and kettenis separately; Mark has even sent me a diff and told to commit it with OK kettenis.
* Microsoft has allocated us a SubID that we can use to identify OpenBSDmikeb2017-01-051-3/+3
|
* Don't let producer index become equal with the consumer when writingmikeb2017-01-051-4/+7
| | | | | | A nod to the re.c commit by dlg@, perhaps pure paranoia, but works nevertheless. While here replace a more expensive modulo operation with a subtraction.
* Move as much code out of a startup hook as possiblemikeb2016-11-231-49/+71
| | | | | | | | | | | | To be able to perform asynchronous operations early we need to have a robust polling mechanism with flexible condition check semantics. A new hv_wait interface provides such facilities. Right now hvn(4) submits NVS commands and sleeps waiting for a interrupt to fire and run the completion code and it will take some effort to convert this code to be able to poll instead of tsleep. But VMBus attachment, channel scanning, etc can done at an earlier stage. Lets see if this sticks.
* M_*WAIT* flags cannot be treated as boolean valuesmikeb2016-11-231-6/+6
|
* Disable debugging outputmikeb2016-11-231-2/+2
|
* Use CPUID flags to determine working componentsmikeb2016-11-221-2/+9
| | | | | | | | | This adds a few checks to make sure we're not trying to use features that are not advertised with CPUID feature flags and avoid attaching when Xen viridium emulation is turned on. Prompted by a report from Kirill Miazine <km at krot ! org>, thanks! Discussed with reyk@.
* Minor cleanup, remove unused structure membersmikeb2016-11-141-15/+13
|
* Set the reserved field to zeromikeb2016-11-101-0/+1
|
* Reserve extra space for the bufring header structuremikeb2016-11-081-1/+1
|
* Identify as an OSPlatformID 131 with a kernel version of 6mikeb2016-11-031-6/+6
|
* Inline the macro that is used only oncemikeb2016-11-021-5/+5
|
* Fixup a wait channel used during VMBus channel discoverymikeb2016-11-021-3/+3
| | | | | | Clang static analyser has found that a tsleep was using an uninitialised pointer value as a wait channel. An associated wakeup wasn't doing the right thing either.
* Improve channel ring locking strategymikeb2016-10-271-11/+13
| | | | | | | | Make sure to hold the ring buffer lock for the complete duration of a channel ring I/O operation. For read operations this means peeking and reading is done uninterrupted and for both reads and writes this places the buffer space availability check under the same lock as well.
* Channel API users should pick the bufring sizemikeb2016-10-251-18/+15
| | | | | | | | | hvn(4) needs to be able to put up to 128 RNDIS data messages on the channel ring each pointing up to 16 fragments in addition to a small number of RNDIS control messages. This simplifies accounting of available TX descriptors in relation to the available space on the channel ring and as a results prevents packet drops due to the ring being full.
* The trailing producer index must point to the beginning of the messagemikeb2016-10-141-1/+1
|
* Move Hyper-V integration components into a separate source filemikeb2016-10-111-278/+4
| | | | Input & OK reyk.
* Reshuffle GUID device ID table and add $ tags to headersmikeb2016-10-101-106/+116
|
* Check the actual pointer returned by km_alloc(9) instead of the array. Thekettenis2016-10-041-2/+2
| | | | | | | | latter will always be non-NULL, and therefore the test will always be false. Caught by clang. ok jca@, mikeb@, jsg@
* Add an API to hook up event countersmikeb2016-09-201-0/+8
|
* Clean up style and replace a magic value with a magic definemikeb2016-08-181-1/+1
|
* Sync up monitor trigger groups handling to the upstreammikeb2016-08-171-17/+16
| | | | | Replace hand rolled atomic bit operations and use MI ones from DRM and convert event matrixes to arrays of longs.
* Update Hyper-V structure definitions to the 2016 versionmikeb2016-08-161-237/+234
| | | | | | | Microsoft has performed a significant clean up and stylistic improvement of Hyper-V structure definitions and updated FreeBSD port. We update to stay in sync with the upstream and improve maintainability of this code in the future.
* Fixup incorrect format specification bugs spotted by jsg@mikeb2016-08-081-5/+5
|
* Switch pending event clearing to an atomic swap operationmikeb2016-08-051-3/+4
| | | | | | | | | Rather than performing an atomic bit clearing for every encountered event bit set we can adjust the code to perform an atomic swap of a single row of the events array and decrease the amount of expensive atomic operations. From FreeBSD.
* Fixup incorrect EAGAIN handlingmikeb2016-08-051-1/+1
|
* Read events array offset must be calculated in bytesmikeb2016-08-051-1/+2
|
* Remove incorrect optimization: ring data portion size is not power of 2mikeb2016-08-051-3/+3
|
* Fixup the condition that prevented heartbeat & co. from attachingmikeb2016-08-051-1/+1
|
* Revert previous commitmikeb2016-07-281-5/+5
|
* Convert ifq_deq_{begin,rollback,commit} dance to a single ifq_dequeuemikeb2016-07-281-5/+5
|
* Remove a few debugging leftoversmikeb2016-07-211-7/+0
|
* Fix a memory leak in an error path.jsg2016-06-271-1/+3
| | | | ok mikeb@
* Correct the order of memset arguments.jsg2016-06-271-2/+2
| | | | ok mikeb@
* Main Hyper-V nexus driver, work in progress.mikeb2016-06-221-0/+1927
ok mlarkin, deraadt