]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoMFC r306261:
kib [Fri, 30 Sep 2016 09:20:44 +0000 (09:20 +0000)]
MFC r306261:
Add proccontrol(1).

MFC r306281 (by bdrewery):
DIRDEPS_BUILD: Connect new directories.

7 years agoMFC r303019:
ae [Fri, 30 Sep 2016 03:45:41 +0000 (03:45 +0000)]
MFC r303019:
  Use g_resize_provider() to change the size of GEOM_DISK provider,
  when it is being opened. This should fix the possible loss of a resize
  event when disk capacity changed.

MFC r303288:
  Do not invoke resize method if geom is being withered.

MFC r303637:
  Do not invoke resize event if initial disk size is zero. Some disks
  report the size only after first opening.  And due to the events are
  asynchronous, some consumers can receive this event too late and
  this confuses them. This partially restores previous behaviour, and
  at the same time this should fix the problem, when already opened
  provider loses resize event.

PR: 211028

7 years agoMFC r305940:
ae [Fri, 30 Sep 2016 03:27:07 +0000 (03:27 +0000)]
MFC r305940:
  Move opcode rewriter init and destroy handlers into non-VNET code.

  PR: 212576,212649,212077
  Submitted by: John Zielinski

7 years agoMFC 304858,305485,305497: Fix various issues with PCI pass through and VT-d.
jhb [Fri, 30 Sep 2016 01:39:18 +0000 (01:39 +0000)]
MFC 304858,305485,305497: Fix various issues with PCI pass through and VT-d.

304858:
Enable I/O MMU when PCI pass through is first used.

Rather than enabling the I/O MMU when the vmm module is loaded,
defer initialization until the first attempt to pass a PCI device
through to a guest.  If the I/O MMU fails to initialize or is not
present, than fail the attempt to pass a PCI device through to a
guest.

The hw.vmm.force_iommu tunable has been removed since the I/O MMU is
no longer enabled during boot.  However, the I/O MMU support can be
disabled by setting the hw.vmm.iommu.enable tunable to 0 to prevent
use of the I/O MMU on any systems where it is buggy.

305485:
Leave ppt devices in the host domain when they are not attached to a VM.

This allows a pass through device to be reset to a normal device driver
on the host and reused on the host.  ppt devices are now always active in
some I/O MMU domain when the I/O MMU is active, either the host domain
or the domain of a VM they are attached to.

305497:
Update the I/O MMU in bhyve when PCI devices are added and removed.

When the I/O MMU is active in bhyve, all PCI devices need valid entries
in the DMAR context tables. The I/O MMU code does a single enumeration
of the available PCI devices during initialization to add all existing
devices to a domain representing the host. The ppt(4) driver then moves
pass through devices in and out of domains for virtual machines as needed.
However, when new PCI devices were added at runtime either via SR-IOV or
HotPlug, the I/O MMU tables were not updated.

This change adds a new set of EVENTHANDLERS that are invoked when PCI
devices are added and deleted. The I/O MMU driver in bhyve installs
handlers for these events which it uses to add and remove devices to
the "host" domain.

Sponsored by: Chelsio Communications

7 years agoMFC 305248: Remove warning about pci_addr_t being different sizes.
jhb [Fri, 30 Sep 2016 01:16:09 +0000 (01:16 +0000)]
MFC 305248: Remove warning about pci_addr_t being different sizes.

pci_addr_t has always been 64-bits since r163805.

7 years agoMFC 303881: Reliably return PCI_GETCONF_LAST_DEVICE from PCIOCGETCONF.
jhb [Fri, 30 Sep 2016 01:13:57 +0000 (01:13 +0000)]
MFC 303881: Reliably return PCI_GETCONF_LAST_DEVICE from PCIOCGETCONF.

Previously the loop in PCIIOCGETCONF would terminate as soon as it
found enough matches.  Now it will continue iterating through the
PCI device list and only terminate if it finds another matching device
for which it has no room to store a conf structure.  This means that
PCI_GETCONF_LAST_DEVICE is reliably returned when the number of
matching devices is equal to the number of slots in the matches
buffer.  For example, if a program requests the conf structure for a
single PCI function with a specified domain/bus/slot/function it will
now get PCI_GETCONF_LAST_DEVICE instead of PCI_GETCONF_MORE_DEVS.

While here, simplify the loop conditional a bit more by explicitly
breaking out of the loop if copyout() fails and removing a redundant
i < pci_numdevs check.

Sponsored by: Chelsio Communications

7 years agoMFC 303887: Add a dmardump utility to dump the VT-d context tables.
jhb [Fri, 30 Sep 2016 00:33:19 +0000 (00:33 +0000)]
MFC 303887: Add a dmardump utility to dump the VT-d context tables.

