summaryrefslogtreecommitdiffstats
path: root/sys/dev/pv (follow)
Commit message (Collapse)AuthorAgeFilesLines
* use ifiq_input and use it's return value to apply backpressure to rxrs.dlg2020-06-221-2/+4
| | | | this is a step toward deprecating softclock based livelock detection.
* Nuke pointless vioblk_dev_probe() and vioblk_dev_free() functions andkrw2020-06-211-21/+5
| | | | | | | tweak adapter_target and adapter_buswidth values to provide desired semantic of providing only target 0/lun 0 device per vioblk(4) device. Tested by sf@
* dev/rndvar.h no longer has statistical interfaces (removed during variousderaadt2020-05-297-16/+5
| | | | | | 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.
* Force a guest info update when we get a Capabilities_Register command.jmatthew2020-02-161-3/+11
| | | | | | | | ESXi doesn't carry the guest info over when a guest gets moved to a different host, and this appears to be the only hint the guest gets that this has happened. ok dlg@
* IPS_MAXFER, NAX_XFER, and MAXBSIZE are all definedkrw2020-02-142-12/+10
| | | | | | as (64 * 1024). Reduce confusion by using MAXPHYS (a.k.a. (64 * 1024)) as other drivers do.
* Resolve a few issues with interrupt handlingmikeb2020-02-131-2/+4
| | | | | | | | | Upon a failed task_add, the adjusted reference counter needs to be decremented. xen_intr_schedule should follow the same logic as xen_intr. Tested by Niklas Hallqvist. Ok mpi@
* Bring a few stragglers into line with the idiom used by the other 40+krw2020-02-123-20/+16
| | | | | | scsi drivers. i.e. eliminate the struct scsi_adapter member in the softc and rely on the pointer to a static scsi_adapter in the struct scsi_link member.
* Nuke unnecessary abstraction 'scsi_minphys()' which just callskrw2020-02-054-7/+7
| | | | | | 'minphys()'. Just use & check for NULL instead, since 'minphys()' is always called on the code path ([cd|sd|st]minphys) that calls physio().
* Shuffle some names around to make reading the code less headachekrw2020-01-263-5/+5
| | | | | | | | inducing. Rename scsi_adapter member 'scsi_minphys' to 'dev_minphys' to reflect what it is supposed to do. Use consistent naming convention (<dev>_minphys) for the actual device functions. No functional change.
* cleanup unused headers generated by configjsg2020-01-242-5/+3
| | | | ok tedu@ krw@ deraadt@
* Use a consistant idiom/format when declaring scsi_adapter structureskrw2020-01-231-3/+2
| | | | | | | | | | | in drivers. Terse one liners, NULLs instead of 0's, explicitly specify all members, etc. Nuke #ifdef notyet blocks related to the scsi_adapter in aic. No intentional functional change. ok tedu@
* xbf(4): tsleep(9) -> tsleep_nsec(9); ok mikeb@cheloha2020-01-221-2/+2
|
* xenstore: *sleep(9) -> *sleep_nsec(9); ok mikeb@cheloha2020-01-111-7/+9
|
* Convert infinite sleeps to {m,t}sleep_nsec(9).mpi2019-12-311-3/+5
| | | | ok kn@
* include sys/sensors.h for sensor usejsg2019-12-313-2/+5
|
* Add size for free() in vio(4).fcambus2019-12-191-2/+2
| | | | | | | There is an existing allocsize variable tracking size of allocations, turns out we can pass it to free in the error path. OK florian@, mpi@
* pvclock(4): attach even if when PVCLOCK_FLAG_TSC_STABLE is unsetpd2019-12-131-12/+20
| | | | | | | | | | | Attaches pvclock with lower priority (500) in case of unstable tsc (PVCLOCK_FLAG_TSC_STABLE) instead of not attaching at all. In this state, we do make sure to return a monotonically increasing number. This mostly helps openbsd guests on openbsd vmm(4) where a pvclock with unstable tsc is still better than i8254. ok mlarkin@
* Always release interrupt source when unmasking the interruptmikeb2019-12-131-2/+4
| | | | | | | | xen_intr_unmask_release was not decrementing the reference counter on the interrupt source structure when bailing out early which led to the refcnt overflow. From niklas, ok mlarkin
* Remove some space before tab and other small indentation errors.claudio2019-10-251-10/+9
|
* Attach Hyper-V guest services to VMBus 4.0mikeb2019-10-071-0/+1
| | | | | | Tested by Andre Stoebe and Remi Locherer. ok deraadt, tb
* Adopt the SCSI versioning #define's from FreeBSD. Eliminate thekrw2019-09-011-3/+3
| | | | | | | | | | | now unneeded version_to_spc() mapping array, a duplicate #define and a couple of magic numbers. Toss in some comments for future generations of spelunkers. Makes it possible to check for specific SPC versions when new features or eliminated features require such a check. No intentional functional change.
* Don't use misleadingly named SCSISPC() which returns SCSI version notkrw2019-08-301-1/+1
| | | | | | SPC version. Use raw data in version field to check the SPC level until SCSISPC() is straightened out. Actually a bit clearer to read as the raw data is what is manipulated in adjacent code.
* The vio(4) interface did not recover from mbuf shortage. The logicbluhm2019-08-061-5/+2
| | | | | | to start the rx tick did not work since we use if_rxr_get(). An easy fix is to start the rx timeout every second unconditionally. OK dlg@
* Support virtio 1.0 for virtio_pcisf2019-05-262-5/+13
| | | | | virtio 1.0 for virtio_mmio it not yet implemented, but 0.9 devices continue to work.
* Rework virtio_negotiate_features()sf2019-05-269-75/+66
| | | | | | | | | | | | | | | | | | | | | | Add a sc_driver_features field that is automatically used by virtio_negotiate_features() and during reinit. Make virtio_negotiate_features() return an error code. Virtio 1.0 has a special status bit for feature negotiation that means that negotiation can fail. Make virtio_negotiate_features() return an error code instead of the features. Make virtio_reinit_start() automatically call virtio_negotiate_features(). Add a convenience function virtio_has_feature() to make checking bits easier. Add an error check in viomb for virtio_negotiate_features because it has some feature bits that may cause negotiation to fail. More error checking in the child drivers is still missing. ok mlarkin@
* vmm: add host side pvclockpd2019-05-133-23/+26
| | | | | | | | | Emulate kvm pvclock in vmm(4). Compatible with pvclock(4) in OpenBSD. Linux does not attach to this (yet). Fixes by reyk@ and tested extensively by reyk@, tb@ and phessler@ ok mlarkin@ phessler@ reyk@
* Remove unused parameter from virtio_init_vq()sf2019-04-171-5/+5
|
* Initialize virtqueue before passing it to devicesf2019-04-171-3/+2
| | | | Reported by Gary Zibrat
* virtio: Add a few feature bit defines and namessf2019-03-244-51/+66
| | | | ok mlarkin@
* virtio: Prepare for 64 feature bitssf2019-03-2410-62/+62
| | | | | | | | | | | virtio 1.0 supports an arbitrary number of feature bits. However, so far no more than 64 are used (compared to 32 in virtio 0.9). Adjust data types to support 64 feature bits. Later, we may want to use bitmaps and setbit(), ... to support even more feature bits. ok mlarkin@
* virtio: adjust virtio_setup_queue prototype for 1.0sf2019-03-242-10/+7
| | | | | | | | | Make it take an address instead of a PFN. Pass the virtqueue pointer. In virtio 1.0, more information has to be configured in the device. Also call virtio_setup_queue() after the information has been filled in. ok mlarkin@
* virtio: Introduce defines for config(8) flagssf2019-01-192-4/+8
|
* viomb: tweak feature negotiationsf2019-01-191-6/+3
| | | | | | | | VIRTIO_F_RING_INDIRECT_DESC is always negotiated by the transport driver, no need to specify it explicitly. VIRTIO_BALLOON_F_MUST_TELL_HOST is not offered but is handled in the code. Offer it during negotiation, too.
* Fix previoussf2019-01-101-6/+6
| | | | It accidentally contained a part of a different diff.
* Move some PCI-specific defines to a new virtio_pcireg.h filesf2019-01-101-31/+19
| | | | Also add some virtio 1.0 status and feature bits
* Remove some more code if VIRTIO_DEBUG is 0sf2019-01-102-10/+11
|
* Move some common defines to virtiovar.hsf2019-01-102-8/+9
| | | | And fix some comments
* viocon: Remove obsolete handling of sc_intrhandsf2019-01-081-2/+1
|
* virtio: Don't include feature strings without VIRTIO_DEBUGsf2019-01-084-4/+12
| | | | | They are only used if VIRTIO_DEBUG is enabled. This should make the kernel slightly smaller.
* Correctly disable pvclock(4) on old hardware that lack a stable clockreyk2018-12-051-3/+24
| | | | | | | | | | | | I falsely assumed that the KVM_FEATURE_CLOCKSOURCE_STABLE_BIT indicates that the actual clock values are stable, but it turned out that this isn't always the case. To detect if the clock value is stable, we now read it once in pvclock_attach() and check for the PVCLOCK_FLAG_TSC_STABLE flag. This needs further investigation. Reported and fix tested by johnw.mail at gmail.com OK chris@ phessler@
* only attach pvclock(4) inside a KVM guestphessler2018-11-241-2/+4
| | | | | tested by brynet@ OK reyk@
* Add the pvclock(4) guest driver for paravirtual clocksreyk2018-11-233-2/+239
| | | | | | | | | | This improves timekeeping on KVM guests as it runs much better than the virtualized acpihpet or acpitimer timecounters and the invtsc is not always available. Many thanks to Janne Johansson, landry@, and benno@ for testing amd64/i386. OK mlarkin@ phessler@
* Insert a workaround for per-ifp ioctl being called w/o NET_LOCK().mpi2018-09-251-5/+18
| | | | | | | | | | An example of such code path is vlan_destroy() where we don't want to grab the lock because this driver is already NET_LOCK()-free. The real solution to this problem is to stop holding the NET_LOCK() around driver *_ioctl() routines. Problem reported & fix tested by Élie Bouttier, ok visa@, bluhm@
* Add common Ethernet interface attributes to vio(4)'s build config.visa2018-08-241-2/+2
| | | | OK deraadt@
* Let hvn_iff handle promisc mode activationmikeb2018-05-171-29/+24
| | | | Tested by Daniel Wade, <Daniel2 ! Wade at ge ! com>, thanks!
* replace add_*_randomness with enqueue_randomness()jasper2018-04-282-7/+7
| | | | | | | | | this gets rid of the source annotation which doesn't really add anything other than adding complexitiy. randomess is generally good enough that the few extra bits that the source type would add are not worth it. ok mikeb@ deraadt@
* Workaround an Azure UDP transmit checksum offloading bugmikeb2018-03-111-1/+1
| | | | | | | | | | | | According to https://reviews.freebsd.org/D12429, UDP transmit checksum offloading doesn't work in Azure when sizeof(IP hdr + UDP hdr + payload) is greater than 1420 and don't fragment bit isn't set in the IP header. Instead of peeking into the packet and attempting to fix the fallout, we restrict UDP checksum offloading to NDIS versions newer than the one used in Azure (6.30) in an attempt to keep the feature enabled. Unfortunately, there's no way to tell Azure apart from a standalone Hyper-V to make this check more precise.
* Implement the VMWare vmbackup protocol using vfs_stall(). This lets youjmatthew2018-03-081-2/+154
| | | | | | | clone running guests and take disk-only snapshots, most of the time ending up with a clean filesystem. ok dlg@ deraadt@
* Release the netlock when sleeping for control messages in in vioioctl().mpi2018-02-271-3/+5
| | | | Prevents a deadlock reported by aalm@
* Remove almost unused `flags' argument of suser().mpi2018-02-191-2/+2
| | | | | | | The account flag `ASU' will no longer be set but that makes suser() mpsafe since it no longer mess with a per-process field. No objection from millert@, ok tedu@, bluhm@