FreeBSD/src 29a0a72sys/amd64/amd64 sys_machdep.c

amd64 sysarch(2): style

Sponsored by:   Advanced Micro Devices (AMD)
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+4-4sys/amd64/amd64/sys_machdep.c
+4-41 files

FreeBSD/src 4f82af2sys/amd64/amd64 pmap.c

amd64 pmap: do not set PG_G for usermode pmap pml5 kernel entry

Sponsored by:   Advanced Micro Devices (AMD)
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+2-2sys/amd64/amd64/pmap.c
+2-21 files

FreeBSD/src 666303fsys/amd64/amd64 sys_machdep.c

sysarch: improve checks for max user address

making LA48 processes have the same limit as with the pre-LA57 kernels.

Sponsored by:   Advanced Micro Devices (AMD)
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+3-2sys/amd64/amd64/sys_machdep.c
+3-21 files

FreeBSD/src e134cd9sys/amd64/amd64 pmap.c

amd64: pml5 entries do not support PAT bits

Sponsored by:   Advanced Micro Devices (AMD)
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+3-6sys/amd64/amd64/pmap.c
+3-61 files

FreeBSD/src bbb00b1sys/amd64/amd64 pmap.c

pmap_bootstrap_la57(): reload IDT

after the trip through protected mode.  This is required by AMD64 ARM.

Sponsored by:   Advanced Micro Devices (AMD)
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+1-0sys/amd64/amd64/pmap.c
+1-01 files

FreeBSD/src 07f47e8sys/dev/cxgbe/tom t4_tom_l2t.c

cxgbe/t4_tom: completely avoid L2T entries during stop/suspend.

1. Mark the L2T entry valid only if t4_write_l2e succeeds, which won't
   happen if the adapter is stopped.  This prevents L2T entries from
   sometimes getting (re)promoted to VALID on Tx activity during stop.
2. Discard a work request immediately instead of enqueueing it to the
   arp queue if the adapter is stopped.

Fixes:  c1c524852f62 cxgbe/t4_tom: Implement uld_stop and uld_restart for ULD_TOM.
MFC after:      1 week
Sponsored by:   Chelsio Communications
DeltaFile
+13-12sys/dev/cxgbe/tom/t4_tom_l2t.c
+13-121 files

FreeBSD/src 855c3dasys/arm64/freescale/imx/clk imx_clk_composite.c

imx clk: Skip reconfiguring the clock if we don't have a new best_parent

imx_clk_composite_find_best_parent can fail, when it does for all the
clocks checked we attempt to configure an uninitialized best_parent
leading to a panic.

Initialize best_parent and skip reconfiguring the clock if we don't find
a new best_parent to use.

Reviewed By: manu
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D46662
DeltaFile
+5-0sys/arm64/freescale/imx/clk/imx_clk_composite.c
+5-01 files

FreeBSD/src 80eb861sbin/pfctl parse.y

pfctl: lex <=, >=, and != into a single token

lex <=, >=, and != into a single token for correctness and to reduce the
lookahead in the parser
ok henning otto

Reviewed by:    zlei
Obtained from:  OpenBSD, deraadt <deraadt at openbsd.org>, e6e3ecf338
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D46582
DeltaFile
+14-6sbin/pfctl/parse.y
+14-61 files

FreeBSD/src 357c95etests/sys/netpfil/pf pass_block.sh

pf tests: ensure we correctly optimize { any, 192.0.2.3 }

Reviewed by:    zlei
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D46581
DeltaFile
+36-0tests/sys/netpfil/pf/pass_block.sh
+36-01 files

FreeBSD/src 637d81csbin/pfctl parse.y pfctl_parser.h

pfctl: fix incorrect optimization

In the non-optimized case, an address list containing "any" (ie. { any 10.0.0.1 })
should be folded in the parser to any, not to 10.0.0.1.  How long this bug has
been with us is unclear.
ok guenther mcbride

Obtained from:  OpenBSD, deraadt <deraadt at openbsd.org>, e3b4bc25a0
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D46580
DeltaFile
+11-3sbin/pfctl/parse.y
+2-0sbin/pfctl/pfctl_parser.h
+13-32 files