This tool parses the ACPI DMAR table looking for DMA remapping devices.
For each device it walks the root table and any context tables
referenced to display mapping info for PCI devices.

Note that acpidump -t already parses the info in the ACPI DMAR tables
directly.  This tool examines some of the data structures the DMAR
remapping engines use to translate DMA requests.

Sponsored by: Chelsio Communications

7 years agoMFC 303886: Add additional constants.
jhb [Fri, 30 Sep 2016 00:31:17 +0000 (00:31 +0000)]
MFC 303886: Add additional constants.

- Add constants for the fields in the root-entry table address register,
  namely the root type type (RTT) and root table address (RTA) mask.
- Add macros for the bitmask of the domain ID field in the second word
  of context table entries as well as a helper macro (DMAR_CTX2_GET_DID)
  to extract the domain ID from a context table entry.

Sponsored by: Chelsio Communications

7 years agoMFC 303204: Install a handler for firmware work request error messages.
jhb [Thu, 29 Sep 2016 23:41:57 +0000 (23:41 +0000)]
MFC 303204: Install a handler for firmware work request error messages.

If a driver sends an malformed or disallowed work request, the firmware
responds with a work request error.  Previously the driver treated this is
as an unexpected message and panicked.  Now it decodes the error message
to aid in debugging.

Sponsored by: Chelsio Communications

7 years agoMFC 303721: Permit the name of the /dev/iov entry to be set by the driver.
jhb [Thu, 29 Sep 2016 22:52:24 +0000 (22:52 +0000)]
MFC 303721: Permit the name of the /dev/iov entry to be set by the driver.

The PCI_IOV option creates character devices in /dev/iov for each PF
device driver that registers support for creating VFs.  By default the
character device is named after the PF device (e.g. /dev/iov/foo0).
This change adds a variant of pci_iov_attach() called pci_iov_attach_name()
that allows the name of the /dev/iov entry to be specified by the
driver.

To preserve the ABI, this version does not modify the existing
PCI_IOV_ATTACH kobj method as was done in HEAD.  Instead, a new
PCI_IOV_ATTACH_NAME method has been added that accepts the name as an
additional parameter.  The PCI bus driver now provides an implementation
of PCI_IOV_ATTACH_NAME.  A default implementation of PCI_IOV_ATTACH is
provided that calls PCI_IOV_ATTACH_NAME passing 'device_get_nameunit(dev)'
as the name.

Sponsored by: Chelsio Communications

7 years agoMFC r306417: portsnap: only move expected snapshot contents from snap/ to files/
emaste [Wed, 28 Sep 2016 21:33:35 +0000 (21:33 +0000)]
MFC r306417: portsnap: only move expected snapshot contents from snap/ to files/

Previously it was possible to smuggle in addional files that would
be used by later portsnap runs. Now we only move those files expected
to be in the snapshot into files/ and require that there are no
unexpected files.

This was used by portsnap attacks 2, 3, and 4 in the "non-cryptanalytic
attacks against FreeBSD update components" anonymous gist.

Approved by: re (gjb)

7 years agoMFC r306075,r306109
ache [Wed, 28 Sep 2016 20:52:58 +0000 (20:52 +0000)]
MFC r306075,r306109

1) Microoptimize %p case.
2) Implememt %u for GNU compatibility.
3) Don't forget to advance buf for %w/%u.
4) Fail with incomplete week (week 0) request and no such week in the
year.
5) Fix yday formula when Sunday requested and the week started from Monday.
6) Fail with impossible yday for incomplete week (week 0) and direct %w/%u
request.
7) Shift yday/wday to the first day of the year, if incomplete week
(week 0) requested and no %w/%u used.
8) For already non-standard %z extension implement GNU compatible formats:
+hh and -hh.
9) Check for incorrect values for %z.

PR:     212983 (case 3 only)

7 years agoMFC r306092:
kib [Wed, 28 Sep 2016 09:51:07 +0000 (09:51 +0000)]
MFC r306092:
Rename efi_systbl to efi_systbl_phys.

7 years agoMFC r306091:
kib [Wed, 28 Sep 2016 09:48:39 +0000 (09:48 +0000)]
MFC r306091:
Add a way for the architecture to specify the calling ABI for methods
in the EFI Runtime Services Table.  On amd64, the calling conventions
are MS.

7 years agoMFC r306089:
kib [Wed, 28 Sep 2016 09:46:29 +0000 (09:46 +0000)]
MFC r306089:
Make resettodr_lock accessible outside subr_rtc.c.  Protect
CLOCK_GETTIME() with the lock.

7 years agoMFC r306088:
kib [Wed, 28 Sep 2016 09:43:23 +0000 (09:43 +0000)]
MFC r306088:
Add amd64 functions to load/store GDT register, store IDT and TR registers.

