]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
4 years agolibzpool: lz4.c build needs CFLAGS.lz4.c
Toomas Soome [Mon, 2 Dec 2019 15:28:06 +0000 (15:28 +0000)]
libzpool: lz4.c build needs CFLAGS.lz4.c

For some reason the setup from CURRENT did not work, probably I did mix
something up.

4 years agoMFC r354267:
Toomas Soome [Mon, 2 Dec 2019 12:26:47 +0000 (12:26 +0000)]
MFC r354267:
r354264 did mix up the directory path

The correct path is sys/cddl/contrib/opensolaris/common/lz4, not
sys/cddl/contrib/opensolaris/lz4

Reported by: Michael Butler

4 years agoMFC r354253, r354254, r354264, r354265
Toomas Soome [Mon, 2 Dec 2019 11:44:39 +0000 (11:44 +0000)]
MFC r354253, r354254, r354264, r354265
Remove duplicate lz4 implementations

Port illumos change: https://www.illumos.org/issues/11667

Move lz4.c out of zfs tree to opensolaris/common/lz4, adjust it to be
usable from kernel/stand/userland builds, so we can use just one single
source. Add lz4.h to declare lz4_compress() and lz4_decompress().

Differential Revision: https://reviews.freebsd.org/D22037

4 years agor353501 did mimerge r350654 boot1 and gptboot were left out
Toomas Soome [Mon, 2 Dec 2019 09:57:07 +0000 (09:57 +0000)]
r353501 did mimerge r350654 boot1 and gptboot were left out

Replace left over BS->HandleProtocol by OpenProtocolByHandle.

Reported by: Harry Schmalzbauer

4 years agoMFC r354436: MFV r354377: 10554 Implemented zpool sync command
Andriy Gapon [Mon, 2 Dec 2019 07:39:55 +0000 (07:39 +0000)]
MFC r354436: MFV r354377: 10554 Implemented zpool sync command

This addition will enable us to sync an open TXG to the main pool on
demand.  The functionality is similar to sync(2) but 'zpool sync' will
return when data has hit the main storage instead of potentially just
the ZIL as is the case with the sync(2) cmd.

4 years agoMFC r354627: db_nextframe/i386: reduce the number of special frame types
Andriy Gapon [Mon, 2 Dec 2019 07:22:01 +0000 (07:22 +0000)]
MFC r354627: db_nextframe/i386: reduce the number of special frame types

4 years agoMFC r354886: zpool.8: remove a paragraph about quorum disks
Andriy Gapon [Mon, 2 Dec 2019 07:20:32 +0000 (07:20 +0000)]
MFC r354886: zpool.8: remove a paragraph about quorum disks

4 years agoMFC r355210:
Konstantin Belousov [Mon, 2 Dec 2019 00:39:58 +0000 (00:39 +0000)]
MFC r355210:
In nfs_lock(), recheck vp->v_data after lock before accessing it.

PR: 242184

4 years agoMFC r355060:
Konstantin Belousov [Sun, 1 Dec 2019 16:02:15 +0000 (16:02 +0000)]
MFC r355060:
amd64: assert that EARLY_COUNTER does not corrupt memory.

4 years agoMFC r355061:
Konstantin Belousov [Sun, 1 Dec 2019 15:29:48 +0000 (15:29 +0000)]
MFC r355061:
tmpfs: resolve deadlock between rename and unmount.

4 years agoMFC r354742:
Navdeep Parhar [Sat, 30 Nov 2019 18:05:38 +0000 (18:05 +0000)]
MFC r354742:

cxgbev(4): Catch up with the pciids in the PF driver.

Sponsored by: Chelsio Communications

4 years agoMFC r354522:
Navdeep Parhar [Sat, 30 Nov 2019 18:03:53 +0000 (18:03 +0000)]
MFC r354522:

cxgbe(4): Query Vdd from the firmware if its last known value is 0.

TVSENSE may not be ready by the time t4_fw_initialize returns and the
firmware returns 0 if the driver asks for the Vdd before the sensor is
ready.

Sponsored by: Chelsio Communications

4 years agoMFC r354110:
Navdeep Parhar [Sat, 30 Nov 2019 17:57:37 +0000 (17:57 +0000)]
MFC r354110:

Fix typo in cxgbe.4.

4 years agoMFC r354106:
Navdeep Parhar [Sat, 30 Nov 2019 17:56:04 +0000 (17:56 +0000)]
MFC r354106:

cxgbe(4): Use correct FetchBurstMin values for T6.

Sponsored by: Chelsio Communications

4 years agoMFC r353578:
Navdeep Parhar [Sat, 30 Nov 2019 17:51:08 +0000 (17:51 +0000)]
MFC r353578:

cxgbe(4): An EQ update can be requested in a TX_PKTS2 work request.

Sponsored by: Chelsio Communications

4 years agoMFC r342876: Enable use of Capsicum sandbox when there is only one
Xin LI [Sat, 30 Nov 2019 06:02:13 +0000 (06:02 +0000)]
MFC r342876: Enable use of Capsicum sandbox when there is only one
input file (or the input is stdin) and we are not creating output
file.

Reported by: Lasse Collin

4 years agoMFC r345839, r345894, r345897, r345900-r345901, r345976, r346220, r348602, r348767...
Xin LI [Sat, 30 Nov 2019 05:43:24 +0000 (05:43 +0000)]
MFC r345839, r345894, r345897, r345900-r345901, r345976, r346220, r348602, r348767, r348967, r349047-r349048, r351502, r351623, r352364

r345839: Assert that q can't be NULL.  'empty' is always non-NULL when DIREMPTY
r345894: Restore the ability of checking and fixing next free
r345897: Restore lfcl when LOSTDIR's chain was corrupted and overwritten
r345900: Implement checking of `.' and `..' entries of subdirectory.
r345901: Fix build.
r345976: Write string constant differently to improve readability.
r346220: Don't cast result from malloc().
r348602: Don't increment cl after increment.
r348767: preen should work independently with alwaysyes and alwaysno.
r348967: Avoid out of boundary access when checking invalid long filenames.
r349047: Blankspace.  No actual code change.
r349048: In ask(): override default option if any of alwaysyes/alwaysno/rdonly is
r351502: Comment boot block checks and perform additional sanity checks:
r351623: Remove unneeded blank line.  No functional change.
r352364: Avoid mixing cluster numbers and sector numbers. Makes code more readable.

