summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2016-01-27shorten a few long linesMike Belopuhov
2016-01-27Include sys/ioccom.h since _IO* is used.Antoine Jacoutot
Based on the number and type of other system headers which pull in ioccom.h, and the fact that videoio.h isn't involved in any massive chain of includes in the kernel, I think it's reasonable and makes porting simpler. -- sthen@ from Brad very reasonable feinerer@, ok sthen@
2016-01-27Removes the abstraction layer to support multiple executable binaries.Martin Pieuchot
Simplifies the API to manipulate symbols now that all our architectures are ELF. ok tb@
2016-01-27Add a key-value interface to pvbus(4) that allows to get or set valuesReyk Floeter
in the underlying information store of the host from the OpenBSD-VM's userspace. OpenBSD did not provide access to these stores before, mostly because we did not want to add a custom tool and interface for each hypervisor. The pvbus(4) interface provides backends for xen(4)'s XenStore and vmt(4)'s VMware Tools "guestinfo". These information stores are fairly different, XenStore is a "filesystem" while vmt is a RPC, and the key-value abstraction limits them a bit but provides the most wanted functionality. Discussed with many OK mikeb@
2016-01-27Remove unused db_sifting().Martin Pieuchot
2016-01-27white space tweaks. no functional change.David Gwynne
2016-01-26- state keys imported by if_pfsync trip refcnt != ~0 AssertAlexandr Nedvedicky
OK mpi@
2016-01-26Convert membar_* operations to bus_dmamap_sync callsMike Belopuhov
2016-01-26Rewrite tx path to use flat transmit ring without fragment chainsMike Belopuhov
Xen doesn't provide transmit fragment chains so initially they were emulated but amount of grant table entries wasted in the process was astronomical (9 times more than after this change). So while code readability was sacrificed a bit, the change comes with a very nice transmit performance improvement and taxes grant table references much less than before.
2016-01-26Rename _{req,rsp}_evt descriptor structure members to _{prod,cons}_eventMike Belopuhov
Setting rxr_ and/or txr_cons_event value allows domU to delay completion notification for receive and/or transmit ring to specified values of consumer index. rxr_ and txr_prod_event values are updated by dom0 and don't seem to hold any significance for us.
2016-01-26No need to take a grant table entry mutex in xen_grant_table_{enter,remove}Mike Belopuhov
Grant table API is constructed in a way that once allocated grant table entries are marked as used and cannot be given away again to some other user. At the same time xen_grant_table_enter and _remove do not operate on the same grant reference at the same time, so there's no need for a lock here. Guard flag operations with memory fences to ensure correct store/load order. This provides some decent performance improvement as well.
2016-01-26Add a grant table reference invalidation spin out checkMike Belopuhov
This debugging check has been helpful in identifying and fixing a few issues already. Subject to removal in the future however.
2016-01-26Implement a rather conservative bus_dmamap_sync APIMike Belopuhov
2016-01-26Make sure to use locked atomic operations even on the SP kernelMike Belopuhov
When executed under the hypervisor we need to make sure that CAS and other atomic operations are executed while locking the bus. Problem reported by Imre Oolberg <imre at auul ! pri ! ee>, thanks!
2016-01-26Improve the previous fix: call vmxnet3_load_mbuf, bpf_mtap, and flipReyk Floeter
the generation bit to pass the tx descriptor and mbuf to the "hardware". This way bpf is not called if vmxnet3_load_mbuf dropped the mbuf. Tested by me OK mikeb@
2016-01-26prettify a NULL test in vr_start.David Gwynne
from richard proctor on bugs@
2016-01-26dont leak mbufs on encap failure.David Gwynne
diff from richard proctor on bugs@
2016-01-25- plugging massive pf_state_key leakAlexandr Nedvedicky
OK mpi@ dlg@ sthen@
2016-01-25Convert to uiomove(). Diff from Martin Natano.Stefan Kempf
2016-01-25Don't count the total number of Xen upcallsMike Belopuhov
2016-01-25Honour ERP protection on 2 GHz channels in 11n mode, as done for 11g.Stefan Sperling
ok millert@
2016-01-25Don't try to interpret htprot data if the last beacon didn't contain such data.Stefan Sperling
ok mpi@ millert@
2016-01-25Do not mix variable declaration and logic.Martin Pieuchot
2016-01-25Kill "#if 0" version of ddb_init().Martin Pieuchot
2016-01-25Kill trailing whitespaces. No object change.Martin Pieuchot
2016-01-25Add short comments explaining HT protection modes.Stefan Sperling
2016-01-25Zero when malloc'ing a buffer to be copyed out to userland to avoidJonathan Gray
an information leak when not all of the buffer is written to. ok mlarkin@
2016-01-25Keep track of HT protection settings in beacons and have 11n-capableStefan Sperling
drivers update hardware configuration accordingly. tested by myself, tb@, deraadt@, abieber@ ok mpi@
2016-01-25Revert the minimum number of Rx ring slots back to 32Mike Belopuhov
Figured out the hard way by Jonathon Sisson <openbsd at j3z ! org>, thanks!
2016-01-25In vmxnet3_start(), do not send the mbuf to bpf after passing it toReyk Floeter
the hardware. This could have resulted in a page fault when the mbuf has already been freed by the TX interrupt handler on another CPU. This has the slight drawback that bpf can be called before the packet is eventually dropped by vmxnet3_load_mbuf() - but I'm getting this simple and verified fix in before doing further optimizations on the start handler. As discussed with mikeb@ jsg@ dlg@
2016-01-25Replace magic numbers.Masao Uebayashi
2016-01-25don't return an uninitialised value for the SIOCGLIFPHYRTABLE caseJonathan Gray
ok yasuoka@ goda@
2016-01-25fix some fallout from the IFQ rototilling.David Gwynne
from the ghost of architectures past
2016-01-23Typo in comment; from MiodAntoine Jacoutot
2016-01-23In some cases machines with virtualisation extensions will boot into aJonathan Gray
HYP processor mode that has different memory management and register behaviour among other things. In this case switch to SVC mode to prevent an early crash. From Patrick Wildt based on code in FreeBSD.
2016-01-23Fix some uses of sizeof where the size of a struct was intended, notJonathan Gray
the size of the pointer to a struct. ok mikeb@
2016-01-22Zero the local structs holding crs information before parsing _CRS.Jonathan Gray
This avoids reading uninitialised memory when expected value types are not present, as is currently the case with gpio signalled interrupts, and could also be the case with buggy aml. Without this change under certain conditions on the ideapad 100s (such as a ramdisk kernel or generic kernel compiled with -O0) ihidev would incorrectly attach to a bogus ioapic interrupt. ok kettenis@
2016-01-22Setup interface features based on capabilities provided by the backendMike Belopuhov
Instead of just setting bits that we think we need, do a better job of figuring out what's supported by the backend and what's not and what do we really need. The following improvements were implemented: o fallback for when scatter gather I/O is not supported by Dom0; o tcp/udp checksum offloading; o larger mtu up to 9000: an experimental feature; o stop requesting multicast control feature that we don't support.
2016-01-22Set minimum number of slots on the receive ring to 18Mike Belopuhov
After some experimentation, discussions with Xen folks and pondering Linux source code, it became clear that most versions of Xen require at least 18 slots available on the receive ring to send an event.
2016-01-22To facilitate reading make sure to use a GTF_invalid flag by nameMike Belopuhov
2016-01-22Convert membar_* calls into virtio_membar_sync where it mattersMike Belopuhov
membar_* functions are defined only as compiler barriers on !MP kernels, while we're trying to be conservative in our use of the barriers. Barriers are placed only where loads and stores might get reordered and it matters at the same time. Shared info page operations are using atomic instructions on Linux, so they get barriers as well.
2016-01-22Straightforward uiomovei -> uiomove conversion. All size arguments forStefan Kempf
uiomove had unsigned types already. Diff from Martin Natano.
2016-01-22Always check destination MAC address of received unicast packets, notStefan Fritsch
only when in promiscuous mode This necessary for NICs like virtio, where the unicast MAC filter is 'best effort' only. ok dlg@ encouragement from mpi@
2016-01-22If usb_fill_udf_task() failed to fill the struct, udf_data stillAlexander Bluhm
contained the pointer it received from user land. usbioctl() has to reset it, otherwise user supplied data is passed to free(). OK mpi@
2016-01-22Drop packets whose VNI flag is not set and VNI is not zeroKazuya Goda
ok reyk@ yasuoka@
2016-01-22Support tunnel VRF on etherip(4)Kazuya Goda
ok dlg@ yasuoka@
2016-01-22add a missing if_put() to ipip_input()Jonathan Gray
ok mpi@
2016-01-22fix a missing if_put() in the default af path of tcp_mss()Jonathan Gray
ok mpi@
2016-01-22Add back the initialisation of a cn30xxipd_offload() variable removedJonathan Gray
in rev 1.6 so SET doesn't or bits into uninitialised memory. ok visa@
2016-01-22remove a surplus splbioJonathan Gray
ok deraadt@ krw@