7 years agoMFC r306087:
kib [Wed, 28 Sep 2016 09:41:00 +0000 (09:41 +0000)]
MFC r306087:
Export the pmap_cache_bits() and pmap_pinit_pml4() functions from the
amd64 pmap.

7 years agoMFC r306260:
kib [Wed, 28 Sep 2016 09:36:03 +0000 (09:36 +0000)]
MFC r306260:
Add the foundation copyrights to procctl kernel sources.

7 years agoMFC r306257:
kib [Wed, 28 Sep 2016 09:33:46 +0000 (09:33 +0000)]
MFC r306257:
Document r306081, i.e. procctl(PROC_TRAPCAP) and sysctl kern.trap_enocap.

MFC r306366:
Editing fixes for r306257, documentation for trapcap.

7 years agoMFC r306081:
kib [Wed, 28 Sep 2016 09:28:26 +0000 (09:28 +0000)]
MFC r306081:
Add PROC_TRAPCAP procctl(2) controls and global sysctl kern.trap_enocap.

7 years agoMFC r305509:
markj [Tue, 27 Sep 2016 18:06:43 +0000 (18:06 +0000)]
MFC r305509:
Don't treat an error from g_mirror_clear_metadata() as fatal.

7 years agoMFC r306008:
markj [Tue, 27 Sep 2016 18:05:24 +0000 (18:05 +0000)]
MFC r306008:
libdwarf: Add definitions for Apple's DWARF extension attributes.

7 years agoMFC r306205:
loos [Tue, 27 Sep 2016 17:25:06 +0000 (17:25 +0000)]
MFC r306205:

Add the ID for the Huawei ME909S LTE modem.

Submitted by: svenauhagen at github
Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoMFC r306050:
loos [Tue, 27 Sep 2016 16:06:01 +0000 (16:06 +0000)]
MFC r306050:

If present, honor the USB port mode (host or peripheral) set on DTS, if not,
keep the beaglebone defaults: USB0 -> peripheral/gadget, USB1 -> host.

This is only a workaround as in fact fact this hardware is capable of detect
the USB port mode based on type of cable and act according with the detected
mode.  Unfortunately the driver does not handle that at moment.

Sponsored by: Rubicon Communications, LLC (Netgate)

7 years agoMFC r306020:
kib [Tue, 27 Sep 2016 10:26:39 +0000 (10:26 +0000)]
MFC r306020:
Move pmap_p*e_index() inline functions from pmap.c to pmap.h.

7 years agoMFC r306131
asomers [Mon, 26 Sep 2016 14:48:48 +0000 (14:48 +0000)]
MFC r306131

Update mkimg(1) author's contact info

7 years agoMFC: r306342
jkim [Mon, 26 Sep 2016 14:30:19 +0000 (14:30 +0000)]
MFC: r306342

Merge OpenSSL 1.0.2j.

7 years agoMFC r305819:
mm [Sun, 25 Sep 2016 22:02:27 +0000 (22:02 +0000)]
MFC r305819:
Sync libarchive with vendor including important security fixes.

Issues fixed (FreeBSD):
PR #778: ACL error handling
Issue #745: Symlink check prefix optimization is too aggressive
Issue #746: Hard links with data can evade sandboxing restrictions

This update fixes the vulnerability #3 and vulnerability #4 as reported in
"non-cryptanalytic attacks against FreeBSD update components".
https://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f

Fix for vulnerability #2 has already been merged in r305188.

Security: http://gist.github.com/anonymous/e48209b03f1dd9625a992717e7b89c4f

7 years agoMFC r305943:
kib [Sun, 25 Sep 2016 17:58:55 +0000 (17:58 +0000)]
MFC r305943:
Utilize pmap.h names.

7 years agoMFC r305942:
kib [Sun, 25 Sep 2016 17:57:52 +0000 (17:57 +0000)]
MFC r305942:
Consolidate four efi_next_descriptor() definitions.

7 years agoMFC r305941:
kib [Sun, 25 Sep 2016 17:55:53 +0000 (17:55 +0000)]
MFC r305941:
Add double-inclusion protection.

MFC r305947:
Add comment for the closing guard.

7 years agoMFC r305692:
kib [Sun, 25 Sep 2016 17:24:10 +0000 (17:24 +0000)]
MFC r305692:
Add FPU_KERN_NOCTX flag to the fpu_kern_enter() function on amd64.

7 years agoMFC r306102:
kevlo [Sun, 25 Sep 2016 13:52:55 +0000 (13:52 +0000)]
MFC r306102:

Add support for the TP-Link TG-3468 v2.
This is an RTL8168 chip, which we already support so all we have to do is add
the vendor ID.

PR: 212876
Submitted by: Tobias Kortkamp <t@tobik.me>

