svn commit: r338677 - in head: lib/libpmc sys/dev/hwpmc
Author: mmacy Date: Fri Sep 14 01:30:05 2018 New Revision: 338677 URL: https://svnweb.freebsd.org/changeset/base/338677 Log: hwpmc: set default rate if event description lacks one / filter rate against misuse Not all event descriptions have a sample rate (such as inst_retired.any) this will restore the legacy behavior of using 65536 in that case. It also prevents accidental API misuse that could lead to panic. PR: 230985 Reported by: markj Reviewed by: markj Approved by: re (gjb) Sponsored by: Limelight Networks Differential Revision:https://reviews.freebsd.org/D16958 Modified: head/lib/libpmc/libpmc_pmu_util.c head/sys/dev/hwpmc/hwpmc_mod.c Modified: head/lib/libpmc/libpmc_pmu_util.c == --- head/lib/libpmc/libpmc_pmu_util.c Fri Sep 14 01:11:10 2018 (r338676) +++ head/lib/libpmc/libpmc_pmu_util.c Fri Sep 14 01:30:05 2018 (r338677) @@ -237,6 +237,7 @@ pmu_parse_event(struct pmu_event_desc *ped, const char return (ENOMEM); r = event; bzero(ped, sizeof(*ped)); + ped->ped_period = DEFAULT_SAMPLE_COUNT; ped->ped_umask = -1; while ((kvp = strsep(, ",")) != NULL) { key = strsep(, "="); Modified: head/sys/dev/hwpmc/hwpmc_mod.c == --- head/sys/dev/hwpmc/hwpmc_mod.c Fri Sep 14 01:11:10 2018 (r338676) +++ head/sys/dev/hwpmc/hwpmc_mod.c Fri Sep 14 01:30:05 2018 (r338677) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -3942,9 +3943,16 @@ pmc_syscall_handler(struct thread *td, void *syscall_a pmc->pm_flags = pa.pm_flags; /* XXX set lower bound on sampling for process counters */ - if (PMC_IS_SAMPLING_MODE(mode)) - pmc->pm_sc.pm_reloadcount = pa.pm_count; - else + if (PMC_IS_SAMPLING_MODE(mode)) { + /* +* Don't permit requested sample rate to be less than 1000 +*/ + if (pa.pm_count < 1000) + log(LOG_WARNING, + "pmcallocate: passed sample rate %ju - setting to 1000\n", + (uintmax_t)pa.pm_count); + pmc->pm_sc.pm_reloadcount = MAX(1000, pa.pm_count); + } else pmc->pm_sc.pm_initial = pa.pm_count; /* switch thread to CPU 'cpu' */ @@ -4460,9 +4468,16 @@ pmc_syscall_handler(struct thread *td, void *syscall_a break; } - if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) - pm->pm_sc.pm_reloadcount = sc.pm_count; - else + if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) { + /* +* Don't permit requested sample rate to be less than 1000 +*/ + if (sc.pm_count < 1000) + log(LOG_WARNING, + "pmcsetcount: passed sample rate %ju - setting to 1000\n", + (uintmax_t)sc.pm_count); + pm->pm_sc.pm_reloadcount = MAX(1000, sc.pm_count); + } else pm->pm_sc.pm_initial = sc.pm_count; } break; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338676 - in head: lib lib/libpmc usr.sbin
Author: mmacy Date: Fri Sep 14 01:11:10 2018 New Revision: 338676 URL: https://svnweb.freebsd.org/changeset/base/338676 Log: re-enable pmcstat, pmccontrol, and pmcannotate for gcc4 builds I had disabled building of the aforementioned targets due to warnings breaking tinderbox. This silences the warning and restores them to the build. Reported by: jhibbits Reviewed by: jhibbits Approved by: re (gjb) Modified: head/lib/Makefile head/lib/libpmc/Makefile head/usr.sbin/Makefile Modified: head/lib/Makefile == --- head/lib/Makefile Thu Sep 13 23:59:59 2018(r338675) +++ head/lib/Makefile Fri Sep 14 01:11:10 2018(r338676) @@ -70,6 +70,8 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ libpathconv \ libpcap \ libpjdlog \ + libpmc \ + libpmcstat \ ${_libproc} \ libprocstat \ libregex \ @@ -198,9 +200,6 @@ _libdl= libdl .endif SUBDIR.${MK_OPENSSL}+= libmp -.if (${COMPILER_TYPE} == "clang" || (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100 && ${MACHINE_CPUARCH} != "riscv")) -SUBDIR.${MK_PMC}+= libpmc libpmcstat -.endif SUBDIR.${MK_RADIUS_SUPPORT}+= libradius SUBDIR.${MK_SENDMAIL}+=libmilter libsm libsmdb libsmutil SUBDIR.${MK_TELNET}+= libtelnet Modified: head/lib/libpmc/Makefile == --- head/lib/libpmc/MakefileThu Sep 13 23:59:59 2018(r338675) +++ head/lib/libpmc/MakefileFri Sep 14 01:11:10 2018(r338676) @@ -7,7 +7,7 @@ SRCS= libpmc.c pmclog.c libpmc_pmu_util.c libpmc_json. INCS= pmc.h pmclog.h pmcformat.h CFLAGS+= -I${.CURDIR} -CWARNFLAGS.gcc+= -Wno-shadow +CWARNFLAGS.gcc+= -Wno-shadow -Wno-cast-align .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" Modified: head/usr.sbin/Makefile == --- head/usr.sbin/Makefile Thu Sep 13 23:59:59 2018(r338675) +++ head/usr.sbin/Makefile Fri Sep 14 01:11:10 2018(r338676) @@ -59,6 +59,9 @@ SUBDIR= adduser \ nologin \ pciconf \ periodic \ + pmcannotate \ + pmccontrol \ + pmcstat \ pnfsdscopymr \ pnfsdsfile \ pnfsdskill \ @@ -185,11 +188,8 @@ SUBDIR.${MK_OPENSSL}+= keyserv SUBDIR.${MK_PC_SYSINSTALL}+= pc-sysinstall SUBDIR.${MK_PF}+= ftp-proxy SUBDIR.${MK_PKGBOOTSTRAP}+=pkg -.if (${COMPILER_TYPE} == "clang" || (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 60100 && ${MACHINE_CPUARCH} != "riscv")) +.if ${COMPILER_FEATURES:Mc++11} SUBDIR.${MK_PMC}+= pmc -SUBDIR.${MK_PMC}+= pmcannotate -SUBDIR.${MK_PMC}+= pmccontrol -SUBDIR.${MK_PMC}+= pmcstat .endif SUBDIR.${MK_PMC}+= pmcstudy SUBDIR.${MK_PORTSNAP}+=portsnap ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338675 - head/sys/conf
Author: gjb Date: Thu Sep 13 23:59:59 2018 New Revision: 338675 URL: https://svnweb.freebsd.org/changeset/base/338675 Log: Update head from ALPHA5 to ALPHA6 as part of the 12.0-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh == --- head/sys/conf/newvers.shThu Sep 13 23:51:54 2018(r338674) +++ head/sys/conf/newvers.shThu Sep 13 23:59:59 2018(r338675) @@ -46,7 +46,7 @@ TYPE="FreeBSD" REVISION="12.0" -BRANCH="ALPHA5" +BRANCH="ALPHA6" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338669 - head/sys/dev/cxgbe
Author: np Date: Thu Sep 13 22:58:13 2018 New Revision: 338669 URL: https://svnweb.freebsd.org/changeset/base/338669 Log: cxgbe(4): Use the correct number of parameters when querying the tid range for hashfilters. Approved by: re@ (gjb@) Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c == --- head/sys/dev/cxgbe/t4_main.cThu Sep 13 21:28:37 2018 (r338668) +++ head/sys/dev/cxgbe/t4_main.cThu Sep 13 22:58:13 2018 (r338669) @@ -3954,7 +3954,7 @@ get_params__post_init(struct adapter *sc) sc->toecaps = 0; param[0] = FW_PARAM_DEV(NTID); - rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 6, param, val); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 1, param, val); if (rc != 0) { device_printf(sc->dev, "failed to query HASHFILTER parameters: %d.\n", rc); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338666 - head/sys/arm/conf
Author: emaste Date: Thu Sep 13 21:00:17 2018 New Revision: 338666 URL: https://svnweb.freebsd.org/changeset/base/338666 Log: Enable Capsicum on armv6/armv7 We ought to be consistent across our Tier-1 and nearly-Tier-1 architectures, so enable Capsicum for 32-bit armv6/armv7 by default. PR: 204008 Reviewed by: ian, oshogbo Approved by: re (gjb) Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D17023 Modified: head/sys/arm/conf/std.armv6 head/sys/arm/conf/std.armv7 Modified: head/sys/arm/conf/std.armv6 == --- head/sys/arm/conf/std.armv6 Thu Sep 13 20:53:51 2018(r338665) +++ head/sys/arm/conf/std.armv6 Thu Sep 13 21:00:17 2018(r338666) @@ -41,6 +41,8 @@ options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B optionsPRINTF_BUFR_SIZE=128# Prevent printf output being interspersed. optionsKBD_INSTALL_CDEV# install a CDEV entry in /dev optionsHWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) +optionsCAPABILITY_MODE # Capsicum capability mode +optionsCAPABILITIES# Capsicum capabilites optionsFREEBSD_BOOT_LOADER # Process metadata passed from loader(8) optionsVFP # Enable floating point hardware support optionsMAC # Support for Mandatory Access Control (MAC) Modified: head/sys/arm/conf/std.armv7 == --- head/sys/arm/conf/std.armv7 Thu Sep 13 20:53:51 2018(r338665) +++ head/sys/arm/conf/std.armv7 Thu Sep 13 21:00:17 2018(r338666) @@ -41,6 +41,8 @@ options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B optionsPRINTF_BUFR_SIZE=128# Prevent printf output being interspersed. optionsKBD_INSTALL_CDEV# install a CDEV entry in /dev optionsHWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) +optionsCAPABILITY_MODE # Capsicum capability mode +optionsCAPABILITIES# Capsicum capabilites optionsFREEBSD_BOOT_LOADER # Process metadata passed from loader(8) optionsVFP # Enable floating point hardware support optionsMAC # Support for Mandatory Access Control (MAC) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338656 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: vangyzen Date: Thu Sep 13 17:56:48 2018 New Revision: 338656 URL: https://svnweb.freebsd.org/changeset/base/338656 Log: Set zfs_arc_meta_strategy to metadata only The previous default of "balanced" appears to have caused pathological behavior, including very poor performance and 100% CPU load in the arc_reclaim_thread. The symptoms appeared when the daily periodic run started. With this change, the system--and the ARC in particular--behaved normally during a manual daily periodic run. From Mark Johnston: The port of the balanced strategy is incomplete, since arc_prune_async() is a no-op on FreeBSD. (This also seems to imply that r337653 is a no-op.) After 12 is branched we can port the remaining bits and consider changing the default back. Submitted by: markj (essentially) Reviewed by: markj Approved by: re (gjb) Sponsored by: Dell EMC Isilon Differential Revision:https://reviews.freebsd.org/D17156 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Sep 13 17:39:08 2018(r338655) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Sep 13 17:56:48 2018(r338656) @@ -538,8 +538,13 @@ typedef struct arc_state { */ int zfs_arc_meta_prune = 1; unsigned long zfs_arc_dnode_limit_percent = 10; -int zfs_arc_meta_strategy = ARC_STRATEGY_META_BALANCED; +int zfs_arc_meta_strategy = ARC_STRATEGY_META_ONLY; int zfs_arc_meta_adjust_restarts = 4096; + +SYSCTL_INT(_vfs_zfs, OID_AUTO, arc_meta_strategy, CTLFLAG_RWTUN, +_arc_meta_strategy, 0, +"ARC metadata reclamation strategy " +"(0 = metadata only, 1 = balance data and metadata)"); /* The 6 states: */ static arc_state_t ARC_anon; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338655 - head/share/man/man4
Author: gonzo Date: Thu Sep 13 17:39:08 2018 New Revision: 338655 URL: https://svnweb.freebsd.org/changeset/base/338655 Log: [ig4] Update list of supported hardware Reflect the fact that ig4(4) is not an Intel-specific device but a driver for Synopsys DesignWare I2C controller that now ships in AMD systems too. Approved by: re (kib), rpokala Modified: head/share/man/man4/ig4.4 Modified: head/share/man/man4/ig4.4 == --- head/share/man/man4/ig4.4 Thu Sep 13 17:36:55 2018(r338654) +++ head/share/man/man4/ig4.4 Thu Sep 13 17:39:08 2018(r338655) @@ -24,12 +24,12 @@ .\" .\" $FreeBSD$ .\" -.Dd October 03, 2016 +.Dd September 13, 2018 .Dt IG4 4 .Os .Sh NAME .Nm ig4 -.Nd Intel(R) fourth generation mobile CPU integrated I2C driver +.Nd Synopsys DesignWare I2C Controller .Sh SYNOPSIS To compile this driver into the kernel, place the following lines into the kernel configuration file: @@ -49,9 +49,9 @@ The driver provides access to peripherals attached to an I2C controller. .Sh HARDWARE .Nm -supports the I2C controllers found in fourth generation Intel(R) Core(TM) -processors based on the mobile U-processor line for intelligent systems. -This includes the i7-4650U, i5-4300U, i3-4010U, and 2980U. +supports the I2C controllers based on Synopsys DesignWare IP that can be found +in Intel(R) Core(TM) processors starting from the fourth generation, Intel(R) +Bay Trail, Apollo Lake SoC families, and some AMD systems. .Sh SYSCTL VARIABLES These .Xr sysctl 8 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338654 - head/sys/dev/ichiic
Author: gonzo Date: Thu Sep 13 17:36:55 2018 New Revision: 338654 URL: https://svnweb.freebsd.org/changeset/base/338654 Log: [ig4] Add PCI IDs for I2C controller on Intel Kaby Lake systems PR: 221777 Approved by: re (kib) Submitted by: marc.priggeme...@gmail.com Modified: head/sys/dev/ichiic/ig4_pci.c Modified: head/sys/dev/ichiic/ig4_pci.c == --- head/sys/dev/ichiic/ig4_pci.c Thu Sep 13 16:41:15 2018 (r338653) +++ head/sys/dev/ichiic/ig4_pci.c Thu Sep 13 17:36:55 2018 (r338654) @@ -80,6 +80,8 @@ static int ig4iic_pci_detach(device_t dev); #define PCI_CHIP_SKYLAKE_I2C_3 0x9d638086 #define PCI_CHIP_SKYLAKE_I2C_4 0x9d648086 #define PCI_CHIP_SKYLAKE_I2C_5 0x9d658086 +#define PCI_CHIP_KABYLAKE_I2C_00xa1608086 +#define PCI_CHIP_KABYLAKE_I2C_10xa1618086 #define PCI_CHIP_APL_I2C_0 0x5aac8086 #define PCI_CHIP_APL_I2C_1 0x5aae8086 #define PCI_CHIP_APL_I2C_2 0x5ab08086 @@ -110,6 +112,8 @@ static struct ig4iic_pci_device ig4iic_pci_devices[] = { PCI_CHIP_SKYLAKE_I2C_3, "Intel Sunrise Point-LP I2C Controller-3", IG4_SKYLAKE}, { PCI_CHIP_SKYLAKE_I2C_4, "Intel Sunrise Point-LP I2C Controller-4", IG4_SKYLAKE}, { PCI_CHIP_SKYLAKE_I2C_5, "Intel Sunrise Point-LP I2C Controller-5", IG4_SKYLAKE}, + { PCI_CHIP_KABYLAKE_I2C_0, "Intel Sunrise Point-LP I2C Controller-0", IG4_SKYLAKE}, + { PCI_CHIP_KABYLAKE_I2C_1, "Intel Sunrise Point-LP I2C Controller-1", IG4_SKYLAKE}, { PCI_CHIP_APL_I2C_0, "Intel Apollo Lake I2C Controller-0", IG4_APL}, { PCI_CHIP_APL_I2C_1, "Intel Apollo Lake I2C Controller-1", IG4_APL}, { PCI_CHIP_APL_I2C_2, "Intel Apollo Lake I2C Controller-2", IG4_APL}, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r338653 - head/contrib/ofed/infiniband-diags/src
On Thu, Sep 13, 2018 at 04:41:15PM +, Glen Barber wrote: > Author: gjb > Date: Thu Sep 13 16:41:15 2018 > New Revision: 338653 > URL: https://svnweb.freebsd.org/changeset/base/338653 > > Log: > Remove __DATE__ and __TIME__ from ibdiag_common.c, replacing with > the hard-coded string "not available" to ensure reproducible builds. > Sigh. I forgot to remove the "replacing the string with..." part of the commit message. It was removed entirely. Glen signature.asc Description: PGP signature
Re: svn commit: r338653 - head/contrib/ofed/infiniband-diags/src
> Author: gjb > Date: Thu Sep 13 16:41:15 2018 > New Revision: 338653 > URL: https://svnweb.freebsd.org/changeset/base/338653 > > Log: > Remove __DATE__ and __TIME__ from ibdiag_common.c, replacing with > the hard-coded string "not available" to ensure reproducible builds. Remove the "replacing with" it was changed to remove the __DATE__ and __TIME__ and replace it with nothing, this is a simple mistake as the patch evolved over a few emails. > > Discussed with: emaste > Approved by:re (rgrimes) > Sponsored by: The FreeBSD Foundation > > Modified: > head/contrib/ofed/infiniband-diags/src/ibdiag_common.c > > Modified: head/contrib/ofed/infiniband-diags/src/ibdiag_common.c > == > --- head/contrib/ofed/infiniband-diags/src/ibdiag_common.cThu Sep 13 > 16:27:21 2018(r338652) > +++ head/contrib/ofed/infiniband-diags/src/ibdiag_common.cThu Sep 13 > 16:41:15 2018(r338653) > @@ -84,8 +84,7 @@ static const struct ibdiag_opt *opts_map[256]; > > static const char *get_build_version(void) > { > - return "BUILD VERSION: " IBDIAG_VERSION " Build date: " __DATE__ " " > - __TIME__; > + return "BUILD VERSION: " IBDIAG_VERSION; > } > > static void pretty_print(int start, int width, const char *str) > > -- Rod Grimes rgri...@freebsd.org ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338653 - head/contrib/ofed/infiniband-diags/src
Author: gjb Date: Thu Sep 13 16:41:15 2018 New Revision: 338653 URL: https://svnweb.freebsd.org/changeset/base/338653 Log: Remove __DATE__ and __TIME__ from ibdiag_common.c, replacing with the hard-coded string "not available" to ensure reproducible builds. Discussed with: emaste Approved by: re (rgrimes) Sponsored by: The FreeBSD Foundation Modified: head/contrib/ofed/infiniband-diags/src/ibdiag_common.c Modified: head/contrib/ofed/infiniband-diags/src/ibdiag_common.c == --- head/contrib/ofed/infiniband-diags/src/ibdiag_common.c Thu Sep 13 16:27:21 2018(r338652) +++ head/contrib/ofed/infiniband-diags/src/ibdiag_common.c Thu Sep 13 16:41:15 2018(r338653) @@ -84,8 +84,7 @@ static const struct ibdiag_opt *opts_map[256]; static const char *get_build_version(void) { - return "BUILD VERSION: " IBDIAG_VERSION " Build date: " __DATE__ " " - __TIME__; + return "BUILD VERSION: " IBDIAG_VERSION; } static void pretty_print(int start, int width, const char *str) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338652 - head/sys/dev/cxgbe/iw_cxgbe
Author: np Date: Thu Sep 13 16:27:21 2018 New Revision: 338652 URL: https://svnweb.freebsd.org/changeset/base/338652 Log: cxgbe/iw_cxgbe: Fix reported build breakage when the kernel configuration has "device cxgbe' but no VIMAGE. Reported by: mav@ Approved by: re@ (kib@) Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c == --- head/sys/dev/cxgbe/iw_cxgbe/cm.cThu Sep 13 16:14:33 2018 (r338651) +++ head/sys/dev/cxgbe/iw_cxgbe/cm.cThu Sep 13 16:27:21 2018 (r338652) @@ -2524,8 +2524,10 @@ int c4iw_connect(struct iw_cm_id *cm_id, struct iw_cm_ struct c4iw_dev *dev = to_c4iw_dev(cm_id->device); struct c4iw_ep *ep = NULL; struct ifnet*nh_ifp;/* Logical egress interface */ +#ifdef VIMAGE struct rdma_cm_id *rdma_id = (struct rdma_cm_id*)cm_id->context; struct vnet *vnet = rdma_id->route.addr.dev_addr.net; +#endif CTR2(KTR_IW_CXGBE, "%s:ccB %p", __func__, cm_id); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r338633 - head/lib/libpam/pam.d
On Thu, Sep 13, 2018, at 10:09 AM, Jean-Sébastien Pédron wrote: > > On 9/13/18 6:08 PM, Brad Davis wrote: > >>> + ${INSTALL_LINK} ${TAG_ARGS} ${CONFDIR}/ftpd ${CONFDIR}/ftp > >> > >> I think this line should probably be ${DESTDIR}/${CONFDIR} for both > >> source and dest. > > > > Yep.. Too late at night and missed that and it didn't show up in my > > packages build, but does in dumbbells.. > > > > I have a diff over to re@ > > Thank you! Fixed in r338651. Regards, Brad Davis ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338651 - head/lib/libpam/pam.d
Author: brd Date: Thu Sep 13 16:14:33 2018 New Revision: 338651 URL: https://svnweb.freebsd.org/changeset/base/338651 Log: Really fix pam install. Don't commit late at night or you make simple mistakes. Reported by: dumbbell Approved by: re (gjb), will (mentor) Modified: head/lib/libpam/pam.d/Makefile Modified: head/lib/libpam/pam.d/Makefile == --- head/lib/libpam/pam.d/Makefile Thu Sep 13 15:58:03 2018 (r338650) +++ head/lib/libpam/pam.d/Makefile Thu Sep 13 16:14:33 2018 (r338651) @@ -29,7 +29,7 @@ FTP+= ftpd FTPPACKAGE+= ftp afterinstallconfig: - ${INSTALL_LINK} ${TAG_ARGS} ${CONFDIR}/ftpd ${CONFDIR}/ftp + ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}${CONFDIR}/ftpd ${DESTDIR}${CONFDIR}/ftp .endif .if ${MK_TELNET} != "no" ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r338633 - head/lib/libpam/pam.d
On 9/13/18 6:08 PM, Brad Davis wrote: >>> + ${INSTALL_LINK} ${TAG_ARGS} ${CONFDIR}/ftpd ${CONFDIR}/ftp >> >> I think this line should probably be ${DESTDIR}/${CONFDIR} for both >> source and dest. > > Yep.. Too late at night and missed that and it didn't show up in my > packages build, but does in dumbbells.. > > I have a diff over to re@ Thank you! -- Jean-Sébastien Pédron signature.asc Description: OpenPGP digital signature
Re: svn commit: r338633 - head/lib/libpam/pam.d
On Thu, Sep 13, 2018, at 10:07 AM, Ian Lepore wrote: > On Thu, 2018-09-13 at 07:48 +, Brad Davis wrote: > > Author: brd > > Date: Thu Sep 13 07:48:49 2018 > > New Revision: 338633 > > URL: https://svnweb.freebsd.org/changeset/base/338633 > > > > Log: > > Fix build after r338621 by avoiding LINKS and installing the link > > manually. > > > > Approved by: re (rgrimes), will (mentor) > > > > Modified: > > head/lib/libpam/pam.d/Makefile > > > > Modified: head/lib/libpam/pam.d/Makefile > > = > > = > > --- head/lib/libpam/pam.d/Makefile Thu Sep 13 07:15:02 2018 > > (r338632) > > +++ head/lib/libpam/pam.d/Makefile Thu Sep 13 07:48:49 2018 > > (r338633) > > @@ -27,7 +27,9 @@ ATPACKAGE+= at > > CONFGROUPS+= FTP > > FTP+= ftpd > > FTPPACKAGE+= ftp > > -LINKS= ${FILESDIR}/ftpd ${FILESDIR}/ftp > > + > > +afterinstallconfig: > > + ${INSTALL_LINK} ${TAG_ARGS} ${CONFDIR}/ftpd ${CONFDIR}/ftp > > I think this line should probably be ${DESTDIR}/${CONFDIR} for both > source and dest. Yep.. Too late at night and missed that and it didn't show up in my packages build, but does in dumbbells.. I have a diff over to re@ Regards, Brad Davis ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r338633 - head/lib/libpam/pam.d
On Thu, 2018-09-13 at 07:48 +, Brad Davis wrote: > Author: brd > Date: Thu Sep 13 07:48:49 2018 > New Revision: 338633 > URL: https://svnweb.freebsd.org/changeset/base/338633 > > Log: > Fix build after r338621 by avoiding LINKS and installing the link > manually. > > Approved by:re (rgrimes), will (mentor) > > Modified: > head/lib/libpam/pam.d/Makefile > > Modified: head/lib/libpam/pam.d/Makefile > = > = > --- head/lib/libpam/pam.d/MakefileThu Sep 13 07:15:02 2018 > (r338632) > +++ head/lib/libpam/pam.d/MakefileThu Sep 13 07:48:49 2018 > (r338633) > @@ -27,7 +27,9 @@ ATPACKAGE+= at > CONFGROUPS+= FTP > FTP+=ftpd > FTPPACKAGE+= ftp > -LINKS= ${FILESDIR}/ftpd ${FILESDIR}/ftp > + > +afterinstallconfig: > + ${INSTALL_LINK} ${TAG_ARGS} ${CONFDIR}/ftpd ${CONFDIR}/ftp I think this line should probably be ${DESTDIR}/${CONFDIR} for both source and dest. -- Ian > .endif > > .if ${MK_TELNET} != "no" > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338648 - head
Author: ian Date: Thu Sep 13 15:16:05 2018 New Revision: 338648 URL: https://svnweb.freebsd.org/changeset/base/338648 Log: If a user skips the pre-world mergemaster, an installworld check notices the missing ntpd user and refers to UPDATING. This change makes it more clear which aspect of UPDATING is important for the ntpd change. PR: 231334 Approved by: re (gjb) Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Thu Sep 13 14:54:52 2018(r338647) +++ head/UPDATING Thu Sep 13 15:16:05 2018(r338648) @@ -113,7 +113,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: 20180719: New uid:gid added, ntpd:ntpd (123:123). Be sure to run mergemaster or take steps to update /etc/passwd before doing installworld on - existing systems. Also, rc.d/ntpd now starts ntpd(8) as user ntpd + existing systems. Do not skip the "mergemaster -Fp" step before + installworld, as described in the update procedures near the bottom + of this document. Also, rc.d/ntpd now starts ntpd(8) as user ntpd if the new mac_ntpd(4) policy is available, unless ntpd_flags or the ntp config file contain options that change file/dir locations. When such options (e.g., "statsdir" or "crypto") are used, ntpd can ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338645 - head/sys/amd64/amd64
Author: mjg Date: Thu Sep 13 14:53:51 2018 New Revision: 338645 URL: https://svnweb.freebsd.org/changeset/base/338645 Log: amd64: implement ERMS-based memmove, memcpy and memset Reviewed by: kib Approved by: re (gjb) Differential Revision:https://reviews.freebsd.org/D17124 Modified: head/sys/amd64/amd64/machdep.c head/sys/amd64/amd64/support.S Modified: head/sys/amd64/amd64/machdep.c == --- head/sys/amd64/amd64/machdep.c Thu Sep 13 14:53:42 2018 (r338644) +++ head/sys/amd64/amd64/machdep.c Thu Sep 13 14:53:51 2018 (r338645) @@ -131,6 +131,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef SMP #include #endif @@ -2661,3 +2662,34 @@ outb_(u_short port, u_char data) } #endif /* KDB */ + +#undef memset +#undef memmove +#undef memcpy + +void *memset_std(void *buf, int c, size_t len); +void *memset_erms(void *buf, int c, size_t len); +DEFINE_IFUNC(, void *, memset, (void *, int, size_t), static) +{ + + return ((cpu_stdext_feature & CPUID_STDEXT_ERMS) != 0 ? + memset_erms : memset_std); +} + +void*memmove_std(void * _Nonnull dst, const void * _Nonnull src, size_t len); +void*memmove_erms(void * _Nonnull dst, const void * _Nonnull src, size_t len); +DEFINE_IFUNC(, void *, memmove, (void * _Nonnull, const void * _Nonnull, size_t), static) +{ + + return ((cpu_stdext_feature & CPUID_STDEXT_ERMS) != 0 ? + memmove_erms : memmove_std); +} + +void*memcpy_std(void * _Nonnull dst, const void * _Nonnull src, size_t len); +void*memcpy_erms(void * _Nonnull dst, const void * _Nonnull src, size_t len); +DEFINE_IFUNC(, void *, memcpy, (void * _Nonnull, const void * _Nonnull, size_t), static) +{ + + return ((cpu_stdext_feature & CPUID_STDEXT_ERMS) != 0 ? + memcpy_erms : memcpy_std); +} Modified: head/sys/amd64/amd64/support.S == --- head/sys/amd64/amd64/support.S Thu Sep 13 14:53:42 2018 (r338644) +++ head/sys/amd64/amd64/support.S Thu Sep 13 14:53:51 2018 (r338645) @@ -96,7 +96,7 @@ END(sse2_pagezero) * Adapted from bcopy written by: * w...@tools.de (Wolfgang Solfrank, TooLs GmbH) +49-228-985800 */ -ENTRY(memmove) +ENTRY(memmove_std) PUSH_FRAME_POINTER movq%rdi,%r9 movq%rdx,%rcx @@ -142,15 +142,45 @@ ENTRY(memmove) movq%r9,%rax POP_FRAME_POINTER ret -END(memmove) +END(memmove_std) +ENTRY(memmove_erms) + PUSH_FRAME_POINTER + movq%rdi,%r9 + movq%rdx,%rcx + + movq%rdi,%rax + subq%rsi,%rax + cmpq%rcx,%rax /* overlapping && src < dst? */ + jb 1f + + rep + movsb + movq%r9,%rax + POP_FRAME_POINTER + ret + +1: + addq%rcx,%rdi /* copy backwards */ + addq%rcx,%rsi + decq%rdi + decq%rsi + std + rep + movsb + cld + movq%r9,%rax + POP_FRAME_POINTER + ret +END(memmove_erms) + /* * memcpy(dst, src, len) *rdi, rsi, rdx * * Note: memcpy does not support overlapping copies */ -ENTRY(memcpy) +ENTRY(memcpy_std) PUSH_FRAME_POINTER movq%rdi,%rax movq%rdx,%rcx @@ -167,13 +197,23 @@ ENTRY(memcpy) movsb POP_FRAME_POINTER ret -END(memcpy) +END(memcpy_std) +ENTRY(memcpy_erms) + PUSH_FRAME_POINTER + movq%rdi,%rax + movq%rdx,%rcx + rep + movsb + POP_FRAME_POINTER + ret +END(memcpy_erms) + /* * memset(dst, c, len) *rdi, rsi, rdx */ -ENTRY(memset) +ENTRY(memset_std) PUSH_FRAME_POINTER movq%rdi,%r9 movq%rdx,%rcx @@ -195,7 +235,19 @@ ENTRY(memset) movq%r9,%rax POP_FRAME_POINTER ret -END(memset) +END(memset_std) + +ENTRY(memset_erms) + PUSH_FRAME_POINTER + movq%rdi,%r9 + movq%rdx,%rcx + movb%sil,%al + rep + stosb + movq%r9,%rax + POP_FRAME_POINTER + ret +END(memset_erms) /* fillw(pat, base, cnt) */ /* %rdi,%rsi, %rdx */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338647 - head/share/man/man5
Author: emaste Date: Thu Sep 13 14:54:52 2018 New Revision: 338647 URL: https://svnweb.freebsd.org/changeset/base/338647 Log: regenerate src.conf.5 after r338642 and r338643 Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Thu Sep 13 14:54:46 2018 (r338646) +++ head/share/man/man5/src.conf.5 Thu Sep 13 14:54:52 2018 (r338647) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd August 28, 2018 +.Dd September 13, 2018 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1534,10 +1534,10 @@ by proxy. .It Va WITHOUT_RBOOTD Set to not build or install .Xr rbootd 8 . -.It Va WITH_REPRODUCIBLE_BUILD -Set to exclude build metadata (such as the build time, user, or host) -from the kernel, boot loaders, and uname output, so that builds produce -bit-for-bit identical output. +.It Va WITHOUT_REPRODUCIBLE_BUILD +Set to include build metadata (such as the build time, user, and host) +in the kernel, boot loaders, and uname output. +Successive builds will not be bit-for-bit identical. .It Va WITHOUT_RESCUE Set to not build .Xr rescue 8 . ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338644 - head/tools/build/options
Author: emaste Date: Thu Sep 13 14:53:42 2018 New Revision: 338644 URL: https://svnweb.freebsd.org/changeset/base/338644 Log: Add WITHOUT_REPRODUCIBLE_BUILD description Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Added: head/tools/build/options/WITHOUT_REPRODUCIBLE_BUILD (contents, props changed) Added: head/tools/build/options/WITHOUT_REPRODUCIBLE_BUILD == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_REPRODUCIBLE_BUILD Thu Sep 13 14:53:42 2018(r338644) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to include build metadata (such as the build time, user, and host) +in the kernel, boot loaders, and uname output. +Successive builds will not be bit-for-bit identical. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338646 - head/bin/dd
Author: kevans Date: Thu Sep 13 14:54:46 2018 New Revision: 338646 URL: https://svnweb.freebsd.org/changeset/base/338646 Log: dd(1): Correct padding in status=progress Output padding is specified via outlen, which is set using the return value of fprintf. Because it's printing that padding plus a trailing byte, it grows by one each iteration rather than reflecting actual length. Additionally, iec was sized improperly for scaling up similarly to si. Fixing this revealed that the humanize_number(3) call to populate persec was using the wrong width. Submitted by: Thomas Hurst Reviewed by: imp Approved by: re (kib) Differential Revision:https://reviews.freebsd.org/D16960 Modified: head/bin/dd/misc.c Modified: head/bin/dd/misc.c == --- head/bin/dd/misc.c Thu Sep 13 14:53:51 2018(r338645) +++ head/bin/dd/misc.c Thu Sep 13 14:54:46 2018(r338646) @@ -111,7 +111,7 @@ progress(void) { static int outlen; char si[4 + 1 + 2 + 1]; /* 123 NUL */ - char iec[4 + 1 + 2 + 1];/* 123 NUL */ + char iec[4 + 1 + 3 + 1];/* 123 NUL */ char persec[4 + 1 + 2 + 1]; /* 123 NUL */ char *buf; double secs; @@ -121,11 +121,11 @@ progress(void) HN_DECIMAL | HN_DIVISOR_1000); humanize_number(iec, sizeof(iec), (int64_t)st.bytes, "B", HN_AUTOSCALE, HN_DECIMAL | HN_IEC_PREFIXES); - humanize_number(persec, sizeof(iec), (int64_t)(st.bytes / secs), "B", + humanize_number(persec, sizeof(persec), (int64_t)(st.bytes / secs), "B", HN_AUTOSCALE, HN_DECIMAL | HN_DIVISOR_1000); asprintf(, " %'ju bytes (%s, %s) transferred %.3fs, %s/s", (uintmax_t)st.bytes, si, iec, secs, persec); - outlen = fprintf(stderr, "%-*s\r", outlen, buf); + outlen = fprintf(stderr, "%-*s\r", outlen, buf) - 1; fflush(stderr); free(buf); need_progress = 0; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338643 - head/sys/conf
Author: emaste Date: Thu Sep 13 14:52:59 2018 New Revision: 338643 URL: https://svnweb.freebsd.org/changeset/base/338643 Log: Enable reproducible builds in advance of 12.0-REL r338642 toggled the REPRODUCIBLE_BUILD knob but missed the corresponding kern.opts.mk change. We want to build the 12.0 release artifacts with reproducible builds mode enabled. Switch it on in HEAD now to enable testing with upcoming ALPHA builds. We can revisit the default setting for HEAD after the branch is created. This change eliminates the build metadata (user, hostname, timestamp, etc.) from the kernel and loader. If the src tree is a git, svn or p4 checkout with changes then the metadata is retained. The WITHOUT_REPRODUCIBLE_BUILD src.conf(5) knob can be used to revert to the previous behaviour. Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/kern.opts.mk Modified: head/sys/conf/kern.opts.mk == --- head/sys/conf/kern.opts.mk Thu Sep 13 14:26:53 2018(r338642) +++ head/sys/conf/kern.opts.mk Thu Sep 13 14:52:59 2018(r338643) @@ -42,6 +42,7 @@ __DEFAULT_YES_OPTIONS = \ MODULE_DRM2 \ NETGRAPH \ PF \ +REPRODUCIBLE_BUILD \ SOURCELESS_HOST \ SOURCELESS_UCODE \ TESTS \ @@ -53,8 +54,7 @@ __DEFAULT_NO_OPTIONS = \ KERNEL_RETPOLINE \ NAND \ OFED \ -RATELIMIT \ -REPRODUCIBLE_BUILD +RATELIMIT # Some options are totally broken on some architectures. We disable # them. If you need to enable them on an experimental basis, you ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338642 - head/share/mk
Author: emaste Date: Thu Sep 13 14:26:53 2018 New Revision: 338642 URL: https://svnweb.freebsd.org/changeset/base/338642 Log: Enable reproducible builds in advance of 12.0-REL We want to build the 12.0 release artifacts with reproducible builds mode enabled. Switch it on in HEAD now to enable testing with upcoming ALPHA builds. We can revisit the default setting for HEAD after the branch is created. This change eliminates the build metadata (user, hostname, timestamp, etc.) from the kernel and loader. If the src tree is a git, svn or p4 checkout with changes then the metadata is retained. The WITHOUT_REPRODUCIBLE_BUILD src.conf(5) knob can be used to revert to the previous behaviour. Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk == --- head/share/mk/src.opts.mk Thu Sep 13 14:08:10 2018(r338641) +++ head/share/mk/src.opts.mk Thu Sep 13 14:26:53 2018(r338642) @@ -159,6 +159,7 @@ __DEFAULT_YES_OPTIONS = \ QUOTAS \ RADIUS_SUPPORT \ RBOOTD \ +REPRODUCIBLE_BUILD \ RESCUE \ ROUTED \ SENDMAIL \ @@ -201,7 +202,6 @@ __DEFAULT_NO_OPTIONS = \ NAND \ OFED_EXTRA \ OPENLDAP \ -REPRODUCIBLE_BUILD \ RPCBIND_WARMSTART_SUPPORT \ SHARED_TOOLCHAIN \ SORT_THREADS \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338641 - head/sys/conf
Author: manu Date: Thu Sep 13 14:08:10 2018 New Revision: 338641 URL: https://svnweb.freebsd.org/changeset/base/338641 Log: arm64: Make aw_sid and aw_thermal depend on nvmem Both drivers use this interface so add a dependancy on it. Since awg uses aw_sid for generating the MAC address, make it depend on both aw_sid and nmvem so when only removing nvmem from kernel config it will not include this driver. Reported by: sbruno Approved by: re (gjb) Modified: head/sys/conf/files.arm64 Modified: head/sys/conf/files.arm64 == --- head/sys/conf/files.arm64 Thu Sep 13 14:06:01 2018(r338640) +++ head/sys/conf/files.arm64 Thu Sep 13 14:08:10 2018(r338641) @@ -33,14 +33,14 @@ arm/allwinner/aw_nmi.c optionalaw_nmi fdt \ compile-with "${NORMAL_C} -I$S/gnu/dts/include" arm/allwinner/aw_rsb.c optionalaw_rsb fdt arm/allwinner/aw_rtc.c optionalaw_rtc fdt -arm/allwinner/aw_sid.c optionalaw_sid fdt +arm/allwinner/aw_sid.c optionalaw_sid nvmem fdt arm/allwinner/aw_spi.c optionalaw_spi fdt arm/allwinner/aw_syscon.c optionalaw_syscon ext_resources syscon fdt -arm/allwinner/aw_thermal.c optionalaw_thermal fdt +arm/allwinner/aw_thermal.c optionalaw_thermal nvmem fdt arm/allwinner/aw_usbphy.c optionalehci aw_usbphy fdt arm/allwinner/aw_wdog.coptionalaw_wdog fdt arm/allwinner/axp81x.c optionalaxp81x fdt -arm/allwinner/if_awg.c optionalawg ext_resources syscon fdt +arm/allwinner/if_awg.c optionalawg ext_resources syscon aw_sid nvmem fdt # Allwinner clock driver arm/allwinner/clkng/aw_ccung.c optionalaw_ccu fdt ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338640 - head/sbin/geom/core
Author: trasz Date: Thu Sep 13 14:06:01 2018 New Revision: 338640 URL: https://svnweb.freebsd.org/changeset/base/338640 Log: Add new option to the geom(8) utility, "-p". It makes it easy to look up the GEOM class instance from the provider name. Reviewed by: oshogbo, 0mp Approved by: re (kib) MFC after:2 weeks Relnotes: yes Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D17116 Modified: head/sbin/geom/core/geom.8 head/sbin/geom/core/geom.c Modified: head/sbin/geom/core/geom.8 == --- head/sbin/geom/core/geom.8 Thu Sep 13 13:57:42 2018(r338639) +++ head/sbin/geom/core/geom.8 Thu Sep 13 14:06:01 2018(r338640) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 5, 2011 +.Dd September 13, 2018 .Dt GEOM 8 .Os .Sh NAME @@ -52,6 +52,9 @@ .Ar class .Cm unload .Op Fl v +.Nm +.Fl p +.Ar provider-name .Sh DESCRIPTION The .Nm @@ -101,6 +104,13 @@ sysctl. Unload the kernel module which implements the given class. This command is only available if the given class is loaded as a kernel module. +.El +.Pp +Additional options include: +.Bl -tag -width ".Cm status" +.It Fl p Ar provider-name +Print detailed information about the geom which provides +.Ar provider-name . .El .Pp Class-specific commands are implemented as shared libraries which Modified: head/sbin/geom/core/geom.c == --- head/sbin/geom/core/geom.c Thu Sep 13 13:57:42 2018(r338639) +++ head/sbin/geom/core/geom.c Thu Sep 13 14:06:01 2018(r338640) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -68,6 +69,7 @@ static struct g_command *class_commands = NULL; #defineGEOM_CLASS_CMDS 0x01 #defineGEOM_STD_CMDS 0x02 static struct g_command *find_command(const char *cmdstr, int flags); +static void list_one_geom_by_provider(const char *provider_name); static int std_available(const char *name); static void std_help(struct gctl_req *req, unsigned flags); @@ -146,6 +148,7 @@ usage(void) if (class_name == NULL) { fprintf(stderr, "usage: geom [options]\n"); + fprintf(stderr, " geom -p \n"); exit(EXIT_FAILURE); } else { struct g_command *cmd; @@ -650,10 +653,57 @@ get_class(int *argc, char ***argv) usage(); } +static struct ggeom * +find_geom_by_provider(struct gmesh *mesh, const char *name) +{ + struct gclass *classp; + struct ggeom *gp; + struct gprovider *pp; + + LIST_FOREACH(classp, >lg_class, lg_class) { + LIST_FOREACH(gp, >lg_geom, lg_geom) { + LIST_FOREACH(pp, >lg_provider, lg_provider) { + if (strcmp(pp->lg_name, name) == 0) + return (gp); + } + } + } + + return (NULL); +} + int main(int argc, char *argv[]) { + char *provider_name; + int ch; + provider_name = NULL; + + if (strcmp(getprogname(), "geom") == 0) { + while ((ch = getopt(argc, argv, "hp:")) != -1) { + switch (ch) { + case 'p': + provider_name = strdup(optarg); + if (provider_name == NULL) + err(1, "strdup"); + break; + case 'h': + default: + usage(); + } + } + + /* +* Don't adjust argc and argv, it would break get_class(). +*/ + } + + if (provider_name != NULL) { + list_one_geom_by_provider(provider_name); + return (0); + } + get_class(, ); run_command(argc, argv); /* NOTREACHED */ @@ -765,6 +815,25 @@ list_one_geom(struct ggeom *gp) } } printf("\n"); +} + +static void +list_one_geom_by_provider(const char *provider_name) +{ + struct gmesh mesh; + struct ggeom *gp; + int error; + + error = geom_gettree(); + if (error != 0) + errc(EXIT_FAILURE, error, "Cannot get GEOM tree"); + + gp = find_geom_by_provider(, provider_name); + if (gp == NULL) + errx(EXIT_FAILURE, "Cannot find provider '%s'.", provider_name); + + printf("Geom class: %s\n", gp->lg_class->lg_name); + list_one_geom(gp); } static void ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338639 - head/sbin/umount
Author: mjg Date: Thu Sep 13 13:57:42 2018 New Revision: 338639 URL: https://svnweb.freebsd.org/changeset/base/338639 Log: umount: remove sync(2) call when used with -f It completely unnecessarily iterates over all filesystems and happens to be executed a lot e.g. by synth. Reviewed by: kib Approved by: re (gjb) Differential Revision:https://reviews.freebsd.org/D17143 Modified: head/sbin/umount/umount.c Modified: head/sbin/umount/umount.c == --- head/sbin/umount/umount.c Thu Sep 13 10:18:50 2018(r338638) +++ head/sbin/umount/umount.c Thu Sep 13 13:57:42 2018(r338639) @@ -136,10 +136,6 @@ main(int argc, char *argv[]) if ((fflag & MNT_FORCE) != 0 && (fflag & MNT_NONBUSY) != 0) err(1, "-f and -n are mutually exclusive"); - /* Start disks transferring immediately. */ - if ((fflag & (MNT_FORCE | MNT_NONBUSY)) == 0 && nfsforce == 0) - sync(); - if ((argc == 0 && !all) || (argc != 0 && all)) usage(); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r338633 - head/lib/libpam/pam.d
On 9/13/18 9:48 AM, Brad Davis wrote: > Author: brd > Date: Thu Sep 13 07:48:49 2018 > New Revision: 338633 > URL: https://svnweb.freebsd.org/changeset/base/338633 > > Log: > Fix build after r338621 by avoiding LINKS and installing the link manually. Hi! I still hit a failure in `make package`: ===> lib/libpam/pam.d (installconfig) installing DIRS ATDIR install -N /mnt/home/dumbbell/Projects/freebsd/src/SVN/head/etc -U -M /usr/obj/mnt/home/dumbbell/Projects/freebsd/src/SVN/head/amd64.amd64/worldstage/var/ports/distfiles/METALOG -D /usr/obj/mnt/home/dumbbell/Projects/freebsd/src/SVN/head/amd64.amd64/worldstage/var/ports/distfiles -T package=runtime -d -m 0755 -o root -g wheel /usr/obj/mnt/home/dumbbell/Projects/freebsd/src/SVN/head/amd64.amd64/worldstage/etc/pam.d install -N /mnt/home/dumbbell/Projects/freebsd/src/SVN/head/etc -U -M /usr/obj/mnt/home/dumbbell/Projects/freebsd/src/SVN/head/amd64.amd64/worldstage/var/ports/distfiles/METALOG -D /usr/obj/mnt/home/dumbbell/Projects/freebsd/src/SVN/head/amd64.amd64/worldstage/var/ports/distfiles -T package=runtime,config -C -o root -g wheel -m 444 /mnt/home/dumbbell/Projects/freebsd/src/SVN/head/lib/libpam/pam.d/README /usr/obj/mnt/home/dumbbell/Projects/freebsd/src/SVN/head/amd64.amd64/worldstage/etc/pam.d/README install -N /mnt/home/dumbbell/Projects/freebsd/src/SVN/head/etc -U -M /usr/obj/mnt/home/dumbbell/Projects/freebsd/src/SVN/head/amd64.amd64/worldstage/var/ports/distfiles/METALOG -D /usr/obj/mnt/home/dumbbell/Projects/freebsd/src/SVN/head/amd64.amd64/worldstage/var/ports/distfiles -T package=runtime,config -C -o root -g wheel -m 644 /mnt/home/dumbbell/Projects/freebsd/src/SVN/head/lib/libpam/pam.d/cron /usr/obj/mnt/home/dumbbell/Projects/freebsd/src/SVN/head/amd64.amd64/worldstage/etc/pam.d/cron (...) install -N /mnt/home/dumbbell/Projects/freebsd/src/SVN/head/etc -U -M /usr/obj/mnt/home/dumbbell/Projects/freebsd/src/SVN/head/amd64.amd64/worldstage/var/ports/distfiles/METALOG -D /usr/obj/mnt/home/dumbbell/Projects/freebsd/src/SVN/head/amd64.amd64/worldstage/var/ports/distfiles -T package=runtime,config -C -o root -g wheel -m 644 /mnt/home/dumbbell/Projects/freebsd/src/SVN/head/lib/libpam/pam.d/ftpd /usr/obj/mnt/home/dumbbell/Projects/freebsd/src/SVN/head/amd64.amd64/worldstage/etc/pam.d/ftpd install -N /mnt/home/dumbbell/Projects/freebsd/src/SVN/head/etc -U -M /usr/obj/mnt/home/dumbbell/Projects/freebsd/src/SVN/head/amd64.amd64/worldstage/var/ports/distfiles/METALOG -D /usr/obj/mnt/home/dumbbell/Projects/freebsd/src/SVN/head/amd64.amd64/worldstage/var/ports/distfiles -T package=runtime,config -C -o root -g wheel -m 644 /mnt/home/dumbbell/Projects/freebsd/src/SVN/head/lib/libpam/pam.d/telnetd /usr/obj/mnt/home/dumbbell/Projects/freebsd/src/SVN/head/amd64.amd64/worldstage/etc/pam.d/telnetd install -N /mnt/home/dumbbell/Projects/freebsd/src/SVN/head/etc -U -M /usr/obj/mnt/home/dumbbell/Projects/freebsd/src/SVN/head/amd64.amd64/worldstage/var/ports/distfiles/METALOG -D /usr/obj/mnt/home/dumbbell/Projects/freebsd/src/SVN/head/amd64.amd64/worldstage/var/ports/distfiles -l h -o root -g wheel -m 555 -T package=runtime /etc/pam.d/ftpd /etc/pam.d/ftp install: link /etc/pam.d/ftpd -> /etc/pam.d/ftp: No such file or directory *** Error code 71 Stop. make[11]: stopped in /mnt/home/dumbbell/Projects/freebsd/src/SVN/head/lib/libpam/pam.d *** Error code 1 That working copy is on r338633 and I'm using pkg-1.10.5_3. -- Jean-Sébastien Pédron The FreeBSD Project signature.asc Description: OpenPGP digital signature
svn commit: r338633 - head/lib/libpam/pam.d
Author: brd Date: Thu Sep 13 07:48:49 2018 New Revision: 338633 URL: https://svnweb.freebsd.org/changeset/base/338633 Log: Fix build after r338621 by avoiding LINKS and installing the link manually. Approved by: re (rgrimes), will (mentor) Modified: head/lib/libpam/pam.d/Makefile Modified: head/lib/libpam/pam.d/Makefile == --- head/lib/libpam/pam.d/Makefile Thu Sep 13 07:15:02 2018 (r338632) +++ head/lib/libpam/pam.d/Makefile Thu Sep 13 07:48:49 2018 (r338633) @@ -27,7 +27,9 @@ ATPACKAGE+= at CONFGROUPS+= FTP FTP+= ftpd FTPPACKAGE+= ftp -LINKS= ${FILESDIR}/ftpd ${FILESDIR}/ftp + +afterinstallconfig: + ${INSTALL_LINK} ${TAG_ARGS} ${CONFDIR}/ftpd ${CONFDIR}/ftp .endif .if ${MK_TELNET} != "no" ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338632 - head/sys/dev/xen/privcmd
Author: royger Date: Thu Sep 13 07:15:02 2018 New Revision: 338632 URL: https://svnweb.freebsd.org/changeset/base/338632 Log: xen: temporary disable SMAP when forwarding hypercalls from user-space The Xen page-table walker used to resolve the virtual addresses in the hypercalls will refuse to access user-space pages when SMAP is enabled unless the AC flag in EFLAGS is set (just like normal hardware with SMAP support would do). Since privcmd allows forwarding hypercalls (and buffers) from user-space into Xen make sure SMAP is temporary disabled for the duration of the hypercall from user-space. Approved by: re (gjb) Sponsored by: Citrix Systems R Modified: head/sys/dev/xen/privcmd/privcmd.c Modified: head/sys/dev/xen/privcmd/privcmd.c == --- head/sys/dev/xen/privcmd/privcmd.c Thu Sep 13 07:14:11 2018 (r338631) +++ head/sys/dev/xen/privcmd/privcmd.c Thu Sep 13 07:15:02 2018 (r338632) @@ -232,9 +232,21 @@ privcmd_ioctl(struct cdev *dev, unsigned long cmd, cad struct ioctl_privcmd_hypercall *hcall; hcall = (struct ioctl_privcmd_hypercall *)arg; - +#ifdef __amd64__ + /* +* The hypervisor page table walker will refuse to access +* user-space pages if SMAP is enabled, so temporary disable it +* while performing the hypercall. +*/ + if (cpu_stdext_feature & CPUID_STDEXT_SMAP) + stac(); +#endif error = privcmd_hypercall(hcall->op, hcall->arg[0], hcall->arg[1], hcall->arg[2], hcall->arg[3], hcall->arg[4]); +#ifdef __amd64__ + if (cpu_stdext_feature & CPUID_STDEXT_SMAP) + clac(); +#endif if (error >= 0) { hcall->retval = error; error = 0; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338631 - in head/sys: x86/xen xen
Author: royger Date: Thu Sep 13 07:14:11 2018 New Revision: 338631 URL: https://svnweb.freebsd.org/changeset/base/338631 Log: xen: legacy PVH fixes for the new interrupt count Register interrupts using the PIC pic_register_sources method instead of doing it in apic_setup_io. This is now required, since the internal interrupt structures are not yet setup when calling apic_setup_io. Approved by: re (gjb) Sponsored by: Citrix Systems R Modified: head/sys/x86/xen/pvcpu_enum.c head/sys/x86/xen/xen_intr.c head/sys/xen/xen_intr.h Modified: head/sys/x86/xen/pvcpu_enum.c == --- head/sys/x86/xen/pvcpu_enum.c Thu Sep 13 07:13:13 2018 (r338630) +++ head/sys/x86/xen/pvcpu_enum.c Thu Sep 13 07:14:11 2018 (r338631) @@ -193,52 +193,65 @@ xenpv_setup_io(void) { if (xen_initial_domain()) { - int i, ret; + /* +* NB: we could iterate over the MADT IOAPIC entries in order +* to figure out the exact number of IOAPIC interrupts, but +* this is legacy code so just keep using the previous +* behaviour and assume a maximum of 256 interrupts. +*/ + num_io_irqs = max(MINIMUM_MSI_INT - 1, num_io_irqs); - /* Map MADT */ - madt_physaddr = acpi_find_table(ACPI_SIG_MADT); - madt = acpi_map_table(madt_physaddr, ACPI_SIG_MADT); - madt_length = madt->Header.Length; + acpi_SetDefaultIntrModel(ACPI_INTR_APIC); + } + return (0); +} - /* Try to initialize ACPI so that we can access the FADT. */ - i = acpi_Startup(); - if (ACPI_FAILURE(i)) { - printf("MADT: ACPI Startup failed with %s\n", - AcpiFormatException(i)); - printf("Try disabling either ACPI or apic support.\n"); - panic("Using MADT but ACPI doesn't work"); - } +void +xenpv_register_pirqs(struct pic *pic __unused) +{ + unsigned int i; + int ret; - /* Run through the table to see if there are any overrides. */ - madt_walk_table(madt_parse_ints, NULL); + /* Map MADT */ + madt_physaddr = acpi_find_table(ACPI_SIG_MADT); + madt = acpi_map_table(madt_physaddr, ACPI_SIG_MADT); + madt_length = madt->Header.Length; - /* -* If there was not an explicit override entry for the SCI, -* force it to use level trigger and active-low polarity. -*/ - if (!madt_found_sci_override) { - printf( - "MADT: Forcing active-low polarity and level trigger for SCI\n"); - ret = xen_register_pirq(AcpiGbl_FADT.SciInterrupt, - INTR_TRIGGER_LEVEL, INTR_POLARITY_LOW); - if (ret != 0) - panic("Unable to register SCI IRQ"); - } + /* Try to initialize ACPI so that we can access the FADT. */ + ret = acpi_Startup(); + if (ACPI_FAILURE(ret)) { + printf("MADT: ACPI Startup failed with %s\n", + AcpiFormatException(ret)); + printf("Try disabling either ACPI or apic support.\n"); + panic("Using MADT but ACPI doesn't work"); + } - /* Register legacy ISA IRQs */ - for (i = 1; i < 16; i++) { - if (intr_lookup_source(i) != NULL) - continue; - ret = xen_register_pirq(i, INTR_TRIGGER_EDGE, - INTR_POLARITY_LOW); - if (ret != 0 && bootverbose) - printf("Unable to register legacy IRQ#%d: %d\n", - i, ret); - } + /* Run through the table to see if there are any overrides. */ + madt_walk_table(madt_parse_ints, NULL); - acpi_SetDefaultIntrModel(ACPI_INTR_APIC); + /* +* If there was not an explicit override entry for the SCI, +* force it to use level trigger and active-low polarity. +*/ + if (!madt_found_sci_override) { + printf( +"MADT: Forcing active-low polarity and level trigger for SCI\n"); + ret = xen_register_pirq(AcpiGbl_FADT.SciInterrupt, + INTR_TRIGGER_LEVEL, INTR_POLARITY_LOW); + if (ret != 0) + panic("Unable to register SCI IRQ"); } - return (0); + + /* Register legacy ISA IRQs */ + for (i = 1; i < 16; i++) { + if (intr_lookup_source(i) != NULL) + continue; + ret = xen_register_pirq(i, INTR_TRIGGER_EDGE, +
svn commit: r338630 - head/sys/x86/x86
Author: royger Date: Thu Sep 13 07:13:13 2018 New Revision: 338630 URL: https://svnweb.freebsd.org/changeset/base/338630 Log: lapic: skip setting intrcnt if lapic is not present Instead of panicking. Legacy PVH mode doesn't provide a lapic, and since native_lapic_intrcnt is called unconditionally this would cause the assert to trigger. Change the assert into a continue in order to take into account the possibility of systems without a lapic. Reviewed by: jhb Approved by: re (gjb) Sponsored by: Citrix Systems R Differential revision:https://reviews.freebsd.org/D17015 Modified: head/sys/x86/x86/local_apic.c Modified: head/sys/x86/x86/local_apic.c == --- head/sys/x86/x86/local_apic.c Thu Sep 13 07:12:16 2018 (r338629) +++ head/sys/x86/x86/local_apic.c Thu Sep 13 07:13:13 2018 (r338630) @@ -855,7 +855,8 @@ native_lapic_intrcnt(void *dummy __unused) STAILQ_FOREACH(pc, , pc_allcpu) { la = [pc->pc_apic_id]; - KASSERT(la->la_present, ("missing APIC structure")); + if (!la->la_present) + continue; snprintf(buf, sizeof(buf), "cpu%d:timer", pc->pc_cpuid); intrcnt_add(buf, >la_timer_count); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338629 - head/sys/x86/xen
Author: royger Date: Thu Sep 13 07:12:16 2018 New Revision: 338629 URL: https://svnweb.freebsd.org/changeset/base/338629 Log: xen: fix setting legacy PVH vcpu id The recommended way to obtain the vcpu id is using the cpuid instruction with a specific leaf value. This leaf value must be obtained at runtime, and it's done when populating the hypercall page. Legacy PVH however will get the hypercall page populated by the hypervisor itself before booting, so the cpuid leaf was not actually set, thus preventing setting the vcpu id value from cpuid. Fix this by making sure the cpuid leaf has been probed before attempting to set the vcpu id. Approved by: re (gjb) Sponsored by: Citrix Systems R Modified: head/sys/x86/xen/hvm.c Modified: head/sys/x86/xen/hvm.c == --- head/sys/x86/xen/hvm.c Thu Sep 13 07:11:11 2018(r338628) +++ head/sys/x86/xen/hvm.c Thu Sep 13 07:12:16 2018(r338629) @@ -163,6 +163,12 @@ xen_hvm_init_hypercall_stubs(enum xen_hvm_init_type in { uint32_t regs[4]; + /* Legacy PVH will get here without the cpuid leaf being set. */ + if (cpuid_base == 0) + cpuid_base = xen_hvm_cpuid_base(); + if (cpuid_base == 0) + return (ENXIO); + if (xen_domain() && init_type == XEN_HVM_INIT_LATE) { /* * If the domain type is already set we can assume that the @@ -172,10 +178,6 @@ xen_hvm_init_hypercall_stubs(enum xen_hvm_init_type in hypervisor_version(); return 0; } - - cpuid_base = xen_hvm_cpuid_base(); - if (cpuid_base == 0) - return (ENXIO); if (init_type == XEN_HVM_INIT_LATE) hypervisor_version(); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338628 - head/sys/x86/xen
Author: royger Date: Thu Sep 13 07:11:11 2018 New Revision: 338628 URL: https://svnweb.freebsd.org/changeset/base/338628 Log: xen: limit the usage of PIRQs to a legacy PVH Dom0 That's the only mode in FreeBSD that requires the usage of PIRQs, so there's no need to attach the PIRQ PIC when running in other modes. Approved by: re (gjb) Sponsored by: Citrix Systems R Modified: head/sys/x86/xen/xen_intr.c Modified: head/sys/x86/xen/xen_intr.c == --- head/sys/x86/xen/xen_intr.c Thu Sep 13 07:09:41 2018(r338627) +++ head/sys/x86/xen/xen_intr.c Thu Sep 13 07:11:11 2018(r338628) @@ -656,7 +656,8 @@ xen_intr_init(void *dummy __unused) xen_intr_pirq_eoi_map_enabled = true; intr_register_pic(_intr_pic); - intr_register_pic(_intr_pirq_pic); + if (xen_pv_domain() && xen_initial_domain()) + intr_register_pic(_intr_pirq_pic); if (bootverbose) printf("Xen interrupt system initialized\n"); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338627 - head/sys/x86/xen
Author: royger Date: Thu Sep 13 07:09:41 2018 New Revision: 338627 URL: https://svnweb.freebsd.org/changeset/base/338627 Log: xen: fix initial kenv setup for legacy PVH When adding support for the new PVH mode the kenv handling was switched to use a boot time allocated scratch space, however the legacy PVH early boot code was not modified to allocate such space. Approved by: re (gjb) Sponsored by: Citrix Systems R Modified: head/sys/x86/xen/pv.c Modified: head/sys/x86/xen/pv.c == --- head/sys/x86/xen/pv.c Thu Sep 13 07:08:31 2018(r338626) +++ head/sys/x86/xen/pv.c Thu Sep 13 07:09:41 2018(r338627) @@ -204,6 +204,7 @@ hammer_time_xen_legacy(start_info_t *si, uint64_t xens uint64_t *PT3 = (u_int64_t *)(xenstack + PAGE_SIZE); uint64_t *PT2 = (u_int64_t *)(xenstack + 2 * PAGE_SIZE); int i; + char *kenv; xen_domain_type = XEN_PV_DOMAIN; vm_guest = VM_GUEST_XEN; @@ -251,6 +252,15 @@ hammer_time_xen_legacy(start_info_t *si, uint64_t xens PT2[i] |= PG_V | PG_RW | PG_PS | PG_U; } load_cr3(((uint64_t)[0]) - KERNBASE); + + /* +* Init an empty static kenv using a free page. The contents will be +* filled from the parse_preload_data hook. +*/ + kenv = (void *)(physfree + KERNBASE); + physfree += PAGE_SIZE; + bzero(kenv, PAGE_SIZE); + init_static_kenv(kenv, PAGE_SIZE); /* Set the hooks for early functions that diverge from bare metal */ init_ops = xen_legacy_init_ops; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338626 - head/sys/x86/xen
Author: royger Date: Thu Sep 13 07:08:31 2018 New Revision: 338626 URL: https://svnweb.freebsd.org/changeset/base/338626 Log: xen: remove xenpv_set_ids The vcpu_id for legacy PVH mode can be set from the output of cpuid, so there's no need to have a special function to set it. Also note that xenpv_set_ids should have been executed only for PV guests, but was executed for all guests types and vcpu_id was later fixed up for HVM guests. Reported by: cperciva Approved by: re (gjb) Sponsored by: Citrix Systems R Modified: head/sys/x86/xen/hvm.c head/sys/x86/xen/pvcpu_enum.c Modified: head/sys/x86/xen/hvm.c == --- head/sys/x86/xen/hvm.c Thu Sep 13 07:07:13 2018(r338625) +++ head/sys/x86/xen/hvm.c Thu Sep 13 07:08:31 2018(r338626) @@ -419,6 +419,9 @@ xen_hvm_cpu_init(void) */ KASSERT(cpuid_base != 0, ("Invalid base Xen CPUID leaf")); cpuid_count(cpuid_base + 4, 0, regs); + KASSERT((regs[0] & XEN_HVM_CPUID_VCPU_ID_PRESENT) || + !xen_pv_domain(), + ("Xen PV domain without vcpu_id in cpuid")); PCPU_SET(vcpu_id, (regs[0] & XEN_HVM_CPUID_VCPU_ID_PRESENT) ? regs[1] : PCPU_GET(acpi_id)); Modified: head/sys/x86/xen/pvcpu_enum.c == --- head/sys/x86/xen/pvcpu_enum.c Thu Sep 13 07:07:13 2018 (r338625) +++ head/sys/x86/xen/pvcpu_enum.c Thu Sep 13 07:08:31 2018 (r338626) @@ -249,19 +249,3 @@ xenpv_register(void *dummy __unused) } } SYSINIT(xenpv_register, SI_SUB_TUNABLES - 1, SI_ORDER_FIRST, xenpv_register, NULL); - -/* - * Setup per-CPU vCPU IDs - */ -static void -xenpv_set_ids(void *dummy) -{ - struct pcpu *pc; - int i; - - CPU_FOREACH(i) { - pc = pcpu_find(i); - pc->pc_vcpu_id = i; - } -} -SYSINIT(xenpv_set_ids, SI_SUB_CPU, SI_ORDER_MIDDLE, xenpv_set_ids, NULL); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338625 - head/sys/x86/xen
Author: royger Date: Thu Sep 13 07:07:13 2018 New Revision: 338625 URL: https://svnweb.freebsd.org/changeset/base/338625 Log: xen: fix PV IPI setup So that it's done when the vcpu_id has been set. For the BSP the vcpu_id is set at SUB_INTR, while for the APs it's done in init_secondary_tail that's called at SUB_SMP order FIRST. Reported and tested by: cperciva Approved by: re (gjb) Sponsored by: Citrix Systems R Differential revision:https://reviews.freebsd.org/D17013 Modified: head/sys/x86/xen/xen_apic.c Modified: head/sys/x86/xen/xen_apic.c == --- head/sys/x86/xen/xen_apic.c Thu Sep 13 07:05:51 2018(r338624) +++ head/sys/x86/xen/xen_apic.c Thu Sep 13 07:07:13 2018(r338625) @@ -592,6 +592,6 @@ xen_setup_cpus(void) apic_ops.ipi_vectored = xen_pv_lapic_ipi_vectored; } -/* We need to setup IPIs before APs are started */ -SYSINIT(xen_setup_cpus, SI_SUB_SMP-1, SI_ORDER_FIRST, xen_setup_cpus, NULL); +/* Switch to using PV IPIs as soon as the vcpu_id is set. */ +SYSINIT(xen_setup_cpus, SI_SUB_SMP, SI_ORDER_SECOND, xen_setup_cpus, NULL); #endif /* SMP */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338624 - head/sys/x86/x86
Author: royger Date: Thu Sep 13 07:05:51 2018 New Revision: 338624 URL: https://svnweb.freebsd.org/changeset/base/338624 Log: msi: remove the check that interrupt sources have been added When running as a specific type of Xen guest the hypervisor won't provide any emulated IO-APICs or legacy PICs at all, thus hitting the following assert in the MSI code: panic: Assertion num_io_irqs > 0 failed at /usr/src/sys/x86/x86/msi.c:334 cpuid = 0 time = 1 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0x826ffa70 vpanic() at vpanic+0x1a3/frame 0x826ffad0 panic() at panic+0x43/frame 0x826ffb30 msi_init() at msi_init+0xed/frame 0x826ffb40 apic_setup_io() at apic_setup_io+0x72/frame 0x826ffb50 mi_startup() at mi_startup+0x118/frame 0x826ffb70 start_kernel() at start_kernel+0x10 Fix this by removing the assert in the MSI code, since it's possible to get to the MSI initialization without having registered any other interrupt sources. Reviewed by: jhb Approved by: re (gjb) Sponsored by: Citrix Systems R Differential revision:https://reviews.freebsd.org/D17001 Modified: head/sys/x86/x86/msi.c Modified: head/sys/x86/x86/msi.c == --- head/sys/x86/x86/msi.c Thu Sep 13 07:04:00 2018(r338623) +++ head/sys/x86/x86/msi.c Thu Sep 13 07:05:51 2018(r338624) @@ -331,7 +331,6 @@ msi_init(void) } #endif - MPASS(num_io_irqs > 0); first_msi_irq = max(MINIMUM_MSI_INT, num_io_irqs); num_io_irqs = first_msi_irq + NUM_MSI_INTS; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r338623 - head/sys/compat/x86bios
Author: royger Date: Thu Sep 13 07:04:00 2018 New Revision: 338623 URL: https://svnweb.freebsd.org/changeset/base/338623 Log: x86bios: use M_NOWAIT with mallocs Or else it triggers the following bug: APIC: CPU 6 has ACPI ID 6 APIC: CPU 7 has ACPI ID 7 panic: vm_wait in early boot cpuid = 0 time = 1 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0x826ff8d0 vpanic() at vpanic+0x1a3/frame 0x826ff930 panic() at panic+0x43/frame 0x826ff990 vm_wait_domain() at vm_wait_domain+0xf9/frame 0x826ff9c0 kmem_alloc_contig_domain() at kmem_alloc_contig_domain+0x252/frame 0x826ffa50 kmem_alloc_contig() at kmem_alloc_contig+0x6c/frame 0x826ffad0 contigmalloc() at contigmalloc+0x2e/frame 0x826ffb00 x86bios_modevent() at x86bios_modevent+0x225/frame 0x826ffb20 module_register_init() at module_register_init+0xc0/frame 0x826ffb50 mi_startup() at mi_startup+0x118/frame 0x826ffb70 start_kernel() at start_kernel+0x10 While there also make x86bios_unmap_mem idempotent. Reviewed by: kib Approved by: re (gjb) Sponsored by: Citrix Systems R Differential revision:https://reviews.freebsd.org/D17000 Modified: head/sys/compat/x86bios/x86bios.c Modified: head/sys/compat/x86bios/x86bios.c == --- head/sys/compat/x86bios/x86bios.c Thu Sep 13 06:21:07 2018 (r338622) +++ head/sys/compat/x86bios/x86bios.c Thu Sep 13 07:04:00 2018 (r338623) @@ -656,17 +656,24 @@ static __inline void x86bios_unmap_mem(void) { - free(x86bios_map, M_DEVBUF); - if (x86bios_ivt != NULL) + if (x86bios_map != NULL) { + free(x86bios_map, M_DEVBUF); + x86bios_map = NULL; + } + if (x86bios_ivt != NULL) { #ifdef X86BIOS_NATIVE_ARCH pmap_unmapbios((vm_offset_t)x86bios_ivt, X86BIOS_IVT_SIZE); #else free(x86bios_ivt, M_DEVBUF); + x86bios_ivt = NULL; #endif + } if (x86bios_rom != NULL) pmap_unmapdev((vm_offset_t)x86bios_rom, X86BIOS_ROM_SIZE); - if (x86bios_seg != NULL) + if (x86bios_seg != NULL) { contigfree(x86bios_seg, X86BIOS_SEG_SIZE, M_DEVBUF); + x86bios_seg = NULL; + } } static __inline int @@ -674,7 +681,9 @@ x86bios_map_mem(void) { x86bios_map = malloc(sizeof(*x86bios_map) * X86BIOS_PAGES, M_DEVBUF, - M_WAITOK | M_ZERO); + M_NOWAIT | M_ZERO); + if (x86bios_map == NULL) + goto fail; #ifdef X86BIOS_NATIVE_ARCH x86bios_ivt = pmap_mapbios(X86BIOS_IVT_BASE, X86BIOS_IVT_SIZE); @@ -688,7 +697,9 @@ x86bios_map_mem(void) rounddown(x86bios_rom_phys, X86BIOS_PAGE_SIZE); else #else - x86bios_ivt = malloc(X86BIOS_IVT_SIZE, M_DEVBUF, M_ZERO | M_WAITOK); + x86bios_ivt = malloc(X86BIOS_IVT_SIZE, M_DEVBUF, M_NOWAIT | M_ZERO); + if (x86bios_ivt == NULL) + goto fail; #endif x86bios_rom_phys = X86BIOS_ROM_BASE; @@ -703,8 +714,10 @@ x86bios_map_mem(void) goto fail; #endif - x86bios_seg = contigmalloc(X86BIOS_SEG_SIZE, M_DEVBUF, M_WAITOK, + x86bios_seg = contigmalloc(X86BIOS_SEG_SIZE, M_DEVBUF, M_NOWAIT, X86BIOS_RAM_BASE, x86bios_rom_phys, X86BIOS_PAGE_SIZE, 0); + if (x86bios_seg == NULL) + goto fail; x86bios_seg_phys = vtophys(x86bios_seg); x86bios_set_pages((vm_offset_t)x86bios_ivt, X86BIOS_IVT_BASE, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"