4 years agoMFC r355128: Update leap-seconds to leap-seconds.3676924800.
Xin LI [Sat, 30 Nov 2019 04:55:17 +0000 (04:55 +0000)]
MFC r355128: Update leap-seconds to leap-seconds.3676924800.

Obtained from: ftp://ftp.nist.gov/pub/time/leap-seconds.3676924800

4 years agoMFC r355000:
Mark Johnston [Fri, 29 Nov 2019 02:16:45 +0000 (02:16 +0000)]
MFC r355000:
Fix typos in the cpuset_{get,set}domain() man page.

4 years agoMFC r354752: Cleanup address range checks in ioat(4).
Alexander Motin [Fri, 29 Nov 2019 01:00:06 +0000 (01:00 +0000)]
MFC r354752: Cleanup address range checks in ioat(4).

 - Deduce allowed address range for bus_dma(9) from the hardware version.
Different versions (CPU generations) have different documented limits.
 - Remove difference between address ranges for src/dst and crc.  At least
docs for few recent generations of CPUs do not mention anything like that,
while older are already limited with above limits.
 - Remove address assertions from arguments.  While I do not think the
addresses out of allowed ranges should realistically happen there due to
the platforms physical address limitations, there is now bus_dma(9) to
make sure of that, preferably via IOMMU.
 - Since crc now has the same address range as src/dst, remove crc_dmamap,
reusing dst2_dmamap instead.

4 years agoMFC r345813 (by tychon):
Alexander Motin [Fri, 29 Nov 2019 00:58:18 +0000 (00:58 +0000)]
MFC r345813 (by tychon):
ioat(4) should use bus_dma(9) for the operation source and destination
addresses

4 years agoMFC r345812 (by tychon):
Alexander Motin [Fri, 29 Nov 2019 00:38:16 +0000 (00:38 +0000)]
MFC r345812 (by tychon):
ioatcontrol(8) could exercise 8k-aligned copy with page-break, crc and
crc-copy modes.

4 years agoMFC r354753: Initialize *comp_update with valid value.
Alexander Motin [Fri, 29 Nov 2019 00:25:39 +0000 (00:25 +0000)]
MFC r354753: Initialize *comp_update with valid value.

I've noticed that sometimes with enabled DMAR initial write from device
to this address is somehow getting delayed, triggering assertion due to
zero default being invalid.

4 years agoMFC r354908:
Dimitry Andric [Thu, 28 Nov 2019 20:09:19 +0000 (20:09 +0000)]
MFC r354908:

Add explanatory comments for the different SRCS_xxx variables used in
the Makefiles for libllvm and libclang.  While here, cleanup a commented
out SRCS entry in libllvmminimal's Makefile.

4 years agoMFC r354549-r354550
Emmanuel Vadot [Thu, 28 Nov 2019 18:50:33 +0000 (18:50 +0000)]
MFC r354549-r354550

r354549:
libpmc: Match on the cpuid with a regex

The CPUID is, or can be, a regex to be matched.
Use regex from libc instead of strcmp

Tested-by: gallatin

r354550:
libpmc: Forgot regex.h

Reported by: ci
X-MFC-With: r354549

4 years agoMFC r353917-r353919, r354396-r354397
Emmanuel Vadot [Thu, 28 Nov 2019 18:44:06 +0000 (18:44 +0000)]
MFC r353917-r353919, r354396-r354397

r353917:
regulator: Add a regnode_method_init

This is a default init method for regulator that don't really
need one.

r353918:
axp81x: Use the default regnode_init method

r353919:
regulator: Add a regnode_set_constraint function