7 years agoMFC: 304626,304635:
roberto [Sun, 25 Sep 2016 09:36:52 +0000 (09:36 +0000)]
MFC: 304626,304635:
        r304626: Add support for Ed25519 keys.
        r304635: Remove support for SSH1, already disabled in our OpenSSH.

Submitted by: mwlucas (r304626), vangyzen (r304635)

7 years agoMFC r305956: Add manpage for rctl_* system calls
badger [Sat, 24 Sep 2016 16:46:37 +0000 (16:46 +0000)]
MFC r305956: Add manpage for rctl_* system calls

Approved by: kib (mentor)
Sponsored by: Dell Technologies

7 years agoMFC: 305066,305304,305312
gnn [Sat, 24 Sep 2016 13:44:18 +0000 (13:44 +0000)]
MFC: 305066,305304,305312

Update cryptotest for modern algorithms
Clean up the usage message and remove dead code.
Add cpuset support to separate forked processes.

Reviewed by:    cem
Sponsored by:   Rubicon Communications, LLC (Netgate)

7 years agoMFC r305896:
dchagin [Sat, 24 Sep 2016 10:32:26 +0000 (10:32 +0000)]
MFC r305896:

Implement BLKSSZGET ioctl for the Linuxulator.

PR: 212700

7 years agoMFC r305804:
hselasky [Fri, 23 Sep 2016 08:41:18 +0000 (08:41 +0000)]
MFC r305804:
Make the callout structure in the boot loader's kernel shim more
similar to the kernel one.

7 years agoMFC r305877:
hselasky [Fri, 23 Sep 2016 08:26:45 +0000 (08:26 +0000)]
MFC r305877:
mlx5en: Fix duplicate mbuf free-by-code.

When mlx5e_sq_xmit() returns an error code and the mbuf pointer is set,
we should not free the mbuf, because the caller will keep the mbuf in
the drbr. Make sure the mbuf pointer is correctly set upon function
exit.

Sponsored by: Mellanox Technologies

7 years agoMFC r305876:
hselasky [Fri, 23 Sep 2016 08:26:02 +0000 (08:26 +0000)]
MFC r305876:
mlx5en: Remove unused pdev pointer.

Sponsored by: Mellanox Technologies

7 years agoMFC r305875:
hselasky [Fri, 23 Sep 2016 08:25:23 +0000 (08:25 +0000)]
MFC r305875:
mlx5en: Verify port type is ethernet before creating network device

Else the mlx5en driver might attach to infiniband ports.

Sponsored by: Mellanox Technologies

7 years agoMFC r305874:
hselasky [Fri, 23 Sep 2016 08:24:41 +0000 (08:24 +0000)]
MFC r305874:
mlx5en: Allow setting the software MTU size below 1500 bytes

The hardware MTU size can't be set to a value less than 1500 bytes due
to side-band management support. Allow setting the software MTU size
below 1500 bytes, thus creating a mismatch between hardware and
software MTU sizes.

Sponsored by: Mellanox Technologies

7 years agoMFC r305873:
hselasky [Fri, 23 Sep 2016 08:23:57 +0000 (08:23 +0000)]
MFC r305873:
mlx5en: Factor out common sendqueue code for use with rate limiting SQs.

Try to reuse code to setup sendqueues when possible by making some static
functions global. Further split the mlx5e_close_sq_wait() function to
separate out reusable parts.

Sponsored by: Mellanox Technologies

7 years agoMFC r305872:
hselasky [Fri, 23 Sep 2016 08:23:11 +0000 (08:23 +0000)]
MFC r305872:
mlx5en: Properly declare doorbell lock for 32-bit CPUs.

Sponsored by: Mellanox Technologies

7 years agoMFC r305871:
hselasky [Fri, 23 Sep 2016 08:22:30 +0000 (08:22 +0000)]
MFC r305871:
mlx5en: Optimise away duplicate UAR pointers.

This change also reduces the size of the mlx5e_sq structure so that the last
queue_state element will fit into the previous cacheline and then the mlx5e_sq
structure becomes one cacheline less for amd64.

Sponsored by: Mellanox Technologies

7 years agoMFC r305870:
hselasky [Fri, 23 Sep 2016 08:21:45 +0000 (08:21 +0000)]
MFC r305870:
mlx5en: Make the mlx5e_open_cq() and mlx5e_close_cq() functions global.

Make some functions and structures global to allow for code reuse
when creating rate limiting sendqueues.

Sponsored by: Mellanox Technologies

7 years agoMFC r305869:
hselasky [Fri, 23 Sep 2016 08:20:16 +0000 (08:20 +0000)]
MFC r305869:
mlx5en: Minor completion queue control path code refactor.