FreeBSD/src e80f2a1share/man/man5 pf.conf.5

pf.conf.5: document received-on

Reviewed by:    zlei
Obtained from:  OpenBSD, dlg <dlg at openbsd.org>, 456093dddc
Obtained from:  OpenBSD, jmc <jmc at openbsd.org>, 2bf0158fa8
Obtained from:  OpenBSD, deraadt <deraadt at openbsd.org>, be785dc6e2
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D46579
DeltaFile
+8-2share/man/man5/pf.conf.5
+8-21 files

FreeBSD/src 661d003sbin/pfctl/tests pfctl_test_list.inc, sbin/pfctl/tests/files pf1022.in pf1022.ok

pf tests: test the new received-on feature

Reviewed by:    zlei
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D46578
DeltaFile
+82-0tests/sys/netpfil/pf/pass_block.sh
+1-0sbin/pfctl/tests/pfctl_test_list.inc
+1-0sbin/pfctl/tests/files/pf1022.in
+1-0sbin/pfctl/tests/files/pf1022.ok
+85-04 files

FreeBSD/src 2339eadlib/libpfctl libpfctl.c, sbin/pfctl parse.y pfctl_parser.c

pf: allow filtering on the receive interface

add support to pf for filtering a packet by the interface it was received
on. use the received-on IFNAME filter option on a pf.conf rule to restrict
which packet the interface had to be received on. eg:

  pass out on em0 from $foo to $bar received-on fxp0

ive been running this in production for a week now. i find it particularly
usefull with interface groups.

no objections, and a few "i like"s from henning, claudio, deraadt, mpf

Obtained from:  OpenBSD, dlg <dlg at openbsd.org>, 95b4320893
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D46577
DeltaFile
+25-12sbin/pfctl/parse.y
+24-0sys/netpfil/pf/pf.c
+14-1sys/netpfil/pf/pf_ioctl.c
+3-0sys/netpfil/pf/pf_nl.c
+2-0lib/libpfctl/libpfctl.c
+2-0sbin/pfctl/pfctl_parser.c
+70-133 files not shown
+74-139 files

FreeBSD/src 50ecaf1sys/netpfil/pf pf.c

pf: use AF_INET6 when comparing IPv6 addresses

Reviewed by:    zlei
MFC after:      1 week
Obtained from:  OpenBSD, henning <henning at openbsd.org>, cf7c0bf78a
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D46576
DeltaFile
+2-2sys/netpfil/pf/pf.c
+2-21 files

FreeBSD/src 2ca286dsys/netpfil/pf pf.c

pf: always drop ICMPv6 in IPv4 datagrams

Not only when compiled with INET6.

Suggested by Max Laier.
ok henning@

Reviewed by:    zlei
Obtained from:  OpenBSD, jsing <jsing at openbsd.org>, 0ba1e6e32b9
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D46575
DeltaFile
+0-2sys/netpfil/pf/pf.c
+0-21 files

FreeBSD/src 28d35abtools/build stale-symlink-buildworld.sh

stale-symlink-buildworld.sh: improve documentation

(cherry picked from commit c77ca9a72c9934c407852f00d88cba09f5c9e31f)
DeltaFile
+10-1tools/build/stale-symlink-buildworld.sh
+10-11 files

FreeBSD/src 009c3c5tools/build stale-symlink-buildworld.sh

stale symlinks: configurable obj dir prefix

Use $MAKEOBJDIRPREFIX if set, otherwise /usr/obj

(cherry picked from commit ccb0365643dc5e8d37ada3789bbe370b81ba5b3c)
DeltaFile
+3-1tools/build/stale-symlink-buildworld.sh
+3-11 files

FreeBSD/src a213882tools/build stale-symlink-buildworld.sh

stale-symlink-buildworld.sh: improve documentation

(cherry picked from commit c77ca9a72c9934c407852f00d88cba09f5c9e31f)
DeltaFile
+10-1tools/build/stale-symlink-buildworld.sh
+10-11 files

FreeBSD/src 9ff3c09tools/build stale-symlink-buildworld.sh

stale symlinks: configurable obj dir prefix