This method check that boot_on or always_on is set to 1 and if it
is it will try to enable the regulator.
The binding docs aren't clear on what to do but Linux enable the regulator
if any of those properties is set so we want to do the same.
The function first check the status to see if the regulator is
already enabled it then get the voltage to check if it is in a acceptable
range and then enables it.
This will be either called from the regnode_init method (if it's needed by the platform)
or by a SYSINIT at SI_SUB_LAST

Reviewed by: mmel
Differential Revision: https://reviews.freebsd.org/D22106

r354396:
regulator: Add regulator_check_voltage function

This function will call the regnode_check_voltage method for a given regulator
and check if the desired voltage in reachable by it.
Also adds a default method that check the std_param and which should be enough
for most regulators and add it as the method for axp* rk805 and fixed regulators.

Reviewed by: mmel
Differential Revision: https://reviews.freebsd.org/D22260

r354397:
arm: allwinner: aw_mmc: Check if the regulator support the voltage

Don't blindy say that we support both 3.3V and 1.8V.
If we have a regulator for the data lines, check that the voltage is
supported before adding the signaling caps.
If we don't have a regulator, just assume that the data lines are 3.3V
This unbreak eMMC on some allwinner boards.

Reported by: ganbold
X-MFC-With: r354396

4 years agoMFC r353354:
Emmanuel Vadot [Thu, 28 Nov 2019 18:18:10 +0000 (18:18 +0000)]
MFC r353354:

dwmmc: Reset the dma controller at attach

If the bootloader enabled DMA we need to fully reset the DMA controller
otherwise we might have some stale data in it that provoke weird
behavior.

4 years agoMFC r352858, r352860, r353172
Emmanuel Vadot [Thu, 28 Nov 2019 18:15:05 +0000 (18:15 +0000)]
MFC r352858, r352860, r353172

r352858:
Import DTS files from Linux 5.2

r352860:
Import DTS files from Linux 5.3

r353172:
arm: dts: ti: Fix mmc3 instance by setting it to disabled

DTS Import of Linux 5.3 added a patch that rework the L3 mmc instance
in the AM335x SoC but removed the status = 'disabled' on the node.
This cause the kernel to probe the device even if the board doesn't
have this mmc used and since we don't correctly activate the clock
for this module we panic with an external data abort.
Beaglebone(s) don't have this device anyway so simply disabling it.
Patch for the DTS was sent upstream.
https://patchwork.kernel.org/patch/11176921/

PR: 241089
Reported by: phk

4 years agoMFC r353524-r353527, r353534
Emmanuel Vadot [Thu, 28 Nov 2019 18:02:13 +0000 (18:02 +0000)]
MFC r353524-r353527, r353534

r353524:
aw_ccung: Add more debug printfs

No functional changes

r353525:
arm64: allwinner: Add new clock aw_clk_np

This is a clock type present in Allwinner H6 where the formula is :
f = fparent * N / P

r353526:
arm64: allwinner: Add aw_clk_nmm clock

This is a clock type present on Allwinner H6 where the formula is :
f = fparent * n / m0 / m1

r353527:
arm: allwinner: Disable the clock before changing it's freq

You aren't supposed to changing the freq of a clock when it is
enable so disable the clock before changing the freq and then
re-enable it.

r353534:
arm: allwinner: Add np and nmm clock file to the build

4 years agoMFC r352940-r352941, r352943-r352944, r353062-r353063, r353125
Emmanuel Vadot [Thu, 28 Nov 2019 17:52:25 +0000 (17:52 +0000)]
MFC r352940-r352941, r352943-r352944, r353062-r353063, r353125

r352940:
generic_ohci: Look for the phy based on the id

phy-names was never in the bindings schema even if it was present
in some DTS. Get the optional phy based on its ID.

r352941:
arm: allwinner: a10_ehci:  Look for the phy based on the id

phy-names was never in the bindings schema even if it was present
in some DTS. Get the optional phy based on its ID.

PR: 240978

r352943:
arm: allwinner: a10_ehci: Enable all phys

Even if there should be only one phy enable all the ones declared in
the dts just to be sure.

r352944:
generic_ehci: Enable all phys and resets

The number of phys and resets is not defined and it controller dependent
so enable/disable every one of them.

r353062:
Split out the attachment from the generic-ehci driver

Create an attachment file for the existing ACPI attachment, and create a
new FDT attachment for the generic-ehci driver.

Submitted by: andrew (Original version)
Differential Revision: https://reviews.freebsd.org/D19389

r353063:
allwinner: Remove a10_ehci driver

We have generic-ehci since r353062 so use it.

X-MFC-With: r353062

r353125:
arm64: rockchip: usb2phy: Add set/get mode

We only support host mode so those functions are just added so
we won't panic when generic-{e,o}hci will set the phy to host mode.

X-MFC-With: r353062

4 years agoMFC r352853, r352903-r352904, r352936-r352937
Emmanuel Vadot [Thu, 28 Nov 2019 17:45:57 +0000 (17:45 +0000)]
MFC r352853, r352903-r352904, r352936-r352937

r352853:
arm64: rockchip: Add usb2phy driver

This driver is for the usb phy present on rockchip SoC.
It only support RK3399 and host mode for now.
The driver expose the usb clock needed by the usb controller.

r352903:
arm64: rockchip: correct reset value

If bit is 0 the reset is not asserted.
Also register our self as a reset provider, this was commented
in r352850

Reported by: mmel

r352904:
arm64: rockchip: rk_clk_pll: Check mode on recalc

If the pll is in slow or deep slow mode return the correct frequency.

r352936:
arm64: rockchip: rk805: Switch to iicdev_{readfrom,writeto}

This simpify the code a bit.

r352937:
syr827: Switch to iicdev_{readfrom,writeto}

Also use IIC_INTRWAIT as we need this to work with the rockchip i2c driver.

4 years agoMFC r347097, r351187, r351551-r351552, r352849-r352852
Emmanuel Vadot [Thu, 28 Nov 2019 17:42:11 +0000 (17:42 +0000)]
MFC r347097, r351187, r351551-r351552, r352849-r352852

r347097 by ganbold:
Add emmc clock definitions for Rockchip RK3399 SoC.

r351187 by mmel:
Improve rk_pinctrl driver:
- add support for 'output-low', 'output-high', 'output-low' and
  'output-enable' properties. These are use in RK3288 DT files
- add support for RK3288
- to reduce overall file size, use local macros for initialization
  of pinctrl description structures.

r351551:
arm64: rk3328: pinctrl: Add gpio banks and fix iomux

Since r351187 the pinctrl driver need to know the gpio bank as it
directly attach the gpio driver to handle some setup that might
be present in the dts, add the gpio banks table for rk3328.
While here fix some IOMUX definition that prevented to boot
on RK3328 as pinctrl wasn't configured correctly.

Submitted by: mmel (original version)
MFC With: r351187

r351552:
arm64: rk3399: pinctrl: Add gpio banks and fix iomux

Since r351187 the pinctrl driver need to know the gpio bank as it
directly attach the gpio driver to handle some setup that might
be present in the dts, add the gpio banks table for rk3399.
While here fix some IOMUX definition that prevented to boot
on RK3399 as pinctrl wasn't configured correctly.

Submitted by: mmel (original version)
MFC With: r351187

r352849:
arm64: rockchip: rk3399: Add usb2 clocks

r352850:
arm64: rockchip: Implement resets

Module resets where not implemented when rockchip clocks were commited.
Implement them.
Since all resets registers are contiguous a driver only need to give
the start offset and the number of resets. This avoid to have to declare
every resets.

r352851:
arm64: rockchip: Fix map_gpio

The map_gpio function wasn't correct, the first element is the pin
and not the phandle.

r352852:
dwc: Add more delay for chip reset

On rockchip board it seems that the value in the DTS
are not enough for reseting the chip, I don't know if
the value are really incorrect or if DELAY is not precise
enough or if the rockchip gpio driver have some "lag" of some
kind or not.
For now just add more delay.

4 years agoMFC r350180, r351100
Emmanuel Vadot [Thu, 28 Nov 2019 17:34:49 +0000 (17:34 +0000)]
MFC r350180, r351100

r350180:
dtso: allwinner: Add an overlay for H3 i2c0

Most of the H3 boards don't enable i2c as it is unused.
Add an overlay so it's easier for user to use i2c device.

r351100:
twsi: Fix build when DEBUG is used on 32bits arch.

4 years agoMFC r350842, r350844-r350846, r351099, r352848, r352859
Emmanuel Vadot [Thu, 28 Nov 2019 17:30:16 +0000 (17:30 +0000)]
MFC r350842, r350844-r350846, r351099, r352848, r352859

r350842:
allwinner: Rework the BUS_PASS on drivers

- Put all clock and control unit driver in BUS_PASS_RESOURCE except
  for the DE2 CCU as it needs the main CCU to be available.
- Use BUS_PASS_CPU for a20_cpu_cfg as it makes more sense.
- For aw_syscon use SCHEDULER pass as we need it early for drivers
  that attach in BUS_PASS_SUPPORTDEV
- For the rest we can use BUS_PASS_SUPPORTDEV

r350844:
allwinner: Add a new clock aw_clk_m

We used the aw_clk_nm clock for clock with only one divider factor
and used a fake multiplier factor. This cannot work properly as we
end up writing the "fake" factor to the register (and so always set
the LSB to 1).
Create a new clock for those.
The reason for not using the clk_div clock is because those clocks are
a bit special. Since they are (almost) all related to video we also need
to set the parent clock (the main PLL) to a frequency that they can support.
As the main PLL have some minimal frequency that they can support we need to
be able to set the main PLL to a multiple of the desired frequency.
Let say you want to have a 71Mhz pixel clock (typical for a 1280x800 display)
and the main PLL cannot go under 192Mhz, you need to set it to 3 times the
desired frequency and set the divider to 3 on the hdmi clock.
So this also introduce the CLK_SET_ROUND_MULTIPLE flag that allow for this kind
of scenario.

r350845:
Remove some duplicate code that end up in r350844

r350846:
allwinner: Add support to min/max in aw_clk_frac

The Fractionals clock in Allwinner device have some min/max frequencies
that they can do.
Add support for it.

r351099:
arm: allwinner: Set aw_ccu to BUS_PASS_BUS

In r350842 I've switched the bus pass to resource so it matches the other
clock drivers but this cannot work as this drivers is meant to match
the dts node '/clocks' and if we don't do it at this pass simplebus is
catching this node and we cannot attach.
This solve booting on Allwinner boards that are still using /clocks (A20 SoC)

r352848:
arm64: allwinner: a64: Add PLL_MIPI

PLL_MIPI is the last important PLL that we missed.
Add support for it.
Since it's one of the possible parent for TCON0 also add this clock
now that we can.
While here add some info about what video related clocks should be
enabled at boot and with what frequency.

r352859:
arm: allwinner: Add pll_mipi to the files

4 years agoMFC r354341: arm64 linuxulator: default to RW stack (no X)
Ed Maste [Thu, 28 Nov 2019 02:19:41 +0000 (02:19 +0000)]
MFC r354341: arm64 linuxulator: default to RW stack (no X)

This matches Linux's default arm64 data / stack permissions.

Sponsored by: The FreeBSD Foundation

4 years agoMFC r354897: sshd: make getpwclass wrapper MON_ISAUTH not MON_AUTH
Ed Maste [Thu, 28 Nov 2019 02:18:19 +0000 (02:18 +0000)]
MFC r354897: sshd: make getpwclass wrapper MON_ISAUTH not MON_AUTH

In r339216 a privsep wrapper was added for login_getpwclass to address
PR 231172.  Unfortunately the change used the MON_AUTH flag in the
wrapper, and MON_AUTH includes MON_AUTHDECIDE which triggers an
auth_log() on each invocation.  getpwclass() does not participate in the
authentication decision, so should be MON_ISAUTH instead.

PR: 234793
Submitted by: Henry Hu
Reviewed by: Yuichiro NAITO
MFC after: 1 week

4 years agoMFC r355101, r355104: cfi: check for inter overflow in cfi_devioctl
Ed Maste [Thu, 28 Nov 2019 02:12:33 +0000 (02:12 +0000)]
MFC r355101, r355104: cfi: check for inter overflow in cfi_devioctl

Reported by: Pietro Oliva
Security: Possible OOB read in root-only ioctl
Sponsored by: The FreeBSD Foundation

4 years agoMFC r354703: Pass more reasonable WAIT flags to bus_dma(9) calls.
Alexander Motin [Thu, 28 Nov 2019 00:42:45 +0000 (00:42 +0000)]
MFC r354703: Pass more reasonable WAIT flags to bus_dma(9) calls.

4 years agoMFC r354702:
Alexander Motin [Thu, 28 Nov 2019 00:40:42 +0000 (00:40 +0000)]
MFC r354702:
Make ntb(4) send bus_get_dma_tag() requests to parent buses passing real
bus' child pointers instead of grandchilds.

DMAR does not like requests from devices not parented directly by PCI.

4 years agoMFC r350579,r350741,r352584
Alan Cox [Wed, 27 Nov 2019 19:34:33 +0000 (19:34 +0000)]
MFC r350579,r350741,r352584
  Enable superpage promotion within the kernel pmap.

  Ordinarily, during a superpage promotion or demotion within a pmap, the
  pmap's lock ensures that other operations on the pmap don't observe the
  old mapping being broken before the new mapping is established.  However,
  pmap_kextract() doesn't acquire the kernel pmap's lock, so it may observe
  the broken mapping.  And, if it does, it returns an incorrect result.

  This revision implements a lock-free solution to this problem in
  pmap_update_entry() and pmap_kextract() because pmap_kextract() can't
  acquire the kernel pmap's lock.

  In case a translation fault on the kernel address space occurs from
  within a critical section, we must perform a lock-free check on the
  faulting address.

4 years agoMFC r354867:
Vincenzo Maffione [Wed, 27 Nov 2019 18:52:01 +0000 (18:52 +0000)]
MFC r354867:

netmap: check if we already ran mmap before we attempt it

Submitted by:   neel@neelc.org
Reviewed by:    vmaffione
Differential Revision:  https://reviews.freebsd.org/D22390

4 years agoMFC rr354733:
Cy Schubert [Wed, 27 Nov 2019 03:18:35 +0000 (03:18 +0000)]
MFC rr354733:
Disable ntpd stack gap. When ASLR with STACK GAP != 0 ntpd suffers SIGSEGV.

PR: 241421, 241960
Reported by: Vladimir Zakharov <zakharov.vv@gmail.com>,
dewayne@heuristicsystems.com.au
Reviewed by: kib, imp (previous version), ian (suggestion)
Differential Revision: https://reviews.freebsd.org/D22358

4 years agoPartially revert r355028. hpt27xx is not Giant-locked in FreeBSD 12.x,
Scott Long [Tue, 26 Nov 2019 19:04:19 +0000 (19:04 +0000)]
Partially revert r355028.  hpt27xx is not Giant-locked in FreeBSD 12.x,
so is it not going to be deprecated.

Reported by: imp

4 years agoMFC r354659
Vincenzo Maffione [Tue, 26 Nov 2019 18:12:13 +0000 (18:12 +0000)]
MFC r354659

bhyve: rework mevent processing to fix a race condition

At the end of both mevent_add() and mevent_update(), mevent_notify()
is called to wakeup the I/O thread, that will call kevent(changelist)
to update the kernel.
A race condition is possible where the client calls mevent_add() and
mevent_update(EV_ENABLE) before the I/O thread has the chance to wake
up and call mevent_build()+kevent(changelist) in response to mevent_add().
The mevent_add() is therefore ignored by the I/O thread, and
kevent(fd, EV_ENABLE) is called before kevent(fd, EV_ADD), resuliting
in a failure of the kevent(fd, EV_ENABLE) call.

PR:     241808
Reviewed by:    jhb, markj
Differential Revision:  https://reviews.freebsd.org/D22286

4 years agoMFC r354552, r354864
Vincenzo Maffione [Tue, 26 Nov 2019 18:10:45 +0000 (18:10 +0000)]
MFC r354552, r354864

bhyve: add support for virtio-net mergeable rx buffers

Mergeable rx buffers is a virtio-net feature that allows the hypervisor
to use multiple RX descriptor chains to receive a single receive packet.
Without this feature, a TSO-enabled guest is compelled to publish only
64K (or 32K) long chains, and each of these large buffers is consumed
to receive a single packet, even a very short one. This is a waste of
memory, as a RX queue has room for 256 chains, which means up to 16MB
of buffer memory for each (single-queue) vtnet device.
With the feature on, the guest can publish 2K long chains, and the
hypervisor will merge them as needed.

This change also enables the feature in the netmap backend, which
supports virtio-net offloads. We plan to add support for the
tap backend too.
Note that differently from QEMU/KVM, here we implement one-copy receive,
while QEMU uses two copies.

Reviewed by:    jhb
Differential Revision:  https://reviews.freebsd.org/D21007

4 years agoMFC r354841: Add ioat_get_domain() to ioat(4) KPI.
Alexander Motin [Tue, 26 Nov 2019 15:23:24 +0000 (15:23 +0000)]
MFC r354841: Add ioat_get_domain() to ioat(4) KPI.

This allows NUMA-aware consumers to reduce inter-domain traffic.

4 years agoMFC r354840: Call bus_dma_dmar_set_buswide(9) added in r354830.
Alexander Motin [Tue, 26 Nov 2019 15:21:01 +0000 (15:21 +0000)]
MFC r354840: Call bus_dma_dmar_set_buswide(9) added in r354830.

PLX NTB sends translated DMA requests not only from itsels, but from all
slots and functions of its bus.  By default DMAR blocks those additional.

4 years agoMFC r354858:
Andrey V. Elsukov [Tue, 26 Nov 2019 02:50:25 +0000 (02:50 +0000)]
MFC r354858:
  Fix the byte order of IPv4 address parsed from begemotSnmpdTransInetStatus
  config option.

  An address is already in network byte order, there is no need to do
  htonl().

  PR: 242056

4 years agoMFC r355015: MMCCAM: defer release of ccb until we're done with it
Kyle Evans [Mon, 25 Nov 2019 19:38:05 +0000 (19:38 +0000)]
MFC r355015: MMCCAM: defer release of ccb until we're done with it

If we've found a device, we attempt to call xpt_action() on a ccb that's
already been released. Simply defer release until after we're done with it.

4 years agoMFC r355088:
Konstantin Belousov [Mon, 25 Nov 2019 14:18:55 +0000 (14:18 +0000)]
MFC r355088:
Limit bus_dma_dmar_set_buswide() definition to kernel only.

4 years agoMFC r354828:
Konstantin Belousov [Mon, 25 Nov 2019 09:53:49 +0000 (09:53 +0000)]
MFC r354828:
Add x86 msr tweak KPI.

4 years agoMFC r354830:
Konstantin Belousov [Mon, 25 Nov 2019 09:43:36 +0000 (09:43 +0000)]
MFC r354830:
bus_dma_dmar_set_buswide(9): KPI to indicate that the whole dmar
context should share page tables.

4 years agoMFC r354619: db_nextframe/amd64: remove TRAP_INTERRUPT frame type
Andriy Gapon [Mon, 25 Nov 2019 06:16:53 +0000 (06:16 +0000)]
MFC r354619: db_nextframe/amd64: remove TRAP_INTERRUPT frame type

4 years agoMFC r354669, r354672, r354689: move __stack_chk_guard constructor
Kyle Evans [Mon, 25 Nov 2019 03:49:38 +0000 (03:49 +0000)]
MFC r354669, r354672, r354689: move __stack_chk_guard constructor

r354669:
ssp: add a priority to the __stack_chk_guard constructor

First, this commit is a NOP on GCC <= 4.x; this decidedly doesn't work
cleanly on GCC 4.2, and it will be gone soon anyways so I chose not to dump
time into figuring out if there's a way to make it work. xtoolchain-gcc,
clocking in as GCC6, can cope with it just fine and later versions are also
generally ok with the syntax. I suspect very few users are running GCC4.2
built worlds and also experiencing potential fallout from the status quo.

For dynamically linked applications, this change also means very little.
rtld will run libc ctors before most others, so the situation is
approximately a NOP for these as well.

The real cause for this change is statically linked applications doing
almost questionable things in their constructors. qemu-user-static, for
instance, creates a thread in a global constructor for their async rcu
callbacks. In general, this works in other places-

- On OpenBSD, __stack_chk_guard is stored in an .openbsd.randomdata section
  that's initialized by the kernel in the static case, or ld.so in the
  dynamic case
- On Linux, __stack_chk_guard is apparently stored in TLS and such a problem
  is circumvented there because the value is presumed stable in the new
  thread.

On FreeBSD, the rcu thread creation ctor and __guard_setup are both unmarked
priority. qemu-user-static spins up the rcu thread prior to __guard_setup
which starts making function calls- some of these are sprinkled with the
canary. In the middle of one of these functions, __guard_setup is invoked in
the main thread and __stack_chk_guard changes- qemu-user-static is promptly
terminated for an SSP violation that didn't actually happen.

This is not an all-too-common problem. We circumvent it here by giving the
__stack_chk_guard constructor a solid priority. 200 was chosen because that
gives static applications ample range (down to 101) for working around it
if they really need to. I suspect most applications will "just work" as
expected- the default/non-prioritized flavor of __constructor__ functions
run last, and the canary is generally not expected to change as of this
point at the very least.

This took approximately three weeks of spare time debugging to pin down.

r354672:
ssp: rework the logic to use priority=200 on clang builds

The preproc logic was added at the last minute to appease GCC 4.2, and
kevans@ did clearly not go back and double-check that the logic worked out
for clang builds to use the new variant.

It turns out that clang defines __GNUC__ == 4. Flip it around and check
__clang__ as well, leaving a note to remove it later.

r354689:
ssp: further refine the conditional used for constructor priority

__has_attribute(__constructor__) is a better test for clang than
defined(__clang__). Switch to it instead.

While we're already here and touching it, pfg@ nailed down when GCC actually
introduced the priority argument -- 4.3. Use that instead of our
hammer-guess of GCC >= 5 for the sake of correctness.

PR: 241905

4 years agoMFC r354999: Fix off-by-one error in HPA/AMA maximum reporting.
Alexander Motin [Mon, 25 Nov 2019 03:38:49 +0000 (03:38 +0000)]
MFC r354999: Fix off-by-one error in HPA/AMA maximum reporting.

Before my refactoring the code reported value as maximum number of sectors,
adding one to the maximum sector number returned by respective command.
While this difference is somewhat confusing, restore previous behavior.

4 years agoMFC r354997: add deprecation notice to amd man page
Ed Maste [Mon, 25 Nov 2019 01:32:50 +0000 (01:32 +0000)]
MFC r354997: add deprecation notice to amd man page

Clarify the deprecation notice in amd.8.  amd will be removed from the
FreeBSD base system before FreeBSD 13.0.

Discussed with: cy

4 years agoMFC r354822:
Mark Johnston [Mon, 25 Nov 2019 00:34:59 +0000 (00:34 +0000)]
MFC r354822:
Fix inconsistencies in anonymous DOF files.

4 years agoMFC r354829:
Mark Johnston [Mon, 25 Nov 2019 00:33:56 +0000 (00:33 +0000)]
MFC r354829:
Add a "B" suffix to memory quantities in top(1) output.

4 years agoMFC r354790:
Konstantin Belousov [Sun, 24 Nov 2019 12:30:41 +0000 (12:30 +0000)]
MFC r354790:
Add elf image flag to disable stack gap.

4 years agoMFC r354789:
Konstantin Belousov [Sun, 24 Nov 2019 12:27:13 +0000 (12:27 +0000)]
MFC r354789:
kern_exec: p_osrel and p_fctl0 were obliterated by failed execve(2) attempt.

4 years agoMFC r354785
Doug Moore [Sun, 24 Nov 2019 06:46:49 +0000 (06:46 +0000)]
MFC r354785

The loop in vm_map_protect that verifies that all transition map
entries are stabilized, repeatedly verifies the same entry. Check each
entry in turn.

4 years agoMFC r354978:
Cy Schubert [Sun, 24 Nov 2019 02:27:50 +0000 (02:27 +0000)]
MFC r354978:

Chase r344883. ntp is 4.2.8p13.

4 years agoMFC r351605: Man page for AMD Non-Transparent Bridge (ntb_hw_amd) driver.
Alexander Motin [Sun, 24 Nov 2019 01:27:04 +0000 (01:27 +0000)]
MFC r351605: Man page for AMD Non-Transparent Bridge (ntb_hw_amd) driver.

4 years agoMFC r354581,r354597: Add compact scraptchpad protocol for ntb_transport(4).
Alexander Motin [Sun, 24 Nov 2019 00:55:42 +0000 (00:55 +0000)]
MFC r354581,r354597: Add compact scraptchpad protocol for ntb_transport(4).

Previously ntb_transport(4) required at least 6 scratchpad registers,
plus 2 more for each additional memory window.  That is too much for some
configurations, where several drivers have to share resources of the same
NTB hardware.  This patch introduces new compact version of the protocol,
requiring only 3 scratchpad registers, plus one more for each additional
memory window.  The optimization is based on fact that neither of version,
number of windows or number of queue pairs really need more then one byte
each, and window sizes of 4GB are not very useful now.  The new protocol
is activated automatically when the configuration is low on scratchpad
registers, or it can be activated explicitly with loader tunable.

4 years agoMFC r354580: Allow splitting PLX NTB BAR2 into several memory windows.
Alexander Motin [Sun, 24 Nov 2019 00:53:22 +0000 (00:53 +0000)]
MFC r354580: Allow splitting PLX NTB BAR2 into several memory windows.

Address Lookup Table (A-LUT) being enabled allows to specify separate
translation for each 1/128th or 1/256th of the BAR2.  Previously it was
used only to limit effective window size by blocking access through some
of A-LUT elements.  This change allows A-LUT elements to also point
different memory locations, providing to upper layers several (up to 128)
independent memory windows.  A-LUT hardware allows even more flexible
configurations than this, but NTB KPI have no way to manage that now.

4 years agoMFC r354633:
Mike Karels [Sat, 23 Nov 2019 13:20:24 +0000 (13:20 +0000)]
MFC r354633:

Fix netstat -gs with ip_mroute module and/or vnet

The code for "netstat -gs -f inet" failed if the kernel namelist did not
include the _mrtstat symbol. However, that symbol is not in a standard
kernel even with the ip_mroute module loaded, where the functionality is
available. It is also not in a kernel with MROUTING but also VIMAGE, as
there can be multiple sets of stats. However, when running the command
on a live system, the symbol is not used; a sysctl is used. Go ahead
and try the sysctl in any case, and complain that IPv4 MROUTING is not
present only if the sysctl fails with ENOENT. Also fail if _mrtstat is
not defined when running on a core file; netstat doesn't know about vnets,
so can only work if MROUTING was included, and VIMAGE was not.

Reviewed by:    bz

4 years agoMFC 355012 and 355021. Mark trm and hpt27xx for removal in 13.0
Scott Long [Sat, 23 Nov 2019 07:06:16 +0000 (07:06 +0000)]
MFC 355012 and 355021.  Mark trm and hpt27xx for removal in 13.0

4 years agoMFH: r351820
Jason Helfman [Fri, 22 Nov 2019 17:06:32 +0000 (17:06 +0000)]
MFH: r351820
  - correct HISTORY section
  - while here clarify wording

PR: 240260 (based on)
Submitted by: gbergling@gmail.com

4 years agoMFC r354728:
Hans Petter Selasky [Fri, 22 Nov 2019 14:23:11 +0000 (14:23 +0000)]
MFC r354728:
Prevent potential underflow in ibcore.

Linux commit:
a9018adfde809d44e71189b984fa61cc89682b5e

Sponsored by: Mellanox Technologies

4 years agoMFC r354727:
Hans Petter Selasky [Fri, 22 Nov 2019 14:18:12 +0000 (14:18 +0000)]
MFC r354727:
Correct MR length field to be 64-bit in ibcore.

Linux commit:
edd31551148c09608feee6b8756ad148d550ee3b

Sponsored by: Mellanox Technologies

4 years agoMFC r348091 by sobomax: update aacraid driver to 3.2.10
Ed Maste [Thu, 21 Nov 2019 14:54:20 +0000 (14:54 +0000)]
MFC r348091 by sobomax: update aacraid driver to 3.2.10

PR: 209468

4 years agoMFC r354800:
Li-Wen Hsu [Thu, 21 Nov 2019 12:28:41 +0000 (12:28 +0000)]
MFC r354800:

Also clean LINT64 kernel configuration for powerpc

Sponsored by: The FreeBSD Foundation

4 years agoMFC r354212: iicbb: allow longer SCL low timeout and other improvements
Andriy Gapon [Thu, 21 Nov 2019 07:48:03 +0000 (07:48 +0000)]
MFC r354212: iicbb: allow longer SCL low timeout and other improvements

First, SCL low timeout is set to 25 milliseconds by default as opposed
to 1 millisecond before.  The new value is based on the SMBus
specification.  The timeout can be changed on a per bus basis using
dev.iicbb.N.scl_low_timeout sysctl.

The driver uses DELAY to wait for high SCL up to 1 millisecond, then it
switches to pause_sbt(SBT_1MS) for the rest of the timeout.

While here I made a number of other changes.  'udelay' that's used for
timing clock and data signals is now calculated based on the requested
bus frequency (dev.iicbus.N.frequency) instead of being hardcoded to 10
microseconds.  The calculations are done in such a fashion that the
default bus frequency of 100000 is converted to udelay of 10 us.  This
is for backward compatibility.  The actual frequency will be less than a
quarter (I think) of the requested frequency.

Also, I added detection of stuck low SCL in a few places.  Previously,
the code would just carry on after the SCL low timeout and that might
potentially lead to misinterpreted bits.

Finally, I fixed several style issues near the code that I changed.
Many more are still remaining.

4 years agoMFC r354595, r354802:
Xin LI [Thu, 21 Nov 2019 07:29:25 +0000 (07:29 +0000)]
MFC r354595, r354802:

MFV r354582: file 5.37

MFV r354798:

Apply vendor fixes:

06de62c Detect multiplication overflow when computing sector position
46a8443 Limit the number of elements in a vector (found by oss-fuzz)

Security:       CVE-2019-18218

4 years agoMFC r354694, r354699
Brooks Davis [Thu, 21 Nov 2019 00:40:12 +0000 (00:40 +0000)]
MFC r354694, r354699

r354694:
elf_aux_info: Add support for AT_EXECPATH.

Reviewed by: emaste, sef
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D22353

r354699:
Improve the description of AT_EXECPATH availability.

Reported by: kib
Sponsored by: DARPA, AFRL

4 years agoMFC r354201, r354276, r354492-r354517, r354562:
Mark Johnston [Thu, 21 Nov 2019 00:34:39 +0000 (00:34 +0000)]
MFC r354201, r354276, r354492-r354517, r354562:
Add firmware images and support for Intel 9000-series devices.

4 years agoMFC r351589: Fix AHCI Enclosure Management, broken by r351356.
Alexander Motin [Wed, 20 Nov 2019 23:49:47 +0000 (23:49 +0000)]
MFC r351589: Fix AHCI Enclosure Management, broken by r351356.

ivars value of -1 was used to distinguish EM device, and r351356 left some
wrong checks for it.  Give EM device separate flag there instead.

4 years agoMFC r354688:
Brooks Davis [Wed, 20 Nov 2019 23:09:21 +0000 (23:09 +0000)]
MFC r354688:

Fix a typo in the PMAP_PTE_SET_CACHE_BITS macro.

The second argument should have been "pa" not "ps".  It worked by
accident because the argument was always "pa" which was an in-scope
local variable.

Submitted by: sson
Reviewed by: jhb, kevans
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D22338

4 years agoMFC r354787:
Konstantin Belousov [Wed, 20 Nov 2019 10:27:43 +0000 (10:27 +0000)]
MFC r354787:
Document required size of buffer for elf_aux_info(3).

4 years agoMFC r354788:
Konstantin Belousov [Wed, 20 Nov 2019 10:25:50 +0000 (10:25 +0000)]
MFC r354788:
amd64 copyout: remove irrelevant comment.

4 years agoMFC r351812: mpsutil slot set status
Andriy Gapon [Wed, 20 Nov 2019 08:44:29 +0000 (08:44 +0000)]
MFC r351812: mpsutil slot set status

It allows to set the status of an enclosure slot.  Practically, this
means controlling whatever slot status LEDs the enclosure provides.  At
present, the new command does not have sanity checks or any
conveniences.  That means that it is possible to issue the command for
an invalid slot and an enclosure.  But the worst I have seen happening
is either the command failing or simply being ignored.  Also, at the
moment, the status has to be specified as a numeric bit mask.  The bit
definitions can be found in sys/dev/mps/mpi/mpi2_init.h, they are
prefixed with MPI2_SEP_REQ_SLOTSTATUS_.  The only way to address a slot
is by the enclosure handle and the slot number.  Both are readily
available from mpsutil show commands.

The new command is useful alternative to 'sas2ircu locate' command.
First, sas2ircu is a proprietary blob.  Second, it supports setting only
locate / identify status bit.

4 years agoMFC r353887: nctgpio: improve performance (latency) of operation
Andriy Gapon [Wed, 20 Nov 2019 08:41:01 +0000 (08:41 +0000)]
MFC r353887: nctgpio: improve performance (latency) of operation

4 years agoMFC r354205: Remove redundant hw sysctl declaration.
Andriy Gapon [Wed, 20 Nov 2019 08:39:21 +0000 (08:39 +0000)]
MFC r354205: Remove redundant hw sysctl declaration.

gcc CI complains, but clang doesn't.

4 years agoMFC r354183: ow(4): clean up stray white space
Andriy Gapon [Wed, 20 Nov 2019 08:37:22 +0000 (08:37 +0000)]
MFC r354183: ow(4): clean up stray white space

4 years agoMFC r354181: ow(4): protocol timings can now be changed as sysctl-s / tunables
Andriy Gapon [Wed, 20 Nov 2019 08:35:54 +0000 (08:35 +0000)]
MFC r354181: ow(4): protocol timings can now be changed as sysctl-s / tunables

4 years agoMFC r354180: ow(4): increase regular mode recovery time, t_rec, to 15 us
Andriy Gapon [Wed, 20 Nov 2019 08:34:24 +0000 (08:34 +0000)]
MFC r354180: ow(4): increase regular mode recovery time, t_rec, to 15 us

4 years agoMFC r354288:
Vincenzo Maffione [Tue, 19 Nov 2019 21:15:12 +0000 (21:15 +0000)]
MFC r354288:

bhyve: add backend rx backpressure to virtio-net

If a VM is flooded with more ingress packets than the guest OS
can handle, the current virtio-net code will keep reading those
packets and drop most of them as no space is available in the
receive queue. This is an undesirable receive livelock, which
is a waste of CPU and memory resources and potentially opens to
DoS attacks.
With this change, virtio-net uses the new netbe_rx_disable()
function to disable ingress operation in the backend while the
guest is short on RX buffers. Once the guest makes more buffers
available to the RX virtqueue, ingress operation is enabled again
by calling netbe_rx_enable().

Reviewed by:    bryanv, jhb
Differential Revision:  https://reviews.freebsd.org/D20987

4 years agoMFC r354644:
Konstantin Belousov [Tue, 19 Nov 2019 15:32:15 +0000 (15:32 +0000)]
MFC r354644:
amd64: assert that size of the software prototype table for gdt is equal
to the size of hardware gdt.

4 years agoMFC r353618,r353625,r353627: MFV r353617: 9425 allow channel programs to be stopped...
Andriy Gapon [Tue, 19 Nov 2019 07:19:33 +0000 (07:19 +0000)]
MFC r353618,r353625,r353627: MFV r353617: 9425 allow channel programs to be stopped via signals

4 years agoMFC r353729:
Mark Johnston [Mon, 18 Nov 2019 17:19:16 +0000 (17:19 +0000)]
MFC r353729:
Apply mapping protections to .o kernel modules.

4 years agoMFC r354746:
Toomas Soome [Mon, 18 Nov 2019 16:40:03 +0000 (16:40 +0000)]
MFC r354746:
loader: add support for hybrid PMBR for GPT partition table

Note hybrid table is nor really UEFI specification compliant.

Sample hybrid partition table:
> ::mbr
Format: unknown
Signature: 0xaa55 (valid)
UniqueMBRDiskSignature: 0

PART TYPE                  ACTIVE  STARTCHS    ENDCHS      SECTOR     NUMSECT
0    EFI_PMBR:0xee         0       1023/254/63 1023/254/63 1          409639
1    0xff                  0       1023/254/63 1023/254/63 409640     978508408
2    FDISK_EXT_WIN:0xc     0       1023/254/63 1023/254/63 978918048  31250000
3    0xff                  0       1023/254/63 1023/254/63 1010168048 32
>

4 years agoMFC r354743, r354766:
Toomas Soome [Mon, 18 Nov 2019 16:37:21 +0000 (16:37 +0000)]
MFC r354743, r354766:

loader: r354415 did miss to sort subpaths below the partitions
loader: remove unused variable from efipart.c

4 years agoMFC r353672:
Mark Johnston [Mon, 18 Nov 2019 15:28:10 +0000 (15:28 +0000)]
MFC r353672:
Introduce pmap_change_prot() for amd64.

4 years agoMFC r354629:
Mark Johnston [Mon, 18 Nov 2019 15:27:52 +0000 (15:27 +0000)]
MFC r354629:
Fix handling of PIPE_EOF in the direct write path.

4 years agoMFC r354630:
Konstantin Belousov [Mon, 18 Nov 2019 13:38:35 +0000 (13:38 +0000)]
MFC r354630:
amd64: Issue MFENCE on context switch on AMD CPUs when reusing address space.

4 years agoMFC r354591:
Konstantin Belousov [Mon, 18 Nov 2019 13:37:13 +0000 (13:37 +0000)]
MFC r354591:
amd64: Change SFENCE to locked op for synchronizing with CLFLUSHOPT on Intel.

4 years agoMFC r354592:
Konstantin Belousov [Mon, 18 Nov 2019 13:34:27 +0000 (13:34 +0000)]
MFC r354592:
amd64: change r_gdt to the local variable in hammer_time().

4 years agoMFC r354724:
Dimitry Andric [Mon, 18 Nov 2019 07:04:59 +0000 (07:04 +0000)]
MFC r354724:

Merge commit 5bbb604bb from llvm git (by Craig Topper):

  [InstCombine] Disable some portions of foldGEPICmp for GEPs that
  return a vector of pointers. Fix other portions.

  llvm-svn: 370114

This should fix instances of 'Assertion failed: (isa<X>(Val) &&
"cast<Ty>() argument of incompatible type!"), function cast, file
/usr/src/contrib/llvm/include/llvm/Support/Casting.h, line 255', when
building openjdk8 for aarch64 and armv7.