Move setting of CQ moderation mode together with the other
CQ moderation parameters. Pass completion event vector as
a separate argument to mlx5e_open_cq(), because its value is
different for each call. Pass mlx5e_priv pointer instead of
mlx5e_channel pointer so that code can be used by rate
limiting sendqueues.

Sponsored by: Mellanox Technologies

7 years agoMFC r305868:
hselasky [Fri, 23 Sep 2016 08:19:22 +0000 (08:19 +0000)]
MFC r305868:
mlx5en: Separate the sendqueue from using the mlx5e_channel structure.

This change allows for reusing the transmit path for so called
rate limited senqueues. While at it optimise some pointer lookups
in the fast path.

Sponsored by: Mellanox Technologies

7 years agoMFC r305867:
hselasky [Fri, 23 Sep 2016 08:17:51 +0000 (08:17 +0000)]
MFC r305867:
Update the MLX5 core module:
- Add new firmware commands and update existing ones.
- Add more firmware related structures and update existing ones.
- Some minor fixes, like adding missing \n to some prints.

Sponsored by: Mellanox Technologies

7 years agoMFC 306015
sephe [Fri, 23 Sep 2016 03:21:40 +0000 (03:21 +0000)]
MFC 306015

    hyperv/storvsc: Fix SRB length setting.

    This fixes disk discovery issue on WS2008R2 Hyper-V, which plagued
    us since 10.2-release.

    Reported by:    many
    Sponsored by:   Microsoft

7 years agoMFC bspatch Capsicumization, sanity checks, and other improvements
emaste [Thu, 22 Sep 2016 21:05:21 +0000 (21:05 +0000)]
MFC bspatch Capsicumization, sanity checks, and other improvements

r304691: bspatch: apply style(9)

Make style changes (and trivial refactoring of open calls) now in order
to reduce noise in diffs for future capsicum changes.

r304807 (allanjude): Capsicumize bspatch

Move all of the fopen() and open() calls to the top of main()

Restrict each FD to least privilege (read/seek only, write only, etc)

cap_enter(), and make all except the output FD read/seek only.

r304821: bspatch: remove output file in the case of error

r305486: bspatch: add sanity checks on sizes to avoid integer overflow

Note that this introduces an explicit 2GB limit, but this was already
implicit in variable and function argument types.

This is based on the "non-cryptanalytic attacks against freebsd
update components" anonymous gist. Further refinement is planned.

r305737: bspatch: remove superfluous newlines from errx strings

r305822: bspatch: use #define for header size instead of magic number

r306026: bspatch: Remove backwards-compatibility sys/capability.h support

bspatch previously included sys/capability.h or sys/capsicum.h based
on __FreeBSD_version, as FreeBSD is the upstream for bsdiff and we may
see this file incorporated into other third-party software.

The Capsicum header is now installed as sys/capsicum.h in stable/10 and
FreeBSD 10.3, so we can just use sys/capsicum.h and simplify the logic.

7 years agoMFC r305841
ache [Thu, 22 Sep 2016 16:49:53 +0000 (16:49 +0000)]
MFC r305841

Implement multibyte encoding support for -v with fallback

7 years agoMFC: r306193
jkim [Thu, 22 Sep 2016 14:57:48 +0000 (14:57 +0000)]
MFC: r306193

Merge OpenSSL 1.0.2u.

7 years agoMFC r305601:
kib [Thu, 22 Sep 2016 09:14:04 +0000 (09:14 +0000)]
MFC r305601:
On rename, do not perform truncation of dirhash if the vnode truncation failed.

7 years agoMFC r305599:
kib [Thu, 22 Sep 2016 09:10:30 +0000 (09:10 +0000)]
MFC r305599:
Do not leak transient ENOLCK error from flush_newblk_dep() loop.

7 years agoMFC r305598:
kib [Thu, 22 Sep 2016 09:08:11 +0000 (09:08 +0000)]
MFC r305598:
When logging unlikely UFS_TRUNCATE() failure in ufs_direnter(),
include error code.

7 years agoMFC r305597:
kib [Thu, 22 Sep 2016 09:06:01 +0000 (09:06 +0000)]
MFC r305597:
When extending directory inode in ufs_direnter(), adjust i_endoff.

7 years agoMFC r305595:
kib [Thu, 22 Sep 2016 09:04:05 +0000 (09:04 +0000)]
MFC r305595:
In dqsync(), when called from quotactl(), um_quotas entry might appear
cleared since nothing prevents completion of the parallel quotaoff.
There is nothing to sync in this case, and no reason to panic.

7 years agoMFC r305594:
kib [Thu, 22 Sep 2016 09:02:04 +0000 (09:02 +0000)]
MFC r305594:
In softdep_prealloc(), return early not only for snapshots, but for
the quota files as well.

