aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Import kernel WireGuard supportMatt Macy2020-11-2958-1/+45704
| | | | | | | | | | | | | Data path largely shared with the OpenBSD implementation by Matt Dunwoodie <ncon@nconroy.net> Reviewed by: grehan@freebsd.org MFC after: 1 month Sponsored by: Rubicon LLC, (Netgate) Differential Revision: https://reviews.freebsd.org/D26137 Notes: svn path=/head/; revision=368163
* Reduce MAXPHYS back to 128KB on 32bit architectures.Konstantin Belousov2020-11-291-2/+6
| | | | | | | | | | | | | | | Some of them have limited KVA, like arm, which prevents startup from allocating needed number of large pbufs. Other, for instance i386, are dis-balanced enough after 4/4 that blind bump is probably harmful because it allows for much more in-flight io than other tunables are ready for. Requested by: mmel Reviewed by: emaste, mmel Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=368162
* Store MPIDR register in pcpu.Michal Meloun2020-11-293-1/+6
| | | | | | | | | | | | | MPIDR represents physical locality of given core and it should be used as the only viable/robust connection between cpuid (which have zero relation to cores topology) and external description (for example in FDT). It can be used for determining which interrupt is associated to given per-CPU PMU or by scheduler for determining big/little core or cluster topology. MFC after: 3 weeks Notes: svn path=/head/; revision=368161
* iconv(1): Add EXAMPLEFernando Apesteguía2020-11-291-0/+7
| | | | | | | | | | | Just a small example to show simple usage. Approved by: manpages (0mp@) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D27385 Notes: svn path=/head/; revision=368160
* Remove unused options.Michal Meloun2020-11-294-18/+0
| | | | | | | | Marvell files and their related SOC_MV_<foo> options should be cleaned up in another pass. Notes: svn path=/head/; revision=368159
* _ARM_ARCH_5E is always defined, we not support older CPUs.Michal Meloun2020-11-295-992/+2
| | | | Notes: svn path=/head/; revision=368158
* security(7): fix copy/paste error and correct aslr oidsYuri Pankov2020-11-291-3/+3
| | | | | | | | Submitted by: Mina Galić <me_igalic.co> Differential Revision: https://reviews.freebsd.org/D27408 Notes: svn path=/head/; revision=368157
* Only set the PCI bus end when we are reducing itAndrew Turner2020-11-291-4/+5
| | | | | | | | | | | | | | | | | | | | | We read the bus end value from the _CRS method. On some systems we need to further limit it based on the MCFG table. Support this by setting a default value, then update it if needed in the _CRS table, and finally reduce it if it is past the end of the MCFG tabel. This will allow for both systems that use either method to encode this value. This partially reverts r347929, removing the error printf. Reviewed by: philip Tested by: philip, Andrey Fesenko <f0andrey_gmail.com> MFC after: 2 weeks Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D27274 Notes: svn path=/head/; revision=368156
* Remove orphaned configs.Michal Meloun2020-11-296-127/+0
| | | | Notes: svn path=/head/; revision=368155
* Remove remaining fragments of code for older already ceased ARM versions.Michal Meloun2020-11-299-1017/+0
| | | | Notes: svn path=/head/; revision=368154
* Remove remaining support of big endian byte order.Michal Meloun2020-11-296-732/+4
| | | | | | | Big endian support was ceased by removing ARMv4 sub architecture. Notes: svn path=/head/; revision=368153
* Introduce rib_walk_ext_internal() to allow iteration with rnh pointer.Alexander V. Chernikov2020-11-292-10/+18
| | | | | | | | | | This solves the case when rib is not yet attached/detached to/from the system rib array. Differential Revision: https://reviews.freebsd.org/D27406 Notes: svn path=/head/; revision=368150
* Add nhop_ref_any() to unify referencing nhop or nexthop group.Alexander V. Chernikov2020-11-293-0/+26
| | | | | | | | | | | It allows code within routing subsystem to transparently reference nexthops and nexthop groups, similar to nhop_free_any(), abstracting ROUTE_MPATH details. Differential Revision: https://reviews.freebsd.org/D27410 Notes: svn path=/head/; revision=368149
* hastd(8) assumes it has no extra file descriptors openedEugene Grosbein2020-11-291-0/+1
| | | | | | | | | | and aborts otherwise, so call closefrom() early. PR: 227461 MFC after: 2 weeks Notes: svn path=/head/; revision=368148
* Refactor fib4/fib6 functions.Alexander V. Chernikov2020-11-295-90/+169
| | | | | | | | | | | | | | | | | No functional changes. * Make lookup path of fib<4|6>_lookup_debugnet() separate functions (fib<46>_lookup_rt()). These will be used in the control plane code requiring unlocked radix operations and actual prefix pointer. * Make lookup part of fib<4|6>_check_urpf() separate functions. This change simplifies the switch to alternative lookup implementations, which helps algorithmic lookups introduction. * While here, use static initializers for IPv4/IPv6 keys Differential Revision: https://reviews.freebsd.org/D27405 Notes: svn path=/head/; revision=368147
* Add tracking for rib/nhops/nhgrp objects and provide cumulative number ↵Alexander V. Chernikov2020-11-295-25/+50
| | | | | | | | | | | | | | | | | accessors. The resulting KPI can be used by routing table consumers to estimate the required scale for route table export. * Add tracking for rib routes * Add accessors for number of nexthops/nexthop objects * Simplify rib_unsubscribe: store rnh we're attached to instead of requiring it up again on destruction. This helps in the cases when rnh is not linked yet/already unlinked. Differential Revision: https://reviews.freebsd.org/D27404 Notes: svn path=/head/; revision=368146
* bhyve: limit max GPA to VM_MAXUSER_ADDRESS_LA48.Konstantin Belousov2020-11-291-3/+3
| | | | | | | | | | | We use 4-level EPT pages, correct the upper bound. Reviewed by: grehan Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D27402 Notes: svn path=/head/; revision=368143
* bio aio: Destroy ephemeral mapping before unwiring page.Konstantin Belousov2020-11-291-4/+3
| | | | | | | | | | | | | | | Apparently some architectures, like ppc in its hashed page tables variants, account mappings by pmap_qenter() in the response from pmap_is_page_mapped(). While there, eliminate useless userp variable. Noted and reviewed by: alc (previous version) Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D27409 Notes: svn path=/head/; revision=368142
* Remove the pre-ARMv6 and pre-INTRNG code.Michal Meloun2020-11-2957-1716/+6
| | | | | | | | ARM has required ARMV6+ and INTRNg for some time now, so remove always false #ifdefs and unconditionally do always true #ifdefs. Notes: svn path=/head/; revision=368141
* hwpstate_intel: don't unconditionally print the error messageYuri Pankov2020-11-291-2/+4
| | | | | | | | | | | Actually check the wrmsr_safe() return value when setting autonomous HWP for package. PR: 245582 Differential Revision: https://reviews.freebsd.org/D24744 Notes: svn path=/head/; revision=368140
* Remove alignment requirements for KVA buffer mapping.Alexander Motin2020-11-291-23/+5
| | | | | | | After r368124 pbuf_zone has extra page to handle this particular case. Notes: svn path=/head/; revision=368138
* Remove aligment requirements for passthrough buffer.Alexander Motin2020-11-291-12/+0
| | | | | | | | After r368124 vmapbuf() should happily map misaligned maxphys-sized buffers thanks to extra page added to pbuf_zone. Notes: svn path=/head/; revision=368136
* Remove alignment requirements for KVA buffer mapping.Alexander Motin2020-11-291-13/+1
| | | | | | | | After r368124 vmapbuf() should happily map misaligned maxphys-sized buffers thanks to extra page added to pbuf_zone. Notes: svn path=/head/; revision=368134
* Mark inline functions static.Alexander Motin2020-11-291-2/+2
| | | | Notes: svn path=/head/; revision=368133
* Increase nvme(4) maximum transfer size from 1MB to 2MB.Alexander Motin2020-11-294-19/+16
| | | | | | | | | | | | | | | | | | | | With 4KB page size the 2MB is the maximum we can address with one page PRP. Going further would require chaining, that would add some more complexity. On the other side, to reduce memory consumption, allocate the PRP memory respecting maximum transfer size reported in the controller identify data. Many of NVMe devices support much smaller values, starting from 128KB. To do that we have to change the initialization sequence to pull the data earlier, before setting up the I/O queue pairs. The admin queue pair is still allocated for full MIN(maxphys, 2MB) size, but it is not a big deal, since there is only one such queue with only 16 trackers. Reviewed by: imp MFC after: 2 weeks Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=368132
* ping: allow building without INET supportAlan Somers2020-11-282-21/+43
| | | | | | | | | | | | | Building without INET6 support was already possible. Now it's possible to build ping with only INET6, or even with neither INET nor INET6. Reported by: bz Reviewed by: bz MFC-With: 368045 Differential Revision: https://reviews.freebsd.org/D27394 Notes: svn path=/head/; revision=368131
* Add watchdog(9) driver for the Fintek F81803 SuperIO chipPoul-Henning Kamp2020-11-285-0/+236
| | | | Notes: svn path=/head/; revision=368130
* Add nhgrp_get_idx() as a counterpart for nhop_get_idx().Alexander V. Chernikov2020-11-282-0/+10
| | | | | | | | It allows the routing-related code to reference nexthop groups by index instead of storing a pointer. Notes: svn path=/head/; revision=368128
* Cleanup nexthops request flags:Alexander V. Chernikov2020-11-281-2/+1
| | | | | | | | * remove NHR_IFAIF as it was used by previous version of nexthop KPI * update NHR_REF description Notes: svn path=/head/; revision=368127
* Remove now unused armv4 and not-INTRNG files.Michal Meloun2020-11-2816-8157/+7
| | | | Notes: svn path=/head/; revision=368126
* libc: Add pthread_attr_get_np(3) stub, reporting ESRCH.Konstantin Belousov2020-11-284-0/+12
| | | | | | | | | | | | | | | This seems to be required by recent clang asan. I do not see other way than put the symbol under FBSD_1.0 version. PR: 251112 Reported by: Andrew Stitcher <astitcher@apache.org> Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D27389 Notes: svn path=/head/; revision=368125
* Make MAXPHYS tunable. Bump MAXPHYS to 1M.Konstantin Belousov2020-11-2899-328/+405
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace MAXPHYS by runtime variable maxphys. It is initialized from MAXPHYS by default, but can be also adjusted with the tunable kern.maxphys. Make b_pages[] array in struct buf flexible. Size b_pages[] for buffer cache buffers exactly to atop(maxbcachebuf) (currently it is sized to atop(MAXPHYS)), and b_pages[] for pbufs is sized to atop(maxphys) + 1. The +1 for pbufs allow several pbuf consumers, among them vmapbuf(), to use unaligned buffers still sized to maxphys, esp. when such buffers come from userspace (*). Overall, we save significant amount of otherwise wasted memory in b_pages[] for buffer cache buffers, while bumping MAXPHYS to desired high value. Eliminate all direct uses of the MAXPHYS constant in kernel and driver sources, except a place which initialize maxphys. Some random (and arguably weird) uses of MAXPHYS, e.g. in linuxolator, are converted straight. Some drivers, which use MAXPHYS to size embeded structures, get private MAXPHYS-like constant; their convertion is out of scope for this work. Changes to cam/, dev/ahci, dev/ata, dev/mpr, dev/mpt, dev/mvs, dev/siis, where either submitted by, or based on changes by mav. Suggested by: mav (*) Reviewed by: imp, mav, imp, mckusick, scottl (intermediate versions) Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D27225 Notes: svn path=/head/; revision=368124
* Suspend I/O on ahci-cd devices during a snapshot.John Baldwin2020-11-281-1/+1
| | | | | | | Submitted by: Vitaliy Gusev <gusev.vitaliy@gmail.com> Notes: svn path=/head/; revision=368119
* bhyve: Add snapshot support for virtio-rnd.John Baldwin2020-11-282-1/+5
| | | | | | | | | | This uses the same snapshot routine as other VirtIO devices. Submitted by: Vitaliy Gusev <gusev.vitaliy@gmail.com> Differential Revision: https://reviews.freebsd.org/D26265 Notes: svn path=/head/; revision=368118
* bhyve: 'xhci,tablet' snapshot fixesJohn Baldwin2020-11-281-10/+11
| | | | | | | | | | | Permit suspend/resume of a XHCI device model that has not been attached to by a driver in a guest OS. Submitted by: Vitaliy Gusev <gusev.vitaliy@gmail.com> Differential Revision: https://reviews.freebsd.org/D26264 Notes: svn path=/head/; revision=368117
* kern: cpuset: drop the lock to allocate domainsetsKyle Evans2020-11-281-8/+13
| | | | | | | | | | | | | | | | | | | | | Restructure the loop a little bit to make it a little more clear how it really operates: we never allocate any domains at the beginning of the first iteration, and it will run until we've satisfied the amount we need or we encounter an error. The lock is now taken outside of the loop to make stuff inside the loop easier to evaluate w.r.t. locking. This fixes it to not try and allocate any domains for the freelist under the spinlock, which would have happened before if we needed any new domains. Reported by: syzbot+6743fa07b9b7528dc561@syzkaller.appspotmail.com Reviewed by: markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D27371 Notes: svn path=/head/; revision=368116
* Convert vmm_ops calls to IFUNCPeter Grehan2020-11-287-173/+230
| | | | | | | | | | | | | | | | There is no need for these to be function pointers since they are never modified post-module load. Rename AMD/Intel ops to be more consistent. Submitted by: adam_fenn.io Reviewed by: markj, grehan Approved by: grehan (bhyve) MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D27375 Notes: svn path=/head/; revision=368115
* addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be usedEd Maste2020-11-271-65/+212
| | | | | | | | | | | | | | | | | | | Check label's ranges for address we want to translate if a CU doesn't have usable DW_AT_range or DW_AT_low_pc. Use more appropriate names: "struct CU" -> "struct range" Developed as part of upstream ELF Tool Chain bug report https://sourceforge.net/p/elftoolchain/tickets/552/ although this does not address the specific case reported there. Submitted by: Tiger Gao <tig@freebsdfoundation.org> MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23782 Notes: svn path=/head/; revision=368114
* o Move options IOMMU from Debugging section back to the Bus sectionRuslan Bukin2020-11-273-3/+2
| | | | | | | | | | | | | | where it originally was. The bug introduced in r366267. o Remove options IOMMU from i386/MINIMAL as we don't have it in i386/GENERIC. Reported by: Harry Schmalzbauer <freebsd@omnilan.de> Reviewed by: kib Sponsored by: Innovate DSbD Differential Revision: https://reviews.freebsd.org/D27399 Notes: svn path=/head/; revision=368113
* callout(9): Remove some leftover APM BIOS supportMark Johnston2020-11-272-70/+0
| | | | | | | | | | | This code is obsolete since r366546. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D27267 Notes: svn path=/head/; revision=368112
* fix casper initialization for setting scripts.Hajimu UMEMOTO2020-11-271-2/+3
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=368111
* arm: Correctly report the size of FPA registers to GDBMark Johnston2020-11-271-2/+6
| | | | | | | | | | | | Modern ARM systems do not have an FPA unit but GDB reserves register indices for FPA registers and expects the stub to know their sizes. PR: 251022 Submitted by: Dmitry Salychev <dsl@mcusim.org> MFC after: 2 weeks Notes: svn path=/head/; revision=368108
* Some code reorganization.Alexander Motin2020-11-278-375/+322
| | | | | | | | | | | | | | | | - Remove code duplication by adding two new functions to execute prepared queue entry via either mbox or request queue and wait for result. - Since the new function executing via request queue sleeps any way, make it sleep also in case of overflows or handle shortages. It should make it more reliable and less affecting other less flexible request queue users. - Turn isp_target_put_entry() into not target-specific isp_send_entry(). - Make handling of responses with control handles more universal. - Move RQSTYPE_RPT_ID_ACQ handling into new function. - Inline isp_handle_other_response(), becoming trivial after above. - Clean the list of IOCBs from pre-24xx ones. Notes: svn path=/head/; revision=368105
* Make generated C files depend on this MakefileStefan Eßer2020-11-271-4/+4
| | | | | | | | | | | | The contents of lib.c, lib2.c, bc_help.c, and dc_help.c depends on the parameters passed to strgen.sh in this Makefile. A change to the number of parameters of strgen.sh has been applied to the invocation of this command, but this did not cause a rebuild of the generated files. Reported by: Cy.Schubert@cschubert.com Notes: svn path=/head/; revision=368097
* Fix bhyve SMBIOS type 19 handling to avoid misreporting total RAM amountRebecca Cran2020-11-271-1/+1
| | | | | | | | | | | | This fixes the amount of memory displayed in the EDK2 UiApp to be the same as passed on the bhyve command line. Otherwise, 8GB is displayed as 4GB, 32GB as 28GB etc. Reviewed by: jhb, kib, rgrimes Differential Revision: https://reviews.freebsd.org/D27348 Notes: svn path=/head/; revision=368093
* bhyve: fix smbiostbl.c style issues and add comment about date formatRebecca Cran2020-11-271-2/+3
| | | | | | | | | Fix a couple of style issues introduced in my previous commit. Add a comment explaining that the SMBIOS specification defines the date format to be mm/dd/yyyy, which is why we don't use ISO 8601. Notes: svn path=/head/; revision=368092
* Restore break statement lost in r367857.Alexander Motin2020-11-271-0/+1
| | | | Notes: svn path=/head/; revision=368091
* libprocstat.3: Correct two occurrences of kvm_getprocs to procstat_getprocsMateusz Piotrowski2020-11-261-3/+3
| | | | | | | | | | Submitted by: otis_sk.freebsd.org Reviewed by: markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D26151 Notes: svn path=/head/; revision=368084
* Remove stray column.Konstantin Belousov2020-11-261-1/+1
| | | | | | | | Sponsored by: The FreeBSD Foundation MFC after: 3 days Notes: svn path=/head/; revision=368083
* Style.Konstantin Belousov2020-11-261-18/+18
| | | | | | | | Sponsored by: The FreeBSD Foundation MFC after: 3 days Notes: svn path=/head/; revision=368082