Reported by: jbeich
PR: 236566

4 years agoMFC r352847,352930,354585
Alan Cox [Sun, 17 Nov 2019 22:44:38 +0000 (22:44 +0000)]
MFC r352847,352930,354585
  Eliminate redundant calls to critical_enter() and critical_exit() from
  pmap_update_entry().  It suffices that interrupts are blocked.

  In short, pmap_enter_quick_locked("user space", ..., VM_PROT_READ) doesn't
  work.  More precisely, it doesn't set ATTR_AP(ATTR_AP_USER) in the page
  table entry, so any attempt to read from the mapped page by user space
  generates a page fault.  This problem has gone unnoticed because the page
  fault handler, vm_fault(), will ultimately call pmap_enter(), which
  replaces the non-working page table entry with one that has
  ATTR_AP(ATTR_AP_USER) set.  This change reduces the number of page faults
  during a "buildworld" by about 19.4%.

  Eliminate a redundant pmap_load() from pmap_remove_pages().

  There is no reason why the pmap_invalidate_all() in pmap_remove_pages()
  must be performed before the final PV list lock release.  Move it past
  the lock release.

  Eliminate a stale comment from pmap_page_test_mappings().  We implemented
  a modified bit in r350004.

4 years agoMFC r354520:
Li-Wen Hsu [Sun, 17 Nov 2019 18:25:42 +0000 (18:25 +0000)]
MFC r354520:

Get the fix in back by reverting the part accidentally included in r354491.

This brings back r354467.

Sponsored by: The FreeBSD Foundation