7 years agoMFC r305593:
kib [Thu, 22 Sep 2016 08:59:58 +0000 (08:59 +0000)]
MFC r305593:
There is no need to upgrade the last dvp lock on lookups for modifying
operations.  Instead of upgrading, assert that the lock is exclusive.
Explain the cause in comments.

7 years agoMFC r305592:
kib [Thu, 22 Sep 2016 08:56:54 +0000 (08:56 +0000)]
MFC r305592:
Partially lift suspension when ffs_reload() finished with cgs and
going to re-read inodes.

7 years agoMFC r305610: Don't report to devd statuses that CAM doesn't consider errors.
mav [Thu, 22 Sep 2016 03:31:14 +0000 (03:31 +0000)]
MFC r305610: Don't report to devd statuses that CAM doesn't consider errors.

Some statuses, such as "ATA pass through information available", are part
part of absolutely normal operation and do not worth reporting.

7 years agoMFC r305609: "Extended copy information available" is not an error either.
mav [Thu, 22 Sep 2016 03:30:28 +0000 (03:30 +0000)]
MFC r305609: "Extended copy information available" is not an error either.

7 years agoMFC r305608: "ATA pass through information available" is not an error.
mav [Thu, 22 Sep 2016 03:29:47 +0000 (03:29 +0000)]
MFC r305608: "ATA pass through information available" is not an error.

7 years agoMFC r305591: Decode ATA Status Return descriptor.
mav [Thu, 22 Sep 2016 03:28:43 +0000 (03:28 +0000)]
MFC r305591: Decode ATA Status Return descriptor.

7 years agoMFC r305602: intpm: fix attachment to supported AMD FCHs
avg [Wed, 21 Sep 2016 19:51:59 +0000 (19:51 +0000)]
MFC r305602: intpm: fix attachment to supported AMD FCHs

7 years agoMFC r305606: intpm: make sure to register smbus driver before intpm driver
avg [Wed, 21 Sep 2016 16:29:04 +0000 (16:29 +0000)]
MFC r305606: intpm: make sure to register smbus driver before intpm driver

7 years agoMFC r305604: intpm: better clean up resources after a failed attachment
avg [Wed, 21 Sep 2016 16:26:59 +0000 (16:26 +0000)]
MFC r305604: intpm: better clean up resources after a failed attachment

7 years agoMFC r305603: intpm: do not try attaching to unsupported controller revisions
avg [Wed, 21 Sep 2016 16:19:27 +0000 (16:19 +0000)]
MFC r305603: intpm: do not try attaching to unsupported controller revisions

7 years agoMFC r305600: amdsbwd.4: update supported hardware list
avg [Wed, 21 Sep 2016 16:17:17 +0000 (16:17 +0000)]
MFC r305600: amdsbwd.4: update supported hardware list

7 years agoMFC r305596: intpm.4 update supported hardware list
avg [Wed, 21 Sep 2016 16:15:30 +0000 (16:15 +0000)]
MFC r305596: intpm.4 update supported hardware list

7 years agoMFC r303113: Cross-link some SMBus controller drivers man pages.
avg [Wed, 21 Sep 2016 16:13:58 +0000 (16:13 +0000)]
MFC r303113: Cross-link some SMBus controller drivers man pages.

7 years agoMFC r303111: Document list of supported chipsets.
avg [Wed, 21 Sep 2016 16:12:26 +0000 (16:12 +0000)]
MFC r303111: Document list of supported chipsets.

7 years agoMFC r305535: amdsbwd: add support for FCH in family 16h models 30h-3Fh processors
avg [Wed, 21 Sep 2016 16:05:47 +0000 (16:05 +0000)]
MFC r305535: amdsbwd: add support for FCH in family 16h models 30h-3Fh processors

7 years agoMFC 304799:
andrew [Wed, 21 Sep 2016 09:50:50 +0000 (09:50 +0000)]
MFC 304799:
Map coherent memory in a non-coherent dma tag as uncached. This is similar
to what the 32-bit arm code does, with the exception that it always assumes
the tag is non-coherent.

Obtained from:  ABT Systems Ltd
Sponsored by:   The FreeBSD Foundation

7 years agoMFC 305285:
andrew [Wed, 21 Sep 2016 09:45:14 +0000 (09:45 +0000)]
MFC 305285:
Add a pc_clock pcpu field and use it to implement cpu_est_clockrate. This
will allow drivers that manage the clock frequency to communicate this with
the reset of the kernel.

Sponsored by:   ABT Systems Ltd

7 years agoMFC r304892:
andrew [Wed, 21 Sep 2016 09:06:06 +0000 (09:06 +0000)]
MFC r304892:
Print both the kernel read and write translation in DDB when asking for
a virtual to physical translation. These may be different, e.g. when a
page is mapped as read-only.

Sponsored by:   ABT Systems Ltd