Use $MAKEOBJDIRPREFIX if set, otherwise /usr/obj

(cherry picked from commit ccb0365643dc5e8d37ada3789bbe370b81ba5b3c)
DeltaFile
+3-1tools/build/stale-symlink-buildworld.sh
+3-11 files

FreeBSD/src 4f4b483tools/test/stress2/misc mount7.sh

stress2: Added a comment about a problem found and fixed
DeltaFile
+8-0tools/test/stress2/misc/mount7.sh
+8-01 files

FreeBSD/src 678bc22sys/amd64/amd64 pmap.c

la57: do not set global bit for PML5 entry

The bit is reserved for PLM5, causing #PF on KVA access on real
hardware, unlike QEMU.

Sponsored by:   Advanced Micro Devices (AMD)
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+1-1sys/amd64/amd64/pmap.c
+1-11 files

FreeBSD/src 280e504sys/amd64/amd64 locore.S

amd64 la57_trampoline: save registers in memory

AMD64 ARM states that 64bit part of the architectural state is undefined
after 32<->64 mode switching.

Sponsored by:   Advanced Micro Devices (AMD)
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+12-9sys/amd64/amd64/locore.S
+12-91 files

FreeBSD/src 687b896sys/amd64/amd64 locore.S

amd64 la57_trampoline: lgdt descriptor is always 10 bytes in long mode

Extend its storage to be compliant.
This is currently nop due to padding and nul gdt descriptor right after
the lgdt descriptor.

Sponsored by:   Advanced Micro Devices (AMD)
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+1-1sys/amd64/amd64/locore.S
+1-11 files

FreeBSD/src 1be58e6sys/amd64/amd64 locore.S

amd64 la57_trampoline: turn off global pages and PCID before turning off paging

SDM is explicit that having CR4.PCID=1 while toggling CR3.PG causes #GP.
To be safe and to avoid some more effects, also turn off CR4.PGE.

Sponsored by:   Advanced Micro Devices (AMD)
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+7-0sys/amd64/amd64/locore.S
+7-01 files

FreeBSD/src b7ea2b6sys/amd64/amd64 locore.S

amd64 la57_trampoline: disable EFER.LME around setting CR4.LA57

Changing paging mode while LME is set seems to be not allowed.

Sponsored by:   Advanced Micro Devices (AMD)
Sponsored by:   jThe FreeBSD Foundation
MFC after:      1 week
DeltaFile
+10-0sys/amd64/amd64/locore.S
+10-01 files

FreeBSD/src 9a49c98sys/amd64/amd64 locore.S

amd64 la57_trampoline: stop using %rdx to remember original %cr0

Store %cr0 in %ebp.  %rdx is needed for MSR access.

Sponsored by:   Advanced Micro Devices (AMD)
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+5-3sys/amd64/amd64/locore.S
+5-31 files

FreeBSD/src 180c8absys/amd64/amd64 locore.S

amd64 la57_trampoline: jump immediately after re-enabling paging

Literally follow requirements from SDM and execute jmp right after
%cr0 CR0_PG bit is toggled back.

Sponsored by:   Advanced Micro Devices (AMD)
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+2-1sys/amd64/amd64/locore.S
+2-11 files

FreeBSD/src 2912c2fsys/amd64/amd64 pmap.c

amd64 pmap: be more verbose around entering and leaving LA57 trampoline

Sponsored by:   Advanced Micro Devices (AMD)
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+7-0sys/amd64/amd64/pmap.c
+7-01 files

FreeBSD/src 787259bsys/amd64/amd64 pmap.c

amd64 pmap: flush whole TLB after LA57 trampoline is installed

Sponsored by:   Advanced Micro Devices (AMD)
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+1-1sys/amd64/amd64/pmap.c
+1-11 files

FreeBSD/src bae5170sys/vm swap_pager.c

swap_pager: enhance meta_transfer comments

Clarify comments about what happens to source blocks in
swp_pager_meta_transfer.  No functional changes.

Reviewed by:    alc
Differential Revision:  https://reviews.freebsd.org/D46682
DeltaFile
+5-3sys/vm/swap_pager.c
+5-31 files