7 years agoMFC r305939:
kib [Wed, 21 Sep 2016 08:09:33 +0000 (08:09 +0000)]
MFC r305939:
Remove trailing space.

7 years agoMFC r304713:
karels [Wed, 21 Sep 2016 00:06:49 +0000 (00:06 +0000)]
MFC r304713:

  Fix L2 caching for UDP over IPv6

  ip6_output() was missing cache invalidation code analougous to
  ip_output.c. r304545 disabled L2 caching for UDP/IPv6 as a workaround.
  This change adds the missing cache invalidation code and reverts
  r304545.

  Reviewed by:    gnn
  Approved by:    gnn (mentor)
  Tested by:      peter@, Mike Andrews
  Differential Revision:  https://reviews.freebsd.org/D7591

7 years agoMFC r305778:
ae [Tue, 20 Sep 2016 13:23:08 +0000 (13:23 +0000)]
MFC r305778:
  Fix swap tables between sets when this functional is enabled.

  We have 6 opcode rewriters for table opcodes. When `set swap' command
  invoked, it is called for each rewriter, so at the end we get the same
  result, because opcode rewriter uses ETLV type to match opcode. And all
  tables opcodes have the same ETLV type. To solve this problem, use
  separate sets handler for one opcode rewriter. Use it to handle TEST_ALL,
  SWAP_ALL and MOVE_ALL commands.

  PR: 212630

7 years agoMFC r305380:
bde [Mon, 19 Sep 2016 12:34:28 +0000 (12:34 +0000)]
MFC r305380:

Fix missing fmodl() on arches with 53-bit long doubles.

PR: 199422, 211965

7 years agoMFC r305357:
ngie [Sun, 18 Sep 2016 04:19:43 +0000 (04:19 +0000)]
MFC r305357:

Skip testcases 9/10 if jail(8) isn't installed

These testcases require jail support

7 years agoMFC r305356:
ngie [Sun, 18 Sep 2016 02:56:16 +0000 (02:56 +0000)]
MFC r305356:

Add a missing "Bail out!" if zpool create fails

This will make the exit info more meaningful if/when zpool create fails,
and establishes parity with the other 2 zfs acl testcases (01, 03).

7 years agoMFC r305033,r305041,r305170:
ngie [Sun, 18 Sep 2016 02:45:35 +0000 (02:45 +0000)]
MFC r305033,r305041,r305170:

r305033:

Minor Makefile simplifications for lib/atf/...

- Replace uses of `${.CURDIR:H:H:H}` with ${SRCTOP}
- Use built-in :H operator instead of ".." when enumerating paths.

r305041:

Filter certain compile-time options into -DATF_BUILD_*

Items filtered through are:

- Constant defines (-D)
- Include flags (-I)
- Linker flags (-L)
- Optimization level (-O)
- Warnings / linker flags (-W)
- Preprocessor options (-f)

This fixes the scenario hit by the Jenkins job where it's infecting
the build with --sysroot, etc options from the Jenkins build in the
tests.

Prefix all intermediate variables (_CFLAGS, etc) with "ATF_BUILD" [*].

Requested by: jmmv

r305170:

Don't bake all of CC/CPP/CXX into CFLAGS

Capture executable names for CC, CPP, CXX (assumed to be the
first non-CCACHE_BIN word).

This change strips out all of the cross-compiler arguments, (-target,
-B, etc), added to ${CC}, etc via ${CROSSENV} in Makefile.inc1, so it
doesn't infect the build and subsequently the test.

Add comments noting why this logic is being added, and why the logic in
r305041 was necessary/what it was trying to achieve.

This is required after recent changes made to the toolchain to always
specify --sysroot, -target, -B, etc with clang in buildworld (presumably
r304681).

7 years agoMFC r305018,r305019,r305020:
ngie [Sun, 18 Sep 2016 02:41:50 +0000 (02:41 +0000)]
MFC r305018,r305019,r305020:

r305018:

Use SRCTOP instead of a homegrown definition for it (SRCDIR)

r305019:

Remove unnecessary variable (SRCDIR) replaced by SRCTOP in Makefile.common

r305020:

Remove redundant declarations and simplify ../ in pathing

- TESTSBASE and LOCALBASE are already defined in bsd.tests.mk
- TESTSDIR is automatically divined as ${TESTSBASE}${RELDIR:H} after
  r289158.
- Replace SRCDIR with SRCTOP

7 years agoMFC r305894:
jhibbits [Sat, 17 Sep 2016 16:45:57 +0000 (16:45 +0000)]
MFC r305894:

Increase the boot1 file size on the HFS boot image.

The boot1.elf is too fat for 30k, it's now 32k on powerpc64, and 34k on powerpc.
Without this, boot1 will fail with odd behaviors.

7 years agoMFC 305607:
andrew [Fri, 16 Sep 2016 13:00:55 +0000 (13:00 +0000)]
MFC 305607:
Trap msr/mrs instructions. These are privileged arm64 instructions and
shouldn't normally be used.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years agoMFC 305128:
andrew [Fri, 16 Sep 2016 12:48:58 +0000 (12:48 +0000)]
MFC 305128:
Also handle instruction traps. We might hit these when the page we are
executing is being promoted to a superpage.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years agoMFC 305546:
andrew [Fri, 16 Sep 2016 12:42:36 +0000 (12:42 +0000)]
MFC 305546:
When synchronising the instruction and data caches we only need to clean
the data cache to the point of unification. This is the point where the
two caches are unified to a single unified cache so cleaning past here
is just extra unneeded work.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years agoMFC 305545:
andrew [Fri, 16 Sep 2016 12:39:21 +0000 (12:39 +0000)]
MFC 305545:
Only call cpu_icache_sync_range when inserting an executable page. If the
page is non-executable the contents of the i-cache are unimportant so this
call is just adding unneeded overhead when inserting pages.

While doing research using gem5 with an O3 pipeline and 1k/32k/1M iTLB/L1
iCache/L2 Bjoern Zeeb (bz@) observed a fairly high rate of calls into
arm64_icache_sync_range() from pmap_enter() along with a high number of
instruction fetches and iTLB/iCache hits.

Limiting the calls to arm64_icache_sync_range() to only executable pages,
we observe the iTLB and iCache Hit going down by about 43%. These numbers
are quite misleading when looked at alone as at the same time instructions
retired were reduced by 19.2% and instruction fetches were reduced by 38.8%.
Overall this reduced the runtime of the test program by 22.4%.

On Juno hardware, in steady-state, running the same test, using the cycle
count to determine runtime, we do see a reduction of up to 28.9% in runtime.

While these numbers certainly depend on the program executed, we expect an
overall performance improvement.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years agoMFC 304004, 304596, 304598, 304599, 304600, 304604, 304620, 304685, 304687,
andrew [Fri, 16 Sep 2016 12:36:11 +0000 (12:36 +0000)]
MFC 304004, 304596, 304598, 304599, 304600, 304604, 304620, 304685, 304687,
    304688, 304689, 304746, 304749, 304750, 304806, 305071, 305191:
Merge arm64 superpage support, however leave it disabled by default.

MFC after: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years agoMFC 303904:
andrew [Fri, 16 Sep 2016 12:20:42 +0000 (12:20 +0000)]
MFC 303904:
Uncomment the vm.kvm_size and vm.kvm_free sysctls. These work as expected so
there is no reason to leave them commented out.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years agoMFC 303903:
andrew [Fri, 16 Sep 2016 12:18:22 +0000 (12:18 +0000)]
MFC 303903:
Implement pmap_align_superpage on arm64 based on the amd64 implementation.
This will be needed when superpage support is added.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years agoMFC 303744:
andrew [Fri, 16 Sep 2016 12:17:01 +0000 (12:17 +0000)]
MFC 303744:
Remove the pvh_global_lock lock from the arm64 pmap. It is unneeded on arm64
as invalidation will have completed before the pmap_invalidate_* functions
have complete.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years agoMFC 305605:
andrew [Fri, 16 Sep 2016 12:12:00 +0000 (12:12 +0000)]
MFC 305605:
Don't panic when we don't handle a userland exception, not all we may see
are currently handled.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years agoMFC r304285:
kib [Fri, 16 Sep 2016 10:04:28 +0000 (10:04 +0000)]
MFC r304285:
Implement userspace gettimeofday(2) with HPET timecounter.

7 years agoMFC r303677: Move/add ARM ELF PHDR types to elf_common.h
emaste [Thu, 15 Sep 2016 17:37:30 +0000 (17:37 +0000)]
MFC r303677: Move/add ARM ELF PHDR types to elf_common.h

7 years agoMFC r303670: Add ELFOSABI_ARM_AEABI ELF OSABI constant
emaste [Thu, 15 Sep 2016 17:36:43 +0000 (17:36 +0000)]
MFC r303670: Add ELFOSABI_ARM_AEABI ELF OSABI constant

7 years agoMFC r303335: apply some style(9) to kbd: make function name start in column 1
emaste [Thu, 15 Sep 2016 17:34:14 +0000 (17:34 +0000)]
MFC r303335: apply some style(9) to kbd: make function name start in column 1

7 years agoMFC r305160: Set UEFI boot loader PE/COFF timestamps to known value for reproducible...
emaste [Thu, 15 Sep 2016 17:30:01 +0000 (17:30 +0000)]
MFC r305160: Set UEFI boot loader PE/COFF timestamps to known value for reproducible builds

Sponsored by: The FreeBSD Foundation