diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2020-05-18 12:39:29 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2020-05-18 12:39:29 +0000 |
commit | 499f455359a249f5cd686e106367ef0c71b5580a (patch) | |
tree | 7435f63f2b5898a52c5564ee3d88f30390350ec6 /usr/src | |
parent | e41e23be063a6b1ea71cf487aa8adc4efbe89af6 (diff) | |
parent | d0b89bad7e1fdc02b67434ccc5d1c0e983e25583 (diff) | |
download | illumos-joyent-499f455359a249f5cd686e106367ef0c71b5580a.tar.gz |
[illumos-gate merge]
commit d0b89bad7e1fdc02b67434ccc5d1c0e983e25583
12743 man page spelling mistakes
commit 7e95e8d94bf4ccccc742a5e7a1370afe0d890ae3
12728 emlxs: symbol 'emlxs_prog_type_t' is multiply-defined
commit bd025ac2b6fbfbc59dfc0bd50a0e56dd56de9229
12739 gld module missing dep on mac after 12671
commit 4c87aefe8930bd07275b8dd2e96ea5f24d93a52e
12665 want modern bhyve
commit a68aefedafdc78f1f25e9c888f61357d59c87311
12540 mdb: build with gcore
Conflicts:
exception_lists/check_rtime
exception_lists/copyright
exception_lists/cstyle
exception_lists/hdrchk
exception_lists/packaging
exception_lists/wscheck
usr/src/cmd/bhyve/Makefile
usr/src/cmd/bhyve/acpi.c
usr/src/cmd/bhyve/bhyverun.c
usr/src/cmd/bhyve/block_if.c
usr/src/cmd/bhyve/gdb.c
usr/src/cmd/bhyve/mevent.c
usr/src/cmd/bhyve/pci_e82545.c
usr/src/cmd/bhyve/pci_emul.c
usr/src/cmd/bhyve/pci_emul.h
usr/src/cmd/bhyve/pci_fbuf.c
usr/src/cmd/bhyve/pci_nvme.c
usr/src/cmd/bhyve/pci_passthru.c
usr/src/cmd/bhyve/pci_virtio_block.c
usr/src/cmd/bhyve/pci_virtio_console.c
usr/src/cmd/bhyve/pci_virtio_net.c
usr/src/cmd/bhyve/pci_virtio_scsi.c
usr/src/cmd/bhyve/pci_virtio_viona.c
usr/src/cmd/bhyve/pci_xhci.c
usr/src/cmd/bhyve/rfb.c
usr/src/cmd/bhyve/test/Makefile.com
usr/src/cmd/bhyve/test/tst/mevent/lists.delete.c
usr/src/cmd/bhyve/test/tst/mevent/testlib.c
usr/src/cmd/bhyve/test/tst/mevent/testlib.h
usr/src/cmd/bhyve/uart_emul.c
usr/src/cmd/bhyve/virtio.c
usr/src/cmd/bhyve/virtio.h
usr/src/cmd/bhyvectl/Makefile
usr/src/cmd/bhyvectl/bhyvectl.c
usr/src/cmd/devfsadm/i386/misc_link_i386.c
usr/src/compat/freebsd/amd64/machine/specialreg.h
usr/src/compat/freebsd/sys/callout.h
usr/src/compat/freebsd/sys/param.h
usr/src/lib/Makefile
usr/src/lib/libvmmapi/common/mapfile-vers
usr/src/lib/libvmmapi/common/vmmapi.c
usr/src/lib/libvmmapi/common/vmmapi.h
usr/src/pkg/manifests/system-bhyve.mf
usr/src/pkg/manifests/system-library-bhyve.mf
usr/src/uts/i86pc/Makefile.files
usr/src/uts/i86pc/io/vmm/README.sync
usr/src/uts/i86pc/io/vmm/amd/svm.c
usr/src/uts/i86pc/io/vmm/intel/vmx.c
usr/src/uts/i86pc/io/vmm/intel/vtd.c
usr/src/uts/i86pc/io/vmm/io/ppt.h
usr/src/uts/i86pc/io/vmm/io/vatpit.c
usr/src/uts/i86pc/io/vmm/io/vlapic.c
usr/src/uts/i86pc/io/vmm/vm/vm_map.h
usr/src/uts/i86pc/io/vmm/vm/vm_page.h
usr/src/uts/i86pc/io/vmm/vmm.c
usr/src/uts/i86pc/io/vmm/vmm_host.h
usr/src/uts/i86pc/io/vmm/vmm_instruction_emul.c
usr/src/uts/i86pc/io/vmm/vmm_sol_dev.c
usr/src/uts/i86pc/io/vmm/vmm_sol_glue.c
usr/src/uts/i86pc/io/vmm/vmm_sol_vm.c
usr/src/uts/i86pc/sys/viona_io.h
usr/src/uts/i86pc/sys/vmm.h
usr/src/uts/i86pc/sys/vmm_dev.h
usr/src/uts/i86pc/sys/vmm_drv.h
usr/src/uts/i86pc/viona/Makefile
usr/src/uts/i86pc/vmm/Makefile
Diffstat (limited to 'usr/src')
48 files changed, 251 insertions, 1940 deletions
diff --git a/usr/src/cmd/bhyve/Makefile.com b/usr/src/cmd/bhyve/Makefile.com deleted file mode 100644 index 4a92b622ab..0000000000 --- a/usr/src/cmd/bhyve/Makefile.com +++ /dev/null @@ -1,94 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2015 Pluribus Networks Inc. -# - -PROG= bhyve - -SRCS = atkbdc.c \ - bhyvegc.c \ - bhyverun.c \ - block_if.c \ - console.c \ - consport.c \ - inout.c \ - ioapic.c \ - mem.c \ - mptbl.c \ - pci_ahci.c \ - pci_emul.c \ - pci_hostbridge.c \ - pci_irq.c \ - pci_lpc.c \ - pci_virtio_block.c \ - pci_virtio_net.c \ - pci_virtio_viona.c \ - pm.c \ - pmtmr.c \ - post.c \ - ps2kbd.c \ - ps2mouse.c \ - rfb.c \ - rtc.c \ - smbiostbl.c \ - uart_emul.c \ - vga.c \ - virtio.c \ - vmm_instruction_emul.c \ - xmsr.c \ - spinup_ap.c \ - bhyve_sol_glue.c - -OBJS = $(SRCS:.c=.o) - -include ../../Makefile.cmd - -.KEEP_STATE: - -CFLAGS += $(CCVERBOSE) -_gcc=-Wimplicit-function-declaration -CFLAGS64 += $(CCVERBOSE) -_gcc=-Wimplicit-function-declaration -CPPFLAGS = -I$(COMPAT)/freebsd -I$(CONTRIB)/freebsd $(CPPFLAGS.master) \ - -I$(ROOT)/usr/platform/i86pc/include \ - -I$(SRC)/uts/i86pc/io/vmm \ - -I$(SRC)/uts/common \ - -I$(SRC)/uts/i86pc \ - -I$(SRC)/lib/libdladm/common -LDLIBS += -lsocket -lnsl -ldlpi -ldladm -lkstat -lmd -luuid -lvmmapi - -POST_PROCESS += ; $(GENSETDEFS) $@ - -all: $(PROG) - -$(PROG): $(OBJS) - $(LINK.c) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS) - $(POST_PROCESS) - -install: all $(ROOTUSRSBINPROG) - -clean: - $(RM) $(OBJS) - -lint: lint_SRCS - -include ../../Makefile.targ - -%.o: ../%.c - $(COMPILE.c) $< - $(POST_PROCESS_O) - -%.o: $(SRC)/uts/i86pc/io/vmm/%.c - $(COMPILE.c) $< - $(POST_PROCESS_O) - -%.o: ../%.s - $(COMPILE.s) $< diff --git a/usr/src/cmd/bhyve/amd64/Makefile b/usr/src/cmd/bhyve/amd64/Makefile deleted file mode 100644 index 13cdae6663..0000000000 --- a/usr/src/cmd/bhyve/amd64/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2015 Pluribus Networks Inc. -# - -include ../Makefile.com -include ../../Makefile.cmd.64 - -CPPFLAGS += -I$(COMPAT)/freebsd/amd64 -I$(CONTRIB)/freebsd/amd64 - -install: all $(ROOTUSRSBINPROG64) diff --git a/usr/src/cmd/bhyve/pmtmr.c b/usr/src/cmd/bhyve/pmtmr.c deleted file mode 100644 index 92ab24be57..0000000000 --- a/usr/src/cmd/bhyve/pmtmr.c +++ /dev/null @@ -1,212 +0,0 @@ -/*- - * Copyright (c) 2012 NetApp, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL NETAPP, INC OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD: head/usr.sbin/bhyve/pmtmr.c 259998 2013-12-28 04:01:05Z jhb $ - */ -/* - * This file and its contents are supplied under the terms of the - * Common Development and Distribution License ("CDDL"), version 1.0. - * You may only use this file in accordance with the terms of version - * 1.0 of the CDDL. - * - * A full copy of the text of the CDDL should have accompanied this - * source. A copy of the CDDL is also available via the Internet at - * http://www.illumos.org/license/CDDL. - * - * Copyright 2014 Pluribus Networks Inc. - */ - -#include <sys/cdefs.h> -__FBSDID("$FreeBSD: head/usr.sbin/bhyve/pmtmr.c 259998 2013-12-28 04:01:05Z jhb $"); - -#include <sys/types.h> -#include <sys/sysctl.h> -#include <sys/time.h> -#include <machine/cpufunc.h> - -#include <stdio.h> -#include <stdlib.h> -#include <time.h> -#include <assert.h> -#include <pthread.h> -#ifndef __FreeBSD__ -#include <kstat.h> -#endif - -#include "acpi.h" -#include "inout.h" - -/* - * The ACPI Power Management timer is a free-running 24- or 32-bit - * timer with a frequency of 3.579545MHz - * - * This implementation will be 32-bits - */ - -#define PMTMR_FREQ 3579545 /* 3.579545MHz */ - -static pthread_mutex_t pmtmr_mtx; -static pthread_once_t pmtmr_once = PTHREAD_ONCE_INIT; - -static uint64_t pmtmr_old; - -static uint64_t pmtmr_tscf; -static uint64_t pmtmr_tsc_old; - -#ifdef __FreeBSD__ -static clockid_t clockid = CLOCK_UPTIME_FAST; -static struct timespec pmtmr_uptime_old; - -#define timespecsub(vvp, uvp) \ - do { \ - (vvp)->tv_sec -= (uvp)->tv_sec; \ - (vvp)->tv_nsec -= (uvp)->tv_nsec; \ - if ((vvp)->tv_nsec < 0) { \ - (vvp)->tv_sec--; \ - (vvp)->tv_nsec += 1000000000; \ - } \ - } while (0) - -static uint64_t -timespec_to_pmtmr(const struct timespec *tsnew, const struct timespec *tsold) -{ - struct timespec tsdiff; - int64_t nsecs; - - tsdiff = *tsnew; - timespecsub(&tsdiff, tsold); - nsecs = tsdiff.tv_sec * 1000000000 + tsdiff.tv_nsec; - assert(nsecs >= 0); - - return (nsecs * PMTMR_FREQ / 1000000000 + pmtmr_old); -} -#endif - -static uint64_t -tsc_to_pmtmr(uint64_t tsc_new, uint64_t tsc_old) -{ - - return ((tsc_new - tsc_old) * PMTMR_FREQ / pmtmr_tscf + pmtmr_old); -} - -static void -pmtmr_init(void) -{ -#ifdef __FreeBSD__ - size_t len; - int smp_tsc, err; - struct timespec tsnew, tsold = { 0 }; - - len = sizeof(smp_tsc); - err = sysctlbyname("kern.timecounter.smp_tsc", &smp_tsc, &len, NULL, 0); - assert(err == 0); - - if (smp_tsc) { - len = sizeof(pmtmr_tscf); - err = sysctlbyname("machdep.tsc_freq", &pmtmr_tscf, &len, - NULL, 0); - assert(err == 0); - - pmtmr_tsc_old = rdtsc(); - pmtmr_old = tsc_to_pmtmr(pmtmr_tsc_old, 0); - } else { - if (getenv("BHYVE_PMTMR_PRECISE") != NULL) - clockid = CLOCK_UPTIME; - - err = clock_gettime(clockid, &tsnew); - assert(err == 0); - - pmtmr_uptime_old = tsnew; - pmtmr_old = timespec_to_pmtmr(&tsnew, &tsold); - } -#else - kstat_ctl_t *kstat_ctl; - kstat_t *kstat; - kstat_named_t *kstat_cpu_freq; - - kstat_ctl = kstat_open(); - kstat = kstat_lookup(kstat_ctl, "cpu_info", 0, NULL); - kstat_read(kstat_ctl, kstat, NULL); - kstat_cpu_freq = kstat_data_lookup(kstat, "current_clock_Hz"); - pmtmr_tscf = kstat_cpu_freq->value.ul; - kstat_close(kstat_ctl); - - pmtmr_tsc_old = rdtsc(); - pmtmr_old = tsc_to_pmtmr(pmtmr_tsc_old, 0); -#endif - pthread_mutex_init(&pmtmr_mtx, NULL); -} - -static uint32_t -pmtmr_val(void) -{ - struct timespec tsnew; - uint64_t pmtmr_tsc_new; - uint64_t pmtmr_new; - int error; - - pthread_once(&pmtmr_once, pmtmr_init); - - pthread_mutex_lock(&pmtmr_mtx); - -#ifdef __FreeBSD__ - if (pmtmr_tscf) { - pmtmr_tsc_new = rdtsc(); - pmtmr_new = tsc_to_pmtmr(pmtmr_tsc_new, pmtmr_tsc_old); - pmtmr_tsc_old = pmtmr_tsc_new; - } else { - error = clock_gettime(clockid, &tsnew); - assert(error == 0); - - pmtmr_new = timespec_to_pmtmr(&tsnew, &pmtmr_uptime_old); - pmtmr_uptime_old = tsnew; - } -#else - pmtmr_tsc_new = rdtsc(); - pmtmr_new = tsc_to_pmtmr(pmtmr_tsc_new, pmtmr_tsc_old); - pmtmr_tsc_old = pmtmr_tsc_new; -#endif - pmtmr_old = pmtmr_new; - - pthread_mutex_unlock(&pmtmr_mtx); - - return (pmtmr_new); -} - -static int -pmtmr_handler(struct vmctx *ctx, int vcpu, int in, int port, int bytes, - uint32_t *eax, void *arg) -{ - assert(in == 1); - - if (bytes != 4) - return (-1); - - *eax = pmtmr_val(); - - return (0); -} - -INOUT_PORT(pmtmr, IO_PMTMR, IOPORT_F_IN, pmtmr_handler); diff --git a/usr/src/cmd/bhyveconsole/Makefile b/usr/src/cmd/bhyveconsole/Makefile deleted file mode 100644 index 11d34e6599..0000000000 --- a/usr/src/cmd/bhyveconsole/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2013 Pluribus Networks Inc. -# - -include ../Makefile.cmd - -SUBDIRS= $(MACH) - -all := TARGET = all -install := TARGET = install -clean := TARGET = clean -clobber := TARGET = clobber -lint := TARGET = lint - -.KEEP_STATE: - -all: $(SUBDIRS) - -clean clobber lint: $(SUBDIRS) - -install: $(SUBDIRS) - -$(RM) $(ROOTUSRSBINPROG) - -$(LN) $(ISAEXEC) $(ROOTUSRSBINPROG) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) CW_NO_SHADOW=true __GNUC= $(TARGET) - -FRC: - -include ../Makefile.targ diff --git a/usr/src/cmd/bhyveconsole/bhyveconsole.c b/usr/src/cmd/bhyveconsole/bhyveconsole.c deleted file mode 100644 index 7f237a72f6..0000000000 --- a/usr/src/cmd/bhyveconsole/bhyveconsole.c +++ /dev/null @@ -1,360 +0,0 @@ -/* - * This file and its contents are supplied under the terms of the - * Common Development and Distribution License ("CDDL"), version 1.0. - * You may only use this file in accordance with the terms of version - * 1.0 of the CDDL. - * - * A full copy of the text of the CDDL should have accompanied this - * source. A copy of the CDDL is also available via the Internet at - * http://www.illumos.org/license/CDDL. - */ - -/* - * Copyright 2013 Pluribus Networks Inc. - */ - -#include <sys/param.h> -#include <sys/signal.h> -#include <sys/socket.h> -#include <sys/termios.h> -#include <assert.h> -#include <errno.h> -#include <libgen.h> -#include <stdarg.h> -#include <stdio.h> -#include <strings.h> -#include <unistd.h> - -#include <bhyve.h> - -static int masterfd; -static struct termios save_termios; -static int save_fd; - -static int nocmdchar = 0; -static char cmdchar = '~'; - -static const char *pname; - -#define BCONS_BUFSIZ 8192 - -static void -usage(void) -{ - (void) fprintf(stderr, "usage: %s vmname\n", pname); - exit(2); -} - -static void -bcons_error(const char *fmt, ...) -{ - va_list alist; - - (void) fprintf(stderr, "%s: ", pname); - va_start(alist, fmt); - (void) vfprintf(stderr, fmt, alist); - va_end(alist); - (void) fprintf(stderr, "\n"); -} - -static void -bcons_perror(const char *str) -{ - const char *estr; - - if ((estr = strerror(errno)) != NULL) - (void) fprintf(stderr, "%s: %s: %s\n", pname, str, estr); - else - (void) fprintf(stderr, "%s: %s: errno %d\n", pname, str, errno); -} - -/* - * Create the unix domain socket and call bhyve; handshake - * with it to determine whether it will allow us to connect. - */ -static int -get_console(const char *vmname) -{ - int sockfd = -1; - struct sockaddr_un servaddr; - char clientid[MAXPATHLEN]; - char handshake[MAXPATHLEN], c; - int msglen; - int i = 0, err = 0; - - if ((sockfd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) { - bcons_perror("could not create socket"); - return (-1); - } - - bzero(&servaddr, sizeof (servaddr)); - servaddr.sun_family = AF_UNIX; - (void) snprintf(servaddr.sun_path, sizeof (servaddr.sun_path), - BHYVE_CONS_SOCKPATH, vmname); - - if (connect(sockfd, (struct sockaddr *)&servaddr, - sizeof (servaddr)) == -1) { - bcons_perror("Could not connect to console server"); - goto bad; - } - masterfd = sockfd; - - msglen = snprintf(clientid, sizeof (clientid), "IDENT %lu\n", - getpid()); - assert(msglen > 0 && msglen < sizeof (clientid)); - - if (write(masterfd, clientid, msglen) != msglen) { - bcons_error("protocol error"); - goto bad; - } - - /* - * Take care not to accumulate more than our fill, and leave room for - * the NUL at the end. - */ - while ((err = read(masterfd, &c, 1)) == 1) { - if (i >= (sizeof (handshake) - 1)) - break; - if (c == '\n') - break; - handshake[i] = c; - i++; - } - handshake[i] = '\0'; - - /* - * If something went wrong during the handshake we bail; perhaps - * the server died off. - */ - if (err == -1) { - bcons_perror("Could not connect to console server"); - goto bad; - } - - if (strncmp(handshake, "OK", sizeof (handshake)) == 0) - return (0); - - bcons_error("Console is already in use by process ID %s.", - handshake); -bad: - (void) close(sockfd); - masterfd = -1; - return (-1); -} - -/* - * Place terminal into raw mode. - */ -static int -set_tty_rawmode(int fd) -{ - struct termios term; - if (tcgetattr(fd, &term) < 0) { - bcons_perror("failed to get user terminal settings"); - return (-1); - } - - /* Stash for later, so we can revert back to previous mode */ - save_termios = term; - save_fd = fd; - - /* disable 8->7 bit strip, start/stop, enable any char to restart */ - term.c_iflag &= ~(ISTRIP|IXON|IXANY); - /* disable NL->CR, CR->NL, ignore CR, UPPER->lower */ - term.c_iflag &= ~(INLCR|ICRNL|IGNCR|IUCLC); - /* disable output post-processing */ - term.c_oflag &= ~OPOST; - /* disable canonical mode, signal chars, echo & extended functions */ - term.c_lflag &= ~(ICANON|ISIG|ECHO|IEXTEN); - - term.c_cc[VMIN] = 1; /* byte-at-a-time */ - term.c_cc[VTIME] = 0; - - if (tcsetattr(STDIN_FILENO, TCSAFLUSH, &term)) { - bcons_perror("failed to set user terminal to raw mode"); - return (-1); - } - - return (0); -} - -/* - * reset terminal settings for global environment - */ -static void -reset_tty(void) -{ - (void) tcsetattr(save_fd, TCSADRAIN, &save_termios); -} - -/* - * process_user_input watches the input stream for the escape sequence for - * 'quit' (by default, tilde-period). Because we might be fed just one - * keystroke at a time, state associated with the user input (are we at the - * beginning of the line? are we locally echoing the next character?) is - * maintained by beginning_of_line and local_echo across calls to the routine. - * - * This routine returns -1 when the 'quit' escape sequence has been issued, - * or an error is encountered and 0 otherwise. - */ -static int -process_user_input(int out_fd, int in_fd) -{ - static boolean_t beginning_of_line = B_TRUE; - static boolean_t local_echo = B_FALSE; - char ibuf[BCONS_BUFSIZ]; - int nbytes; - char *buf = ibuf; - char c; - - nbytes = read(in_fd, ibuf, sizeof (ibuf)); - if (nbytes == -1 && errno != EINTR) - return (-1); - - if (nbytes == -1) /* The read was interrupted. */ - return (0); - - for (c = *buf; nbytes > 0; c = *buf, --nbytes) { - buf++; - if (beginning_of_line && !nocmdchar) { - beginning_of_line = B_FALSE; - if (c == cmdchar) { - local_echo = B_TRUE; - continue; - } - } else if (local_echo) { - local_echo = B_FALSE; - if (c == '.') { - (void) write(STDOUT_FILENO, &cmdchar, 1); - (void) write(STDOUT_FILENO, &c, 1); - return (-1); - } - } - - (void) write(out_fd, &c, 1); - - beginning_of_line = (c == '\r' || c == '\n'); - } - - return (0); -} - -static int -process_output(int in_fd, int out_fd) -{ - int wrote = 0; - int cc; - char ibuf[BCONS_BUFSIZ]; - - cc = read(in_fd, ibuf, sizeof (ibuf)); - if (cc == -1 && errno != EINTR) - return (-1); - if (cc == 0) /* EOF */ - return (-1); - if (cc == -1) /* The read was interrupted. */ - return (0); - - do { - int len; - - len = write(out_fd, ibuf + wrote, cc - wrote); - if (len == -1 && errno != EINTR) - return (-1); - if (len != -1) - wrote += len; - } while (wrote < cc); - - return (0); -} - -/* - * This is the main I/O loop. - */ -static void -doio(void) -{ - struct pollfd pollfds[2]; - int res; - - /* read from vm and write to stdout */ - pollfds[0].fd = masterfd; - pollfds[0].events = POLLIN | POLLRDNORM | POLLRDBAND | POLLPRI; - - /* read from stdin and write to vm */ - pollfds[1].fd = STDIN_FILENO; - pollfds[1].events = pollfds[0].events; - - for (;;) { - pollfds[0].revents = pollfds[1].revents = 0; - - res = poll(pollfds, - sizeof (pollfds) / sizeof (struct pollfd), -1); - - if (res == -1 && errno != EINTR) { - bcons_perror("poll failed"); - /* we are hosed, close connection */ - break; - } - - /* event from master side stdout */ - if (pollfds[0].revents) { - if (pollfds[0].revents & - (POLLIN | POLLRDNORM | POLLRDBAND | POLLPRI)) { - if (process_output(masterfd, STDOUT_FILENO) - != 0) - break; - } else { - break; - } - } - - /* event from user stdin side */ - if (pollfds[1].revents) { - if (pollfds[1].revents & - (POLLIN | POLLRDNORM | POLLRDBAND | POLLPRI)) { - if (process_user_input(masterfd, STDIN_FILENO) - != 0) - break; - } else { - break; - } - } - } -} - -int -main(int argc, char **argv) -{ - char *vmname; - - pname = basename(argv[0]); - - if (argc == 2) { - vmname = argv[1]; - } else { - usage(); - } - - /* - * Make contact with bhyve - */ - if (get_console(vmname) == -1) - return (1); - - (void) printf("[Connected to vm '%s' console]\n", vmname); - - if (set_tty_rawmode(STDIN_FILENO) == -1) { - reset_tty(); - bcons_perror("failed to set stdin pty to raw mode"); - return (1); - } - - /* - * Run the I/O loop until we get disconnected. - */ - doio(); - reset_tty(); - (void) printf("\n[Connection to vm '%s' console closed]\n", vmname); - - return (0); -} diff --git a/usr/src/cmd/bhyveconsole/i386/Makefile b/usr/src/cmd/bhyveconsole/i386/Makefile deleted file mode 100644 index c4f317a9fa..0000000000 --- a/usr/src/cmd/bhyveconsole/i386/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2013 Pluribus Networks Inc. -# - -PROG= bhyveconsole - -OBJS= bhyveconsole.o - -SRCS= $(OBJS:%.o=../%.c) - -include ../../Makefile.cmd - -CFLAGS += $(CCVERBOSE) -LDLIBS += -lsocket - -.KEEP_STATE: - -%.o: ../%.c - $(COMPILE.c) $< - -all: $(PROG) - -$(PROG): $(OBJS) - $(LINK.c) $(OBJS) -o $@ $(LDLIBS) - $(POST_PROCESS) - -install: all $(ROOTUSRSBINPROG32) - -clean: - $(RM) $(OBJS) - -include ../../Makefile.targ diff --git a/usr/src/cmd/bhyvectl/Makefile.com b/usr/src/cmd/bhyvectl/Makefile.com deleted file mode 100644 index 03ca34792c..0000000000 --- a/usr/src/cmd/bhyvectl/Makefile.com +++ /dev/null @@ -1,48 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2013 Pluribus Networks Inc. -# - -PROG= bhyvectl - -SRCS = bhyvectl.c -OBJS = $(SRCS:.c=.o) - -include ../../Makefile.cmd - -.KEEP_STATE: - -CFLAGS += $(CCVERBOSE) -CPPFLAGS = -I$(COMPAT)/freebsd -I$(CONTRIB)/freebsd $(CPPFLAGS.master) \ - -I$(ROOT)/usr/platform/i86pc/include \ - -I$(SRC)/uts/i86pc/io/vmm -LDLIBS += -lvmmapi - -all: $(PROG) - -$(PROG): $(OBJS) - $(LINK.c) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS) - $(POST_PROCESS) - -install: all $(ROOTUSRSBINPROG) - -clean: - $(RM) $(OBJS) - -lint: lint_SRCS - -include ../../Makefile.targ - -%.o: ../%.c - $(COMPILE.c) -I$(SRC)/common $< - $(POST_PROCESS_O) diff --git a/usr/src/cmd/bhyvectl/amd64/Makefile b/usr/src/cmd/bhyvectl/amd64/Makefile deleted file mode 100644 index b602c50d05..0000000000 --- a/usr/src/cmd/bhyvectl/amd64/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2013 Pluribus Networks Inc. -# - -include ../Makefile.com -include ../../Makefile.cmd.64 - -CPPFLAGS += -I$(COMPAT)/freebsd/amd64 -I$(CONTRIB)/freebsd/amd64 - -install: all $(ROOTUSRSBINPROG64) diff --git a/usr/src/cmd/bhyveload-uefi/Makefile b/usr/src/cmd/bhyveload-uefi/Makefile deleted file mode 100644 index bbcbacf32f..0000000000 --- a/usr/src/cmd/bhyveload-uefi/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2013 Pluribus Networks Inc. -# - -PROG = bhyveload-uefi - -include ../Makefile.cmd - -$(BUILD64)SUBDIRS += $(MACH64) - -all := TARGET = all -install := TARGET = install -clean := TARGET = clean -clobber := TARGET = clobber -lint := TARGET = lint - -.KEEP_STATE: - -all clean clobber lint: $(SUBDIRS) - -install: $(SUBDIRS) - -$(RM) $(ROOTUSRSBINPROG) - -$(LN) $(ISAEXEC) $(ROOTUSRSBINPROG) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) CW_NO_SHADOW=true __GNUC= $(TARGET) - -FRC: - -include ../Makefile.targ diff --git a/usr/src/cmd/bhyveload-uefi/Makefile.com b/usr/src/cmd/bhyveload-uefi/Makefile.com deleted file mode 100644 index 7865cca8d8..0000000000 --- a/usr/src/cmd/bhyveload-uefi/Makefile.com +++ /dev/null @@ -1,52 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2013 Pluribus Networks Inc. -# - -PROG= bhyveload-uefi - -SRCS = ../bhyveload-uefi.c expand_number.c -OBJS = bhyveload-uefi.o expand_number.o - -include ../../Makefile.cmd - -.KEEP_STATE: - -CFLAGS += $(CCVERBOSE) -CPPFLAGS = -I$(COMPAT)/freebsd -I$(CONTRIB)/freebsd $(CPPFLAGS.master) \ - -I$(ROOT)/usr/platform/i86pc/include -LDLIBS += -lvmmapi - -all: $(PROG) - -$(PROG): $(OBJS) - $(LINK.c) -o $@ $(OBJS) $(LDFLAGS) $(LDLIBS) - $(POST_PROCESS) - -install: all $(ROOTUSRSBINPROG) - -clean: - $(RM) $(OBJS) - -lint: lint_SRCS - -include ../../Makefile.targ - -%.o: ../%.c - $(COMPILE.c) $< - $(POST_PROCESS_O) - -%.o: $(CONTRIB)/freebsd/lib/libutil/%.c - $(COMPILE.c) $< - $(POST_PROCESS_O) - diff --git a/usr/src/cmd/bhyveload-uefi/amd64/Makefile b/usr/src/cmd/bhyveload-uefi/amd64/Makefile deleted file mode 100644 index b602c50d05..0000000000 --- a/usr/src/cmd/bhyveload-uefi/amd64/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2013 Pluribus Networks Inc. -# - -include ../Makefile.com -include ../../Makefile.cmd.64 - -CPPFLAGS += -I$(COMPAT)/freebsd/amd64 -I$(CONTRIB)/freebsd/amd64 - -install: all $(ROOTUSRSBINPROG64) diff --git a/usr/src/cmd/bhyveload-uefi/bhyveload-uefi.c b/usr/src/cmd/bhyveload-uefi/bhyveload-uefi.c deleted file mode 100644 index 62a7ca5d0f..0000000000 --- a/usr/src/cmd/bhyveload-uefi/bhyveload-uefi.c +++ /dev/null @@ -1,190 +0,0 @@ -/* - * This file and its contents are supplied under the terms of the - * Common Development and Distribution License ("CDDL"), version 1.0. - * You may only use this file in accordance with the terms of version - * 1.0 of the CDDL. - * - * A full copy of the text of the CDDL should have accompanied this - * source. A copy of the CDDL is also available via the Internet at - * http://www.illumos.org/license/CDDL. - */ - -/* - * Copyright 2013 Pluribus Networks Inc. - */ - -#include <sys/types.h> - -#include <machine/vmm.h> - -#include <errno.h> -#include <err.h> -#include <fcntl.h> -#include <stdio.h> -#include <stdlib.h> -#include <sysexits.h> -#include <unistd.h> - -#include <vmmapi.h> - -#define KB (1024UL) -#define MB (1024 * 1024UL) -#define GB (1024 * 1024 * 1024UL) - -#define UEFI_ROM_ADDR 0xFFE00000 -#define UEFI_ROM_SIZE (2 * MB) -/* - * N.B. the UEFI code zeros the first page in memory so use the second. - */ -#define BHYVE_HOB_ADDR 0x00002000 -#define BHYVE_BO_HOB_ADDR 0x00002080 - -#define UEFI_ROM_PATH "/usr/share/bhyve/uefi-rom.bin" - -struct platform_info { - uint32_t ncpus; -}; - -/* - * Boot order code: - * 0 - EFI_CD_HD - * 1 - EFI_CD - * 2 - EFI_HD_CD - * 3 - EFI_HD - * 4 - EFI_NET - * 5 - EFI_NET_CD_HD - * 6 - EFI_HD_HD_CD - * 7 - LEGACY_CD_HD - * 8 - LEGACY_CD - * 9 - LEGACY_HD_CD - * 10 - LEGACY_HD - * 11 - EFI_SHELL - */ - -struct bootorder_info { - uint32_t guestbootorder; -}; - -static char *vmname, *progname; -static struct vmctx *ctx; - -static void -usage(void) -{ - printf("usage: %s " - "[-c vcpus] [-m mem-size] [-b bootorder]" - "<vmname>\n", progname); - exit(1); -} - -int -main(int argc, char** argv) -{ - int opt, error, fd; - int guest_ncpus; - int guest_bootorder = 0; - uint64_t mem_size; - char *membase, *rombase; - struct platform_info *pi; - struct bootorder_info *bi; - - progname = argv[0]; - - guest_ncpus = 1; - mem_size = 256 * MB; - - while ((opt = getopt(argc, argv, "c:m:b:")) != -1) { - switch (opt) { - case 'c': - guest_ncpus = atoi(optarg); - break; - case 'm': - error = vm_parse_memsize(optarg, &mem_size); - if (error != 0 || mem_size == 0) - errx(EX_USAGE, "Invalid memsize '%s'", optarg); - break; - case 'b': - guest_bootorder = atoi(optarg); - if (guest_bootorder < 0 || guest_bootorder > 11) { - errx(EX_USAGE, "Invalid bootoption: %d\n" - "\tBoot order code:\n" - "\t0 - EFI_CD_HD\n" - "\t1 - EFI_CD\n" - "\t2 - EFI_HD_CD\n" - "\t3 - EFI_HD\n" - "\t4 - EFI_NET\n" - "\t5 - EFI_NET_CD_HD\n" - "\t6 - EFI_HD_HD_CD\n" - "\t7 - LEGACY_CD_HD\n" - "\t8 - LEGACY_CD\n" - "\t9 - LEGACY_HD_CD\n" - "\t10 - LEGACY_HD\n" - "\t11 - EFI_SHELL\n", guest_bootorder); - exit(1); - } - break; - case '?': - usage(); - } - } - - argc -= optind; - argv += optind; - - if (argc != 1) - usage(); - - vmname = argv[0]; - error = vm_create(vmname); - if (error != 0 && errno != EEXIST) { - perror("vm_create"); - exit(1); - - } - - ctx = vm_open(vmname); - if (ctx == NULL) { - perror("vm_open"); - exit(1); - } - - error = vm_set_capability(ctx, 0, VM_CAP_UNRESTRICTED_GUEST, 1); - if (error) { - perror("vm_set_capability(VM_CAP_UNRESTRICTED_GUEST)"); - } - - error = vm_setup_memory(ctx, mem_size, VM_MMAP_ALL); - if (error) { - perror("vm_setup_memory"); - exit(1); - } - membase = vm_map_gpa(ctx, 0, 8 * KB); - - error = vm_setup_rom(ctx, UEFI_ROM_ADDR, UEFI_ROM_SIZE); - if (error) { - perror("vm_setup_rom"); - exit(1); - } - rombase = vm_map_gpa(ctx, UEFI_ROM_ADDR, UEFI_ROM_SIZE); - - fd = open(UEFI_ROM_PATH, O_RDONLY); - if (fd == -1) { - perror("open"); - exit(1); - } - read(fd, rombase, UEFI_ROM_SIZE); - close(fd); - - pi = (struct platform_info *)(membase + BHYVE_HOB_ADDR); - pi->ncpus = guest_ncpus; - bi = (struct bootorder_info *)(membase + BHYVE_BO_HOB_ADDR); - bi->guestbootorder = guest_bootorder; - - error = vcpu_reset(ctx, 0); - if (error) { - perror("vcpu_reset"); - exit(1); - } - - return (0); -} diff --git a/usr/src/cmd/bhyveload-uefi/i386/Makefile b/usr/src/cmd/bhyveload-uefi/i386/Makefile deleted file mode 100644 index f5b7bb6915..0000000000 --- a/usr/src/cmd/bhyveload-uefi/i386/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2013 Pluribus Networks Inc. -# - -include ../Makefile.com - -install: all $(ROOTUSRSBINPROG32) diff --git a/usr/src/cmd/mdb/intel/amd64/vmm/Makefile b/usr/src/cmd/mdb/intel/amd64/vmm/Makefile deleted file mode 100644 index bf9219b435..0000000000 --- a/usr/src/cmd/mdb/intel/amd64/vmm/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2014 Pluribus Networks Inc. -# - -MAKEVARS = CW_NO_SHADOW=true __GNUC= - -include $(SRC)/Makefile.master -$(BUILD64)SUBDIRS += $(MACH64) -include ../../../Makefile.subdirs diff --git a/usr/src/cmd/mdb/intel/amd64/vmm/amd64/Makefile b/usr/src/cmd/mdb/intel/amd64/vmm/amd64/Makefile deleted file mode 100644 index 49ca0c5eb3..0000000000 --- a/usr/src/cmd/mdb/intel/amd64/vmm/amd64/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2013 Pluribus Networks Inc. -# - -MODULE = vmm.so -MDBTGT = kvm - -MODSRCS = vmm.c - -include ../../../../../Makefile.cmd -include ../../../../../Makefile.cmd.64 -include ../../../Makefile.amd64 -include ../../../../Makefile.module - -CPPFLAGS = -D_KERNEL -D_MACHDEP -CPPFLAGS += -I$(COMPAT)/freebsd -I$(COMPAT)/freebsd/amd64 -CPPFLAGS += -I$(CONTRIB)/freebsd -I$(CONTRIB)/freebsd/amd64 -CPPFLAGS += -I$(SRC)/uts/common -I$(SRC)/uts/i86pc -CPPFLAGS += -I$(SRC)/cmd/mdb/common - -CPPFLAGS += -_cc=-xdryrun diff --git a/usr/src/cmd/mdb/intel/amd64/vmm/vmm.c b/usr/src/cmd/mdb/intel/amd64/vmm/vmm.c deleted file mode 100644 index 9e29d8662a..0000000000 --- a/usr/src/cmd/mdb/intel/amd64/vmm/vmm.c +++ /dev/null @@ -1,238 +0,0 @@ -/* - * This file and its contents are supplied under the terms of the - * Common Development and Distribution License ("CDDL"), version 1.0. - * You may only use this file in accordance with the terms of version - * 1.0 of the CDDL. - * - * A full copy of the text of the CDDL should have accompanied this - * source. A copy of the CDDL is also available via the Internet at - * http://www.illumos.org/license/CDDL. - */ - -/* - * Copyright 2014 Pluribus Networks Inc. - */ - -#include <sys/param.h> - -#include <mdb/mdb_modapi.h> -#include <sys/cpuvar.h> -#include <sys/varargs.h> -#include <sys/vmm.h> -#include <sys/vmm_impl.h> - -/* - * VMM trace debug walker/dcmd code - */ - -/* - * Initialize the vmm_trace_dmsg_t walker by either using the given starting - * address, or reading the value of the kernel's vmm_debug_rbuf pointer. - * We also allocate a vmm_trace_dmsg_t for storage, and save this using the - * walk_data pointer. - */ -static int -vmm_dmsg_walk_i(mdb_walk_state_t *wsp) -{ - uintptr_t rbuf_addr; - vmm_trace_rbuf_t rbuf; - - if (wsp->walk_addr == NULL) { - if (mdb_readvar(&rbuf_addr, "vmm_debug_rbuf") == -1) { - mdb_warn("failed to read 'vmm_debug_rbuf'"); - return (WALK_ERR); - } - - if (mdb_vread(&rbuf, sizeof (vmm_trace_rbuf_t), rbuf_addr) - == -1) { - mdb_warn("failed to read vmm_trace_rbuf_t at %p", - rbuf_addr); - return (WALK_ERR); - } - - wsp->walk_addr = (uintptr_t)(vmm_trace_dmsg_t *)rbuf.dmsgh; - } - - /* - * Save ptr to head of ring buffer to prevent looping. - */ - wsp->walk_arg = (void *)wsp->walk_addr; - wsp->walk_data = mdb_alloc(sizeof (vmm_trace_dmsg_t), UM_SLEEP); - return (WALK_NEXT); -} - -/* - * At each step, read a vmm_trace_dmsg_t into our private storage, and then - * invoke the callback function. We terminate when we reach a NULL next - * pointer. - */ -static int -vmm_dmsg_walk_s(mdb_walk_state_t *wsp) -{ - int status; - - if (wsp->walk_addr == NULL) - return (WALK_DONE); - - if (mdb_vread(wsp->walk_data, sizeof (vmm_trace_dmsg_t), - wsp->walk_addr) == -1) { - mdb_warn("failed to read vmm_trace_dmsg_t at %p", - wsp->walk_addr); - return (WALK_ERR); - } - - status = wsp->walk_callback(wsp->walk_addr, wsp->walk_data, - wsp->walk_cbdata); - - wsp->walk_addr = - (uintptr_t)(((vmm_trace_dmsg_t *)wsp->walk_data)->next); - - /* - * If we've looped then we're done. - */ - if (wsp->walk_addr == (uintptr_t)wsp->walk_arg) - wsp->walk_addr = NULL; - - return (status); -} - -/* - * The walker's fini function is invoked at the end of each walk. Since we - * dynamically allocated a vmm_trace_dmsg_t in vmm_dmsg_walk_i, we must - * free it now. - */ -static void -vmm_dmsg_walk_f(mdb_walk_state_t *wsp) -{ - mdb_free(wsp->walk_data, sizeof (vmm_trace_dmsg_t)); -} - -/* - * This routine is used by the vmm_dmsg_dump dcmd to dump content of - * VMM trace ring buffer. - */ -int -vmm_dmsg_dump(vmm_trace_dmsg_t *addr, int print_pathname, uint_t *printed) -{ - vmm_trace_dmsg_t dmsg, *dmsgh = addr; - char pathname[MAXPATHLEN]; - char merge[1024]; - - while (addr != NULL) { - if (mdb_vread(&dmsg, sizeof (dmsg), (uintptr_t)addr) != - sizeof (dmsg)) { - mdb_warn("failed to read message pointer in kernel"); - return (DCMD_ERR); - } - - (void) mdb_snprintf(merge, sizeof (merge), - "[%Y:%03d:%03d:%03d] : %s", - dmsg.timestamp.tv_sec, - (int)dmsg.timestamp.tv_nsec/1000000, - (int)(dmsg.timestamp.tv_nsec/1000)%1000, - (int)dmsg.timestamp.tv_nsec%1000, - dmsg.buf); - - mdb_printf("%s", merge); - - if (printed != NULL) { - (*printed)++; - } - - if (((addr = dmsg.next) == NULL) || (dmsg.next == dmsgh)) { - break; - } - } - - return (DCMD_OK); -} - -/* - * 1. Process flag passed to vmm_dmsg_dump dcmd. - * 2. Obtain VMM trace ring buffer pointer. - * 3. Pass VMM trace ring buffer pointer to vmm_dmsg_dump() - * to dump content of VMM trace ring buffer. - */ -int -vmm_rbuf_dump(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) -{ - vmm_trace_rbuf_t rbuf; - uint_t printed = 0; /* have we printed anything? */ - int print_pathname = FALSE; - int rval = DCMD_OK; - - if (argc > 1) { - return (DCMD_USAGE); - } - - if (mdb_getopts(argc, argv, - 'a', MDB_OPT_SETBITS, TRUE, &print_pathname) != argc) { - return (DCMD_USAGE); - } - - /* - * If ring buffer address not provided try to obtain - * it using vmm_debug_rbuf global. - */ - if ((addr == NULL) || !(flags & DCMD_ADDRSPEC)) { - if (mdb_readvar(&addr, "vmm_debug_rbuf") == -1) { - mdb_warn("Failed to read 'vmm_debug_rbuf'."); - return (DCMD_ERR); - } - } - - if (mdb_vread(&rbuf, sizeof (rbuf), addr) != sizeof (rbuf)) { - mdb_warn("Failed to read ring buffer in kernel."); - return (DCMD_ERR); - } - - if (rbuf.dmsgh == NULL) { - mdb_printf("The vmm trace ring buffer is empty.\n"); - return (DCMD_OK); - } - - rval = vmm_dmsg_dump((vmm_trace_dmsg_t *)rbuf.dmsgh, - print_pathname, &printed); - - if (rval != DCMD_OK) { - return (rval); - } - - if (printed == 0) { - mdb_warn("Failed to read vmm trace ring buffer."); - return (DCMD_ERR); - } - - return (rval); -} - -/* - * MDB module linkage information: - * - * We declare a list of structures describing our dcmds, a list of structures - * describing our walkers, and a function named _mdb_init to return a pointer - * to our module information. - */ - -static const mdb_dcmd_t dcmds[] = { - { "vmm_dmsg_dump", "[-a]", "Dump vmm trace debug messages", - vmm_rbuf_dump }, - { NULL } -}; - -static const mdb_walker_t walkers[] = { - { "vmm_dmsg", - "walk ring buffer containing vmm trace debug messages", - vmm_dmsg_walk_i, vmm_dmsg_walk_s, vmm_dmsg_walk_f }, - { NULL } -}; - -static const mdb_modinfo_t modinfo = { - MDB_API_VERSION, dcmds, walkers -}; - -const mdb_modinfo_t * -_mdb_init(void) -{ - return (&modinfo); -} diff --git a/usr/src/cmd/mdb/sparc/modules/genunix/gcore_isadep.c b/usr/src/cmd/mdb/sparc/modules/genunix/gcore_isadep.c index 50f60516a1..2839f47219 100644 --- a/usr/src/cmd/mdb/sparc/modules/genunix/gcore_isadep.c +++ b/usr/src/cmd/mdb/sparc/modules/genunix/gcore_isadep.c @@ -17,8 +17,6 @@ * implemented. */ -#ifndef _KMDB - #include <mdb/mdb_gcore.h> /* ARGSUSED */ @@ -54,5 +52,3 @@ gcore_prgetrvals(mdb_klwp_t *lwp, long *rval1, long *rval2) { return (0); } - -#endif /* _KMDB */ diff --git a/usr/src/cmd/mdb/sparc/v9/genunix/Makefile b/usr/src/cmd/mdb/sparc/v9/genunix/Makefile index 00dadda34b..8bfb17c607 100644 --- a/usr/src/cmd/mdb/sparc/v9/genunix/Makefile +++ b/usr/src/cmd/mdb/sparc/v9/genunix/Makefile @@ -38,6 +38,7 @@ KMODSRCS = \ MODSRCS = \ $(COMMONSRCS) \ + gcore.c \ typegraph.c # diff --git a/usr/src/head/bhyve.h b/usr/src/head/bhyve.h deleted file mode 100644 index 8c79ca1ccc..0000000000 --- a/usr/src/head/bhyve.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * COPYRIGHT 2013 Pluribus Networks Inc. - * - * All rights reserved. This copyright notice is Copyright Management - * Information under 17 USC 1202 and is included to protect this work and - * deter copyright infringement. Removal or alteration of this Copyright - * Management Information without the express written permission from - * Pluribus Networks Inc is prohibited, and any such unauthorized removal - * or alteration will be a violation of federal law. - */ -#ifndef _BHYVE_H -#define _BHYVE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define BHYVE_TMPDIR "/var/run/bhyve" -#define BHYVE_CONS_SOCKPATH BHYVE_TMPDIR "/%s.console_sock" - -#ifdef __cplusplus -} -#endif - -#endif /* _BHYVE_H */ diff --git a/usr/src/man/man1m/picld.1m b/usr/src/man/man1m/picld.1m index debb8bf9af..d233fb7444 100644 --- a/usr/src/man/man1m/picld.1m +++ b/usr/src/man/man1m/picld.1m @@ -3,18 +3,15 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH PICLD 1M "Aug 10, 2004" +.TH PICLD 1M "May 16, 2020" .SH NAME picld \- PICL daemon .SH SYNOPSIS -.LP .nf \fB/usr/lib/picl/picld\fR .fi .SH DESCRIPTION -.sp -.LP The Platform Information and Control Library (\fBPICL\fR) provides a mechanism to publish platform-specific information for clients to access in a platform-independent way. \fBpicld\fR maintains and controls access to the @@ -29,8 +26,6 @@ information. After the plug-in modules are initialized, the daemon opens the \fBPICL\fR daemon door to service client requests to access information in the \fBPICL\fR tree. .SS "PICL Tree" -.sp -.LP The \fBPICL\fR tree is the repository of all the nodes and properties created by the plug-in modules to represent the platform configuration. Every node in the \fBPICL\fR tree is an instance of a well-defined \fBPICL\fR class. The name @@ -42,15 +37,13 @@ nodes in the \fBPICL\fR tree have well-known names. For example, the name of the root node of the \fBPICL\fR tree is \fB/\fR and the name of the root node of the sub-tree containing platform device nodes is \fBplatform\fR. .SS "PICL plug-in Modules" -.sp -.LP The \fBPICL\fR plug-in modules are shared objects that publish platform-specific data in the \fBPICL\fR tree. They are located in well-known directories so that the daemon can locate and load them. .sp .LP Plug-in modules are located in one of the following plug-in directories -depending on the plaform-specific nature of the data that they collect and +depending on the platform-specific nature of the data that they collect and publish: .sp .in +2 @@ -92,11 +85,8 @@ environmental information in the \fBPICL\fR tree so clients can access them. Clients use the \fBlibpicl\fR(3PICL) interface to send requests to \fBpicld\fR for accessing the \fBPICL\fR tree. .SH EXIT STATUS -.sp -.LP \fBpicld\fR does not return an exit status. .SH FILES -.sp .ne 2 .na \fB\fB/var/run/picld_door\fR\fR @@ -115,14 +105,10 @@ for accessing the \fBPICL\fR tree. .RE .SH SEE ALSO -.sp -.LP \fBsvcs\fR(1), \fBsvcadm\fR(1M), \fBdlopen\fR(3C), \fBlibpicl\fR(3PICL), \fBlibpicltree\fR(3PICLTREE), \fBpicld_log\fR(3PICLTREE), \fBpicld_plugin_register\fR(3PICLTREE), \fBattributes\fR(5), \fBsmf\fR(5) .SH NOTES -.sp -.LP The \fBpicld\fR service is managed by the service management facility, \fBsmf\fR(5), under the service identifier: .sp diff --git a/usr/src/man/man3ext/efi_alloc_and_init.3ext b/usr/src/man/man3ext/efi_alloc_and_init.3ext index bd7bb22af6..ad4c21a543 100644 --- a/usr/src/man/man3ext/efi_alloc_and_init.3ext +++ b/usr/src/man/man3ext/efi_alloc_and_init.3ext @@ -4,7 +4,7 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH EFI_ALLOC_AND_INIT 3EXT "November 20, 2019" +.TH EFI_ALLOC_AND_INIT 3EXT "May 16, 2020" .SH NAME efi_alloc_and_init, efi_alloc_and_read, efi_free, efi_write, efi_use_whole_disk, efi_reserved_sectors \- manipulate a disk's EFI Partition Table @@ -100,7 +100,7 @@ struct dk_part efi_parts[]; /* array of partitions */ .SS "Protective Master Boot Record" When a disk receives an EFI label, a protective MBR (\fBPMBR\fR) is also -written containing a single partiton of type \fBEEh\fR and spanning the +written containing a single partition of type \fBEEh\fR and spanning the entire disk (up to the limit of what can be represented in an MBR). By default that partition is placed in slot 0 of the PMBR and not marked as active. Some BIOS implementations contain bugs that require the entry to be diff --git a/usr/src/man/man3picl/picl_get_propinfo.3picl b/usr/src/man/man3picl/picl_get_propinfo.3picl index 1581d57e5a..ddf18cbb4b 100644 --- a/usr/src/man/man3picl/picl_get_propinfo.3picl +++ b/usr/src/man/man3picl/picl_get_propinfo.3picl @@ -3,11 +3,10 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH PICL_GET_PROPINFO 3PICL "Mar 28, 2000" +.TH PICL_GET_PROPINFO 3PICL "May 16, 2020" .SH NAME picl_get_propinfo \- get the information about a property .SH SYNOPSIS -.LP .nf \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lpicl\fR [ \fIlibrary\fR... ] #include <picl.h> @@ -17,8 +16,6 @@ picl_get_propinfo \- get the information about a property .fi .SH DESCRIPTION -.sp -.LP The \fBpicl_get_propinfo()\fR function gets the information about the property specified by handle \fIproph\fR and copies it into the location specified by \fIpinfo\fR. The property information includes the property type, access mode, @@ -29,8 +26,6 @@ page. The maximum size of a property value is specified by \fBPICL_PROPSIZE_MAX\fR. It is currently set to 512KB. .SH RETURN VALUES -.sp -.LP Upon successful completion, \fB0\fR is returned. On failure, a non-negative integer is returned to indicate an error. .sp @@ -44,7 +39,6 @@ This error may be returned for a previously valid handle if the daemon was brought down and restarted. When this occurs a client must revalidate any saved handles. .SH ERRORS -.sp .ne 2 .na \fB\fBPICL_NOTINITIALIZED\fR\fR @@ -86,7 +80,7 @@ Invalid handle specified \fB\fBPICL_STALEHANDLE\fR\fR .ad .RS 23n -Stale handle specifie +Stale handle specified .RE .sp @@ -99,8 +93,6 @@ General system failure .RE .SH ATTRIBUTES -.sp -.LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -115,7 +107,5 @@ MT-Level MT-Safe .TE .SH SEE ALSO -.sp -.LP \fBlibpicl\fR(3PICL), \fBpicl_get_propval\fR(3PICL), \fBpicl_get_propval_by_name\fR(3PICL), \fBattributes\fR(5) diff --git a/usr/src/man/man3picltree/libpicltree.3picltree b/usr/src/man/man3picltree/libpicltree.3picltree index 2651d0d63d..3732c1a259 100644 --- a/usr/src/man/man3picltree/libpicltree.3picltree +++ b/usr/src/man/man3picltree/libpicltree.3picltree @@ -3,19 +3,16 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH LIBPICLTREE 3PICLTREE "Mar 1, 2004" +.TH LIBPICLTREE 3PICLTREE "May 16, 2020" .SH NAME libpicltree \- PTree and Plug-in Registration interface library .SH SYNOPSIS -.LP .nf \fBcc\fR [\fIflag \&.\|.\|.\fR] \fIfile \fR\&.\|.\|. \fB-lpicltree\fR [\fIlibrary \&.\|.\|.\fR] #include <picltree.h> .fi .SH DESCRIPTION -.sp -.LP The PTree interface is the set of functions and data structures to access and manipulate the PICL tree. The daemon and the plug-in modules use the PTree interface. @@ -53,8 +50,6 @@ properties. The maximum size of a property value cannot exceed \fBPICL_PROPSIZE_MAX\fR. It is currently set to 512KB. .SS "Volatile Properties" -.sp -.LP In addition to \fBPICL_READ\fR and \fBPICL_WRITE\fR property access modes, the plug-in modules specify whether a property is volatile or not by setting the bit \fBPICL_VOLATILE\fR. @@ -142,11 +137,9 @@ the maximum possible size of the value. The maximum size of the value cannot exceed \fBPICL_PROPSIZE_MAX\fR. This allows a client to allocate a sufficiently large buffer before retrieving a volatile property's value .SS "Plug-in Modules" -.sp -.LP Plug-in modules are shared objects that are located in well-known directories -for the daemon to locate and load them. Plug-in module's are located in the one -of the following plug-in directories depending on the plaform-specific nature +for the daemon to locate and load them. Plug-in modules are located in the one +of the following plug-in directories depending on the platform-specific nature of the data they collect and publish. .sp .in +2 @@ -171,8 +164,6 @@ registration. The plug-in modules may use the \fBpicld_log\fR(3PICLTREE) function to log their messages to the system log file. .SH ATTRIBUTES -.sp -.LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -187,7 +178,5 @@ MT-Level MT-Safe .TE .SH SEE ALSO -.sp -.LP \fBlibpicl\fR(3PICL), \fBlibpicltree\fR(3LIB), \fBpicld_log\fR(3PICLTREE), \fBpicld_plugin_register\fR(3PICLTREE), \fBattributes\fR(5) diff --git a/usr/src/man/man3pool/pool_get_property.3pool b/usr/src/man/man3pool/pool_get_property.3pool index 410c40ded2..39ac2fb084 100644 --- a/usr/src/man/man3pool/pool_get_property.3pool +++ b/usr/src/man/man3pool/pool_get_property.3pool @@ -3,12 +3,11 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH POOL_GET_PROPERTY 3POOL "Sep 23, 2003" +.TH POOL_GET_PROPERTY 3POOL "May 16, 2020" .SH NAME pool_get_property, pool_put_property, pool_rm_property, pool_walk_properties \- resource pool element property manipulation .SH SYNOPSIS -.LP .nf cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-lpool\fR [ \fIlibrary\fR\&.\|.\|. ] #include <pool.h> @@ -38,8 +37,6 @@ cc [ \fIflag\fR\&.\|.\|. ] \fIfile\fR\&.\|.\|. \fB-lpool\fR [ \fIlibrary\fR\&.\| .fi .SH DESCRIPTION -.sp -.LP The various pool types are converted to the common pool element type (\fBpool_elem_t\fR) before property manipulation. A \fBpool_value_t\fR is an opaque type that contains a property value of one of the following types: @@ -110,7 +107,7 @@ error. .LP The \fBpool_rm_property()\fR function attempts to remove the named property from the element. If the property does not exist or is not removable, -1 is -returned and \fBpool_error\fR(3POOL) reporst an error of \fBPOE_PUTPROP\fR. +returned and \fBpool_error\fR(3POOL) reports an error of \fBPOE_PUTPROP\fR. .sp .LP The \fBpool_walk_properties()\fR function invokes \fIcallback\fR on all @@ -123,8 +120,6 @@ A number of special properties are reserved for internal use and cannot be set or removed. Attempting to do so will fail. These properties are documented on the \fBlibpool\fR(3LIB) manual page. .SH RETURN VALUES -.sp -.LP Upon successful completion, \fBpool_get_property()\fR returns the type of the property. Otherwise it returns \fBPOC_INVAL\fR and \fBpool_error()\fR returns the pool-specific error value. @@ -134,8 +129,6 @@ Upon successful completion, \fBpool_put_property()\fR, \fBpool_rm_property()\fR, and \fBpool_walk_properties()\fR return 0. Otherwise they return \(mi1 and \fBpool_error()\fR returns the pool-specific error value. .SH ERRORS -.sp -.LP The \fBpool_get_property()\fR function will fail if: .sp .ne 2 @@ -253,8 +246,6 @@ A system error has occurred. Check the system error code for more details. .RE .SH ATTRIBUTES -.sp -.LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -273,6 +264,4 @@ MT-Level Safe .TE .SH SEE ALSO -.sp -.LP \fBlibpool\fR(3LIB), \fBpool_error\fR(3POOL), \fBattributes\fR(5) diff --git a/usr/src/man/man3proc/Pclearsig.3proc b/usr/src/man/man3proc/Pclearsig.3proc index 23f81df918..116e23c391 100644 --- a/usr/src/man/man3proc/Pclearsig.3proc +++ b/usr/src/man/man3proc/Pclearsig.3proc @@ -11,7 +11,7 @@ .\" .\" Copyright 2015 Joyent, Inc. .\" -.Dd May 11, 2016 +.Dd May 16, 2020 .Dt PCLEARSIG 3PROC .Os .Sh NAME @@ -50,7 +50,7 @@ The function is identical to the .Fn Pclearsig function, except rather than operating on the process and its -representive thread, it instead operates on the thread handle +representative thread, it instead operates on the thread handle .Fa L . .Pp The diff --git a/usr/src/man/man4/ippool.4 b/usr/src/man/man4/ippool.4 index d70b5cad9a..1b6586a4b0 100644 --- a/usr/src/man/man4/ippool.4 +++ b/usr/src/man/man4/ippool.4 @@ -1,10 +1,10 @@ '\" te .\" To view license terms, attribution, and copyright for IP Filter, the -.\" default path is /usr/lib/ipf/IPFILTER.LICENCE. If the Illumos operating +.\" default path is /usr/lib/ipf/IPFILTER.LICENCE. If the illumos operating .\" environment has been installed anywhere other than the default, modify the .\" given path to access the file at the installed location. .\" Portions Copyright (c) 2015, Joyent, Inc. -.TH IPPOOL 4 "April 9, 2016" +.TH IPPOOL 4 "May 16, 2020" .SH NAME ippool, ippool.conf \- IP Pool file format .SH DESCRIPTION @@ -62,7 +62,6 @@ of a mixture of netmask sizes, from 0 to 32. .PP At this point in time, only IPv4 addressing is supported. .SH OVERVIEW -.PP The IP pool configuration file provides for defining two different mechanisms for improving speed in matching IP addresses with rules. The first, @@ -86,7 +85,6 @@ or respectively, for determining which filter group to jump to next for continuation of filter packet processing. .SH POOL TYPES -.PP Two storage formats are provided: hash tables and tree structure. The hash table is intended for use with objects all containing the same netmask or a few different sized netmasks of non-overlapping address space and the tree @@ -96,8 +94,7 @@ to use the tree data storage type with .B group-map configuration entries. .SH POOL ROLES -.PP -When a pool is defined in the configruation file, it must have an associated +When a pool is defined in the configuration file, it must have an associated role. At present the only supported role is .B ipf. Future development will see further expansion of their use by other sections diff --git a/usr/src/man/man4/krb5.conf.4 b/usr/src/man/man4/krb5.conf.4 index c97d2a7eae..4d18ab5362 100644 --- a/usr/src/man/man4/krb5.conf.4 +++ b/usr/src/man/man4/krb5.conf.4 @@ -3,17 +3,15 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH KRB5.CONF 4 "Nov 26, 2017" +.TH KRB5.CONF 4 "May 16, 2020" .SH NAME krb5.conf \- Kerberos configuration file .SH SYNOPSIS -.LP .nf /etc/krb5/krb5.conf .fi .SH DESCRIPTION -.LP The \fBkrb5.conf\fR file contains Kerberos configuration information, including the locations of \fBKDC\fRs and administration daemons for the Kerberos realms of interest, defaults for the current realm and for Kerberos applications, and @@ -141,7 +139,6 @@ For a Key Distribution Center (\fBKDC\fR), can contain the location of the .RE .SS "The \fB[libdefaults]\fR Section" -.LP The \fB[libdefaults]\fR section can contain any of the following relations: .sp .ne 2 @@ -346,7 +343,7 @@ above. Indicates whether DNS SRV records need to be used to locate the KDCs and the other servers for a realm, if they have not already been listed in the \fB[realms]\fR section. This option makes the machine vulnerable to a certain -type of DoS attack if somone spoofs the DNS records and does a redirect to +type of DoS attack if someone spoofs the DNS records and does a redirect to another server. This is, however, no worse than a DoS, since the bogus KDC is unable to decode anything sent (excepting the initial ticket request, which has no encrypted data). Also, anything the fake KDC sends out isl not trusted @@ -407,7 +404,6 @@ to make it a network-wide setting for all realms. .RE .SS "The \fB[appdefaults]\fR Section" -.LP This section contains subsections for Kerberos V5 applications, where \fIrelation-subsection\fR is the name of an application. Each subsection contains relations that define the default behaviors for that application. @@ -589,7 +585,6 @@ In the following example, \fBkinit\fR gets forwardable tickets by default and The application defaults specified here are overridden by those specified in the \fB[realms]\fR section. .SS "The \fB[realms]\fR Section" -.LP This section contains subsections for Kerberos realms, where \fIrelation-subsection\fR is the name of a realm. Each subsection contains relations that define the properties for that particular realm. The following @@ -869,7 +864,6 @@ parameters. Most often, you need to specify them only when using a non-Solaris-based Kerberos server. Otherwise, the change request is sent over \fBRPCSEC_GSS\fR to the Solaris Kerberos administration server. .SS "The \fB[domain_realm]\fR Section" -.LP This section provides a translation from a domain name or hostname to a Kerberos realm name. The \fIrelation\fR can be a host name, or a domain name, where domain names are indicated by a period (`\fB\&.\fR') prefix. @@ -902,7 +896,6 @@ default into the \fBFUBAR.ORG\fR realm. The entries for the hosts \fBmit.edu\fR and \fBfubar.org\fR. Without these entries, these hosts would be mapped into the Kerberos realms \fBEDU\fR and \fBORG\fR, respectively. .SS "The \fB[logging]\fR Section" -.LP This section indicates how Kerberos programs are to perform logging. There are two types of relations for this section: relations to specify how to log and a relation to specify how to rotate \fBkdc\fR log files. @@ -1111,7 +1104,6 @@ with a specified time interval of a day. .sp .SS "The \fB[capaths]\fR Section" -.LP In order to perform direct (non-hierarchical) cross-realm authentication, a database is needed to construct the authentication paths between the realms. This section defines that database. @@ -1215,7 +1207,6 @@ In the above examples, the ordering is not important, except when the same relation is used more than once. The client uses this to determine the path. (It is not important to the server, since the transited field is not sorted.) .SS "PKINIT-specific Options" -.LP The following are \fBpkinit-specific\fR options. These values can be specified in \fB[libdefaults]\fR as global defaults, or within a realm-specific subsection of \fB[libdefaults]\fR, or can be specified as realm-specific values @@ -1646,7 +1637,6 @@ been set to \fBFILE:/tmp/my_proxy.pem\fR. .RE .SS "The \fB[dbmodules]\fR Section" -.LP This section consists of relations that provide configuration information for plug-in modules. In particular, the relations describe the configuration for LDAP KDB plug-in. Use of the \fBdb2\fR KDB plug-in is the default behavior and @@ -1761,7 +1751,6 @@ Port number for SSL connection with directory server. The default is \fB389\fR. .RE .SH EXAMPLES -.LP \fBExample 1 \fRSample File .sp .LP @@ -1840,7 +1829,6 @@ a Kerberos configuration file when the KDC is using the LDAP KDB plug-in. .RE .SH ATTRIBUTES -.LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -1859,12 +1847,10 @@ Interface Stability See below. All of the keywords are Committed, except for the \fBPKINIT\fR keywords, which are Volatile. .SH SEE ALSO -.LP \fBkinit\fR(1), \fBrcp\fR(1), \fBrdist\fR(1), \fBrlogin\fR(1), \fBrsh\fR(1), \fBtelnet\fR(1), \fBsyslog\fR(3C), \fBattributes\fR(5), \fBkerberos\fR(5), \fBregex\fR(5) .SH NOTES -.LP If the \fBkrb5.conf\fR file is not formatted properly, the \fBtelnet\fR command fails. However, the \fBdtlogin\fR and \fBlogin\fR commands still succeed, even if the \fBkrb5.conf\fR file is specified as required for the commands. If this diff --git a/usr/src/man/man4/securenets.4 b/usr/src/man/man4/securenets.4 index 5500c61fa6..825b72f835 100644 --- a/usr/src/man/man4/securenets.4 +++ b/usr/src/man/man4/securenets.4 @@ -4,18 +4,15 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH SECURENETS 4 "Apr 26, 1999" +.TH SECURENETS 4 "May 16, 2020" .SH NAME securenets \- configuration file for NIS security .SH SYNOPSIS -.LP .nf \fB/var/yp/securenets\fR .fi .SH DESCRIPTION -.sp -.LP The \fB/var/yp/securenets\fR file defines the networks or hosts which are allowed access to information by the Network Information Service ("\fBNIS\fR"). .sp @@ -66,7 +63,6 @@ hosts 127.0.0.1 .sp .SH EXAMPLES -.LP \fBExample 1 \fRAccess for Individual Entries .sp .LP @@ -121,7 +117,7 @@ The entry for access to a class B network could be: .sp .LP -\fBExample 4 \fRAccess for an Invidual IPv6 Address +\fBExample 4 \fRAccess for an Individual IPv6 Address .sp .LP Similarly, to allow access for an individual IPv6 address: @@ -161,7 +157,6 @@ ffff:: fe80:: .sp .SH FILES -.sp .ne 2 .na \fB\fB/var/yp/securenets\fR\fR @@ -171,12 +166,8 @@ Configuration file for \fBNIS\fR security. .RE .SH SEE ALSO -.sp -.LP \fBypserv\fR(1M), \fBypstart\fR(1M), \fBypstop\fR(1M), \fBypxfrd\fR(1M) .SH NOTES -.sp -.LP The Network Information Service (NIS) was formerly known as Sun Yellow Pages (YP). The functionality of the two remains the same; only the name has changed. The name Yellow Pages is a registered trademark in the United Kingdom diff --git a/usr/src/man/man4/smb.4 b/usr/src/man/man4/smb.4 index c593a52178..b800c3a7b9 100644 --- a/usr/src/man/man4/smb.4 +++ b/usr/src/man/man4/smb.4 @@ -16,11 +16,10 @@ .\" fields enclosed by brackets "[]" replaced with your own identifying .\" information: Portions Copyright [yyyy] [name of copyright owner] .\" -.TH SMB 4 "Apr 23, 2015" +.TH SMB 4 "May 16, 2020" .SH NAME smb \- configuration properties for Solaris CIFS server .SH DESCRIPTION -.LP Behavior of the Solaris CIFS server is defined by property values that are stored in the Service Management Facility, \fBsmf\fR(5). .sp @@ -419,7 +418,7 @@ Controls whether "oplocks" may be granted by the SMB server. The term "oplock" is short for "opportunistic lock", which is the legacy name for cache delegations in SMB. By default, oplocks are enabled. -Note that if oplocks are disabled, file I/O perfrormance may be +Note that if oplocks are disabled, file I/O performance may be severely reduced. .RE @@ -549,7 +548,6 @@ set. .RE .SH ATTRIBUTES -.LP See the \fBattributes\fR(5) man page for descriptions of the following attributes: .sp @@ -565,6 +563,5 @@ Interface Stability Uncommitted .TE .SH SEE ALSO -.LP \fBsharectl\fR(1M), \fBsmbadm\fR(1M), \fBsmbd\fR(1M), \fBsmbstat\fR(1M), \fBattributes\fR(5), \fBsmf\fR(5) diff --git a/usr/src/man/man4/smhba.conf.4 b/usr/src/man/man4/smhba.conf.4 index 91ed33f378..a960c3526f 100644 --- a/usr/src/man/man4/smhba.conf.4 +++ b/usr/src/man/man4/smhba.conf.4 @@ -3,12 +3,10 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH SMHBA.CONF 4 "Sep 28, 2009" +.TH SMHBA.CONF 4 "May 16, 2020" .SH NAME smhba.conf \- configuration file for the SMHBAAPI library .SH DESCRIPTION -.sp -.LP The \fB/etc/smhba.conf\fR file is used to specify the Vendor-Specific Libraries that are installed on the system. This file is used by the Common Library to load the individual VSLs when \fBHBA_LoadLibrary\fR(3HBAAPI) is called. If @@ -49,7 +47,6 @@ is the absolute path to the shared object library file. .RE .SH EXAMPLES -.LP \fBExample 1 \fRContents of \fB/etc/smhba.conf\fR .sp .in +2 @@ -69,8 +66,6 @@ com.sun.sashba64 /usr/lib/64/libsun_sas.so.1 .in -2 .SH ATTRIBUTES -.sp -.LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -84,17 +79,13 @@ _ Interface Stability Committed _ Standard T{ -ANSI INCITS 428 Storage Management Host Bus Adapter Application Programming Ingerface(SM-HBA) +ANSI INCITS 428 Storage Management Host Bus Adapter Application Programming Interface(SM-HBA) T} .TE .SH SEE ALSO -.sp -.LP \fBHBA_LoadLibrary\fR(3HBAAPI), \fBlibSMHBAAPI\fR(3LIB), \fBattributes\fR(5) .SH NOTES -.sp -.LP The SMHBAAPI library is provided in both 32-and 64-bit versions, but only one configuration file is specified. As a result, both 32- and 64-bit VSL libraries must be specified within the same file. When using the 32-bit Common Library, diff --git a/usr/src/man/man4/tnf_kernel_probes.4 b/usr/src/man/man4/tnf_kernel_probes.4 index 7d5c3c1ee0..b7c84e1e41 100644 --- a/usr/src/man/man4/tnf_kernel_probes.4 +++ b/usr/src/man/man4/tnf_kernel_probes.4 @@ -3,12 +3,10 @@ .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] -.TH TNF_KERNEL_PROBES 4 "Nov 8, 1999" +.TH TNF_KERNEL_PROBES 4 "May 16, 2020" .SH NAME tnf_kernel_probes \- TNF kernel probes .SH DESCRIPTION -.sp -.LP The set of probes (trace instrumentation points) available in the standard kernel. The probes log trace data to a kernel trace buffer in Trace Normal Form (TNF). Kernel probes are controlled by \fBprex\fR(1). A snapshot of the @@ -22,7 +20,6 @@ from \fBprex\fR(1). A probe that is enabled for tracing generates a \fBTNF\fR record, called an \fIevent record\fR. An event record contains two common members and may contain other probe-specific data members. .SS "Common Members" -.sp .in +2 .nf \fBtnf_probe_event\fR \fItag\fR @@ -70,7 +67,6 @@ time of the event. .SS "Threads" .SS "\fBthread_create\fR" -.sp .in +2 .nf \fBtnf_kthread_id\fR \fItid\fR @@ -110,7 +106,6 @@ The kernel address of its start routine. .RE .SS "\fBthread_state\fR" -.sp .in +2 .nf \fBtnf_kthread_id\fR \fItid\fR @@ -181,16 +176,11 @@ is implicit in the system call entry and exit events. .RE .SS "thread_exit" -.sp -.LP Thread termination event for writing thread. This probe has no data members other than the common members. .SS "Scheduling" -.sp -.LP \fB\fR .SS "thread_queue" -.sp .in +2 .nf \fBtnf_kthread_id\fR \fItid\fR @@ -233,7 +223,6 @@ The current length of the cpu's dispatch queue. .SS "Blocking" .SS "\fBthread_block\fR" -.sp .in +2 .nf \fBtnf_opaque\fR \fIreason\fR @@ -266,7 +255,6 @@ stack at the time the thread blocks. .SS "System Calls" .SS "\fBsyscall_start\fR" -.sp .in +2 .nf \fBtnf_sysnum\fR \fIsysnum\fR @@ -287,7 +275,6 @@ microstate with this event. .RE .SS "\fBsyscall_end\fR" -.sp .in +2 .nf \fBtnf_long\fR \fIrval1\fR @@ -322,7 +309,6 @@ The error return. The writing thread implicitly enters the \fIuser\fR microstate with this event. .SS "Page Faults" .SS "\fBaddress_fault\fR" -.sp .in +2 .nf \fBtnf_opaque\fR \fIaddress\fR @@ -364,7 +350,6 @@ for these two members are defined in <\fBvm/seg_enum.h\fR>. .RE .SS "\fBmajor_fault\fR" -.sp .in +2 .nf \fBtnf_opaque\fR \fIvnode\fR @@ -379,7 +364,6 @@ Major page fault event. The faulting page is mapped to the file given by the virtual address is in the most recent \fBaddress_fault\fR event for the writing thread.) .SS "\fBanon_private\fR" -.sp .in +2 .nf \fBtnf_opaque\fR \fIaddress\fR @@ -399,7 +383,6 @@ The virtual address at which the new page is mapped. .RE .SS "\fBanon_zero\fR" -.sp .in +2 .nf \fBtnf_opaque\fR \fIaddress\fR @@ -419,7 +402,6 @@ The virtual address at which the new page is mapped. .RE .SS "\fBpage_unmap\fR" -.sp .in +2 .nf \fBtnf_opaque\fR \fIvnode\fR @@ -442,7 +424,6 @@ Identifies the file and offset of the page being unmapped. .SS "Pageins and Pageouts" .SS "\fBpagein\fR" -.sp .in +2 .nf \fBtnf_opaque\fR \fIvnode\fR @@ -460,7 +441,7 @@ Pagein start event. This event signals the initiation of pagein I/O. \fB\fIvnode\fRand\fIoffset\fR\fR .ad .RS 18n -Identifyies the file and offset to be paged in. +Identifies the file and offset to be paged in. .RE .sp @@ -473,7 +454,6 @@ Specifies the number of bytes to be paged in. .RE .SS "\fBpageout\fR" -.sp .in +2 .nf \fBtnf_opaque\fR \fIvnode\fR @@ -524,7 +504,6 @@ The number of pages reclaimed after being written out. .SS "Page Daemon (Page Stealer)" .SS "\fBpageout_scan_start\fR" -.sp .in +2 .nf \fBtnf_ulong\fR \fIpages_free\fR @@ -555,7 +534,6 @@ The number of pages desired free. .RE .SS "\fBpageout_scan_end\fR" -.sp .in +2 .nf \fBtnf_ulong\fR \fIpages_free\fR @@ -588,7 +566,6 @@ be freed when any queued pageout requests complete.) .SS "Swapper" .SS "\fBswapout_process\fR" -.sp .in +2 .nf \fBtnf_pid\fR \fIpid\fR @@ -619,7 +596,6 @@ Reports the number of pages either freed or queued for pageout. .RE .SS "\fBswapout_lwp\fR" -.sp .in +2 .nf \fBtnf_pid\fR \fIpid\fR @@ -670,7 +646,6 @@ The number of pages swapped out. .RE .SS "\fBswapin_lwp\fR" -.sp .in +2 .nf \fBtnf_pid\fR \fIpid\fR @@ -722,7 +697,6 @@ The number of pages swapped in. .SS "Local I/O" .SS "\fBstrategy\fR" -.sp .in +2 .nf \fBtnf_device\fR \fIdevice\fR @@ -783,7 +757,6 @@ The \fBbuf\fR(9S) flags associated with the transfer. .RE .SS "\fBbiodone\fR" -.sp .in +2 .nf \fBtnf_device\fR \fIdevice\fR @@ -824,7 +797,6 @@ The kernel address of the \fBbuf\fR(9S) structure associated with the transfer. .RE .SS "\fBphysio_start\fR" -.sp .in +2 .nf \fBtnf_device\fR \fIdevice\fR @@ -837,7 +809,7 @@ The kernel address of the \fBbuf\fR(9S) structure associated with the transfer. .sp .LP Raw I/O start event. This event marks entry into the \fBphysio\fR(9F) -fufnction which performs unbuffered I/O. +function which performs unbuffered I/O. .sp .ne 2 .na @@ -875,7 +847,6 @@ The direction of the transfer: read or write (see \fBbuf\fR(9S)). .RE .SS "\fBphysio_end\fR" -.sp .in +2 .nf \fBtnf_device\fR \fIdevice\fR @@ -884,7 +855,7 @@ The direction of the transfer: read or write (see \fBbuf\fR(9S)). .sp .LP -Raw I/O end event. This event marks exit from the \fBphysio\fR(9F) fufnction. +Raw I/O end event. This event marks exit from the \fBphysio\fR(9F) function. .sp .ne 2 .na @@ -895,8 +866,6 @@ The major and minor numbers of the device of the transfer. .RE .SH USAGE -.sp -.LP Use the \fBprex\fR utility to control kernel probes. The standard \fBprex\fR commands to list and manipulate probes are available to you, along with commands to set up and manage kernel tracing. @@ -968,8 +937,6 @@ A convenient way to follow these steps is to use two shell windows; run an interactive \fBprex\fR session in one, and run your application and \fBtnfxtract\fR in the other. .SH SEE ALSO -.sp -.LP \fBprex\fR(1), \fBtnfdump\fR(1), \fBtnfxtract\fR(1), \fBlibtnfctl\fR(3TNF), \fBTNF_PROBE\fR(3TNF), \fBtracing\fR(3TNF), \fBstrategy\fR(9E), \fBbiodone\fR(9F), \fBphysio\fR(9F), \fBbuf\fR(9S) diff --git a/usr/src/man/man5/condition.5 b/usr/src/man/man5/condition.5 index 5ebaf3ef50..1282ea26e8 100644 --- a/usr/src/man/man5/condition.5 +++ b/usr/src/man/man5/condition.5 @@ -44,12 +44,10 @@ .\" Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2001, The IEEE and The Open Group. All Rights Reserved. .\" -.TH CONDITION 5 "Jul 20, 1998" +.TH CONDITION 5 "May 16, 2020" .SH NAME condition \- concepts related to condition variables .SH DESCRIPTION -.sp -.LP Occasionally, a thread running within a mutex needs to wait for an event, in which case it blocks or sleeps. When a thread is waiting for another thread to communicate its disposition, it uses a condition variable in conjunction with a @@ -68,8 +66,6 @@ If another thread changes the condition, it may wake up waiting threads by signaling the associated condition variable. The waiting threads, upon awakening, reacquire the mutex and re-evaluate the condition. .SS "Initialize" -.sp -.LP Condition variables and mutexes should be global. Condition variables that are allocated in writable memory can synchronize threads among processes if they are shared by the cooperating processes (see \fBmmap\fR(2)) and are initialized @@ -99,26 +95,18 @@ initialization of the condition variable. Solaris condition variables also implement as the default, intra-process; however, they set this attribute according to the argument, \fItype\fR, passed to their initialization function. .SS "Condition Wait" -.sp -.LP The condition wait interface allows a thread to wait for a condition and atomically release the associated mutex that it needs to hold to check the condition. The thread waits for another thread to make the condition true and that thread's resulting call to signal and wakeup the waiting thread. .SS "Condition Signaling" -.sp -.LP A condition signal allows a thread to unblock the next thread waiting on the condition variable, whereas, a condition broadcast allows a thread to unblock all threads waiting on the condition variable. .SS "Destroy" -.sp -.LP The condition destroy functions destroy any state, but not the space, associated with the condition variable. .SH ATTRIBUTES -.sp -.LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp @@ -133,8 +121,6 @@ MT-Level MT-Safe .TE .SH SEE ALSO -.sp -.LP \fBfork\fR(2), \fBmmap\fR(2), \fBsetitimer\fR(2), \fBshmop\fR(2), \fBcond_broadcast\fR(3C), \fBcond_destroy\fR(3C), \fBcond_init\fR(3C), \fBcond_signal\fR(3C), \fBcond_timedwait\fR(3C), \fBcond_wait\fR(3C), @@ -144,13 +130,11 @@ MT-Level MT-Safe \fBpthread_condattr_init\fR(3C), \fBsignal\fR(3C), \fBattributes\fR(5), \fBmutex\fR(5), \fBstandards\fR(5) .SH NOTES -.sp -.LP If more than one thread is blocked on a condition variable, the order in which threads are unblocked is determined by the scheduling policy. .sp .LP -\fBUSYNC_THREAD\fR does not support multiple mapplings to the same logical +\fBUSYNC_THREAD\fR does not support multiple mappings to the same logical synch object. If you need to \fBmmap()\fR a synch object to different locations within the same address space, then the synch object should be initialized as a shared object \fBUSYNC_PROCESS\fR for Solaris, and diff --git a/usr/src/man/man5/epoll.5 b/usr/src/man/man5/epoll.5 index 1cf5d39947..2e64991cbf 100644 --- a/usr/src/man/man5/epoll.5 +++ b/usr/src/man/man5/epoll.5 @@ -8,7 +8,7 @@ .\" A full copy of the text of the CDDL should have accompanied this .\" source. A copy of the CDDL is also available via the Internet at .\" http://www.illumos.org/license/CDDL. -.TH EPOLL 5 "Apr 17, 2014" +.TH EPOLL 5 "May 16, 2020" .SH NAME epoll \- Linux-compatible I/O event notification facility .SH SYNOPSIS @@ -28,7 +28,7 @@ the Linux facility, including the following interfaces: .ie t \(bu .el o \fBepoll_create\fR(3C) creates an \fBepoll\fR instance, returning a file -descriptor. It contains a size arugment which is meaningful only in as +descriptor. It contains a size argument which is meaningful only in as much as it cannot be 0. .RE .RS +4 @@ -59,7 +59,7 @@ via \fBepoll_ctl\fR(3C), blocking the caller if no such events are pending. .TP .ie t \(bu .el o -\fBepoll_pwait\fR(3C) opeates in a similar manner to \fBepoll_wait\fR(3C), but +\fBepoll_pwait\fR(3C) operates in a similar manner to \fBepoll_wait\fR(3C), but allows the caller to specify a signal mask to be set atomically with respect to waiting for events. .RE diff --git a/usr/src/man/man5/locale.5 b/usr/src/man/man5/locale.5 index dd8d3ba858..e6d63073aa 100644 --- a/usr/src/man/man5/locale.5 +++ b/usr/src/man/man5/locale.5 @@ -43,12 +43,11 @@ .\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved. .\" Portions Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved. .\" -.TH LOCALE 5 "April 9, 2016" +.TH LOCALE 5 "May 16, 2020" .SH NAME locale \- subset of a user's environment that depends on language and cultural conventions .SH DESCRIPTION -.LP A \fBlocale\fR is the definition of the subset of a user's environment that depends on language and cultural conventions. It is made up from one or more categories. Each category is identified by its name and controls specific @@ -139,7 +138,6 @@ the value of the corresponding environment variable is used. If the environment variable is unset or is set to the empty string, the \fBsetlocale()\fR function sets the appropriate environment. .SS "Locale Definition" -.LP Locales can be described with the file format accepted by the \fBlocaledef\fR utility. .sp @@ -341,7 +339,6 @@ decimal or hexadecimal constants. Symbolic names not present in the charmap file can be specified and will be ignored, as specified under item 1 above. .RE .SS "LC_CTYPE" -.LP The \fBLC_CTYPE\fR category defines character classification, case conversion and other character attributes. In addition, a series of characters can be represented by three adjacent periods representing an ellipsis symbol @@ -719,7 +716,6 @@ the mapping will be the reverse mapping of the one specified for \fBtoupper\fR. .RE .SS "LC_COLLATE" -.LP The \fBLC_COLLATE\fR category provides a collation sequence definition for numerous utilities (such as \fBsort\fR(1), \fBuniq\fR(1), and so forth), regular expression matching (see \fBregex\fR(5)), and the \fBstrcoll\fR(3C), @@ -744,7 +740,7 @@ as an entity). \fBUser-defined ordering of collating elements\fR. Each collating element is assigned a collation value defining its order in the character (or basic) collation sequence. This ordering is used by regular expressions and pattern -matching and, unless collation weights are explicity specified, also as the +matching and, unless collation weights are explicitly specified, also as the collation weight to be used in sorting. .RE .RS +4 @@ -833,7 +829,6 @@ Specify the end of the collation-order statements. .RE .SS "collating-element \fIkeyword\fR" -.LP In addition to the collating elements in the character set, the \fBcollating-element\fR keyword is used to define multi-character collating elements. The syntax is: @@ -868,7 +863,6 @@ Example: \fBcollating-element\fR <\fBll\fR> from "\fBll\fR" .in -2 .SS "collating-symbol \fIkeyword\fR" -.LP This keyword will be used to define symbols for use in collation sequence statements; that is, between the \fBorder_start\fR and the \fBorder_end\fR keywords. The syntax is: @@ -907,7 +901,6 @@ associated with a relative position in the character order sequence. While such a symbolic name does not represent any collating element, it can be used as a weight. .SS "order_start \fIkeyword\fR" -.LP The \fBorder_start\fR keyword must precede collation order entries and also defines the number of weights for this collation sequence definition and other collation rules. @@ -987,7 +980,6 @@ order_start forward;backward .LP If no operands are specified, a single \fBforward\fR operand is assumed. .SS "Collation Order" -.LP The \fBorder_start\fR keyword is followed by collating identifier entries. The syntax for the collating element entries is: .sp @@ -1139,7 +1131,7 @@ l l l l . \fBorder_start\fR \fBforward;backward\fR \fBUNDEFINED\fR \fBIGNORE;IGNORE\fR -\fB<LOW>\fR +\fB<LOW>\fR \fB<space>\fR \fB<LOW>;<space>\fR \fB\&.\|.\|.\fR \fB<LOW>;.\|.\|.\fR \fB<a>\fR \fB<a>;<a>\fR @@ -1152,7 +1144,7 @@ l l . \fB<Ch>\fR \fB<ch>;<Ch>\fR \fB<s>\fR \fB<s>;<s>\fR \fB<eszet>\fR \fB"<s><s>";"<eszet><eszet>"\fR -\fBorder_end\fR +\fBorder_end\fR .TE .sp @@ -1186,10 +1178,8 @@ collating symbol <\fBch\fR> and belongs to the same primary equivalence class as the multi-character collating element <\fBCh\fR>. .RE .SS "order_end \fIkeyword\fR" -.LP The collating order entries must be terminated with an \fBorder_end\fR keyword. .SS "LC_MONETARY" -.LP The \fBLC_MONETARY\fR category defines the rules and symbols that are used to format monetary numeric information. This information is available through the \fBlocaleconv\fR(3C) function @@ -1637,18 +1627,18 @@ The following table shows the result of various combinations: .TS l l l l l l l l l l l l . - \fBp_sep_by_space\fR - 2 1 0 -\fBp_cs_precedes\fR= 1 \fBp_sign_posn\fR= 0 \fB($1.25)\fR \fB($1.25)\fR \fB($1.25)\fR - \fBp_sign_posn\fR= 1 \fB+$1.25\fR \fB+$1.25\fR \fB+$1.25\fR - \fBp_sign_posn\fR= 2 \fB$1.25+\fR \fB$1.25+\fR \fB$1.25+\fR - \fBp_sign_posn\fR= 3 \fB+$1.25\fR \fB+$1.25\fR \fB+$1.25\fR - \fBp_sign_posn\fR= 4 \fB$+1.25\fR \fB$+1.25\fR \fB$+1.25\fR -\fBp_cs_precedes\fR= 0 \fBp_sign_posn\fR= 0 \fB(1.25 $)\fR \fB(1.25 $)\fR \fB(1.25$)\fR - \fBp_sign_posn\fR= 1 \fB+1.25 $\fR \fB+1.25 $\fR \fB+1.25$\fR - \fBp_sign_posn\fR= 2 \fB1.25$ +\fR \fB1.25 $+\fR \fB1.25$+\fR - \fBp_sign_posn\fR= 3 \fB1.25+ $\fR \fB1.25 +$\fR \fB1.25+$\fR - \fBp_sign_posn\fR= 4 \fB1.25$ +\fR \fB1.25 $+\fR \fB1.25$+\fR + \fBp_sep_by_space\fR + 2 1 0 +\fBp_cs_precedes\fR= 1 \fBp_sign_posn\fR= 0 \fB($1.25)\fR \fB($1.25)\fR \fB($1.25)\fR + \fBp_sign_posn\fR= 1 \fB+$1.25\fR \fB+$1.25\fR \fB+$1.25\fR + \fBp_sign_posn\fR= 2 \fB$1.25+\fR \fB$1.25+\fR \fB$1.25+\fR + \fBp_sign_posn\fR= 3 \fB+$1.25\fR \fB+$1.25\fR \fB+$1.25\fR + \fBp_sign_posn\fR= 4 \fB$+1.25\fR \fB$+1.25\fR \fB$+1.25\fR +\fBp_cs_precedes\fR= 0 \fBp_sign_posn\fR= 0 \fB(1.25 $)\fR \fB(1.25 $)\fR \fB(1.25$)\fR + \fBp_sign_posn\fR= 1 \fB+1.25 $\fR \fB+1.25 $\fR \fB+1.25$\fR + \fBp_sign_posn\fR= 2 \fB1.25$ +\fR \fB1.25 $+\fR \fB1.25$+\fR + \fBp_sign_posn\fR= 3 \fB1.25+ $\fR \fB1.25 +$\fR \fB1.25+$\fR + \fBp_sign_posn\fR= 4 \fB1.25$ +\fR \fB1.25 $+\fR \fB1.25$+\fR .TE .sp @@ -1696,7 +1686,6 @@ END LC_MONETARY The entry \fBn/a\fR indicates that the value is not available in the POSIX locale. .SS "LC_NUMERIC" -.LP The \fBLC_NUMERIC\fR category defines the rules and symbols that will be used to format non-monetary numeric information. This information is available through the \fBlocaleconv\fR(3C) function. @@ -1795,7 +1784,6 @@ _ The entry \fBn/a\fR indicates that the value is not available in the POSIX locale. .SS "LC_TIME" -.LP The \fBLC_TIME\fR category defines the interpretation of the field descriptors supported by \fBdate\fR(1) and affects the behavior of the \fBstrftime\fR(3C), \fBwcsftime\fR(3C), \fBstrptime\fR(3C), and \fBnl_langinfo\fR(3C) functions. @@ -2062,7 +2050,6 @@ field descriptor will be used instead of the value. .RE .SS "LC_TIME \fIC-language\fR Access" -.LP The following information can be accessed. These correspond to constants defined in <\fBlanginfo.h\fR> and used as arguments to the \fBnl_langinfo\fR(3C) function. @@ -2324,7 +2311,6 @@ _ .TE .SS "LC_TIME \fIGeneral\fR Information" -.LP Although certain of the field descriptors in the POSIX locale (such as the name of the month) are shown with initial capital letters, this need not be the case in other locales. Programs using these fields may need to adjust the @@ -2362,7 +2348,6 @@ in 1776" while 7/14/1789 would come out as "The 14 day of July in 1789" The above example is for illustrative purposes only. The \fB%O\fR modifier is primarily intended to provide for Kanji or Hindi digits in \fBdate\fR formats. .SS "LC_MESSAGES" -.LP The \fBLC_MESSAGES\fR category defines the format and values for affirmative and negative responses. .sp @@ -2455,7 +2440,6 @@ l | l | l . In an application conforming to the SUSv3 standard, the information on \fByesstr\fR and \fBnostr\fR is not available. .SH SEE ALSO -.LP \fBdate\fR(1), \fBlocale\fR(1), \fBlocaledef\fR(1), \fBsort\fR(1), \fBtr\fR(1), \fBuniq\fR(1), \fBlocaleconv\fR(3C), \fBnl_langinfo\fR(3C), \fBsetlocale\fR(3C), \fBstrcoll\fR(3C), \fBstrftime\fR(3C), \fBstrptime\fR(3C), diff --git a/usr/src/tools/scripts/gensetdefs.pl b/usr/src/tools/scripts/gensetdefs.pl deleted file mode 100644 index 8ca5782feb..0000000000 --- a/usr/src/tools/scripts/gensetdefs.pl +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/perl -w -# -# COPYRIGHT 2013 Pluribus Networks Inc. -# -# All rights reserved. This copyright notice is Copyright Management -# Information under 17 USC 1202 and is included to protect this work and -# deter copyright infringement. Removal or alteration of this Copyright -# Management Information without the express written permission from -# Pluribus Networks Inc is prohibited, and any such unauthorized removal -# or alteration will be a violation of federal law. - -use strict; - -my @Sections = split(/\n/, `elfedit -r -e \'shdr:sh_name -osimple\' $ARGV[0] 2>&1`); - -foreach my $Section (@Sections) { - if ($Section =~ "^set_") { - print "\tfixing $Section\n"; - - chomp(my $SectionAddr = `elfedit -r -e \'shdr:sh_addr -onum $Section\' $ARGV[0] 2>&1`); - chomp(my $SectionSize = `elfedit -r -e \'shdr:sh_size -onum $Section\' $ARGV[0] 2>&1`); - my $SectionEnd = hex($SectionAddr) + hex($SectionSize); - - `elfedit -e \'sym:st_bind __start_$Section global\' $ARGV[0] 2>&1`; - `elfedit -e \'sym:st_value __start_$Section $SectionAddr\' $ARGV[0] 2>&1`; - `elfedit -e \'sym:st_shndx __start_$Section $Section\' $ARGV[0] 2>&1`; - `elfedit -e \'sym:st_bind __stop_$Section global\' $ARGV[0] 2>&1`; - `elfedit -e \'sym:st_value __stop_$Section $SectionEnd\' $ARGV[0] 2>&1`; - `elfedit -e \'sym:st_shndx __stop_$Section $Section\' $ARGV[0] 2>&1`; - } -} diff --git a/usr/src/uts/Makefile.targ b/usr/src/uts/Makefile.targ index 478fa86190..4a64d3a4c2 100644 --- a/usr/src/uts/Makefile.targ +++ b/usr/src/uts/Makefile.targ @@ -24,6 +24,7 @@ # Copyright 2014 Garrett D'Amore <garrett@damore.org> # Copyright 2016 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> # Copyright (c) 2017 by Delphix. All rights reserved. +# Copyright 2019 Joyent, Inc. # # This Makefiles contains the common targets and definitions for # all kernels. It is to be included in the Makefiles for specific diff --git a/usr/src/uts/common/sys/fibre-channel/fca/emlxs/emlxs_hw.h b/usr/src/uts/common/sys/fibre-channel/fca/emlxs/emlxs_hw.h index ab4b4b4e6b..406c90303b 100644 --- a/usr/src/uts/common/sys/fibre-channel/fca/emlxs/emlxs_hw.h +++ b/usr/src/uts/common/sys/fibre-channel/fca/emlxs/emlxs_hw.h @@ -2140,7 +2140,7 @@ typedef struct #define SLI_FW_TYPE_101 SLI_FW_TYPE_SHIFT(0xb) /* LP101 */ -enum emlxs_prog_type +typedef enum emlxs_prog_type { TEST_PROGRAM, /* 0 */ UTIL_PROGRAM, /* 1 */ diff --git a/usr/src/uts/i86pc/Makefile.files b/usr/src/uts/i86pc/Makefile.files index d9d6605a63..fe848a2f26 100644 --- a/usr/src/uts/i86pc/Makefile.files +++ b/usr/src/uts/i86pc/Makefile.files @@ -25,6 +25,7 @@ # Copyright (c) 2010, Intel Corporation. # Copyright 2019 Joyent, Inc. # Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2019 Joyent, Inc. # # This Makefile defines file modules in the directory uts/i86pc # and its children. These are the source files which are i86pc @@ -269,6 +270,8 @@ VMM_OBJS += vmm.o \ vmcb.o \ svm_support.o \ amdv.o \ + sol_iommu.o \ + sol_ppt.o \ gipt.o \ vmm_sol_vm.o \ vmm_sol_glue.o \ diff --git a/usr/src/uts/i86pc/Makefile.i86pc b/usr/src/uts/i86pc/Makefile.i86pc index cec9d91ac8..fa72c89dbe 100644 --- a/usr/src/uts/i86pc/Makefile.i86pc +++ b/usr/src/uts/i86pc/Makefile.i86pc @@ -250,6 +250,7 @@ DRV_KMODS += vmm DRV_KMODS += viona DRV_KMODS += ppt DRV_KMODS += imc imcstub +DRV_KMODS += vmm DRV_KMODS += cpudrv diff --git a/usr/src/uts/i86pc/io/viona/viona.c b/usr/src/uts/i86pc/io/viona/viona.c index 40bdd80a6e..2371a2f3ae 100644 --- a/usr/src/uts/i86pc/io/viona/viona.c +++ b/usr/src/uts/i86pc/io/viona/viona.c @@ -34,6 +34,7 @@ * http://www.illumos.org/license/CDDL. * * Copyright 2015 Pluribus Networks Inc. + * Copyright 2017 Joyent, Inc. */ #include <sys/conf.h> @@ -194,8 +195,8 @@ static void *viona_state; static dev_info_t *viona_dip; static id_space_t *viona_minor_ids; /* - * copy tx mbufs from virtio ring to avoid necessitating a wait - * for packet transmission to free resources. + * copy tx mbufs from virtio ring to avoid necessitating a wait for packet + * transmission to free resources. */ static boolean_t copy_tx_mblks = B_TRUE; @@ -914,7 +915,7 @@ viona_ioc_tx_intr_clear(viona_link_t *link) static int vq_popchain(viona_link_t *link, viona_vring_hqueue_t *hq, struct iovec *iov, -int n_iov, uint16_t *cookie) + int n_iov, uint16_t *cookie) { int i; int ndesc, nindir; @@ -1139,10 +1140,12 @@ viona_rx(void *arg, mac_resource_handle_t mrh, mblk_t *mp, size_t mblklen; int n, i = 0; uint16_t cookie; - struct virtio_net_hdr *vrx; - struct virtio_net_mrgrxhdr *vmrgrx; + struct virtio_net_hdr *vrx = NULL; + struct virtio_net_mrgrxhdr *vmrgrx = NULL; +#if notyet mblk_t *ml; - caddr_t buf; +#endif + caddr_t buf = NULL; int total_len = 0; int copied_buf = 0; int num_bufs = 0; @@ -1312,8 +1315,10 @@ viona_desb_free(viona_desb_t *dp) { viona_link_t *link; viona_vring_hqueue_t *hq; +#if notyet struct virtio_used *vu; int uidx; +#endif uint_t ref; ref = atomic_dec_uint_nv(&dp->d_ref); diff --git a/usr/src/uts/i86pc/io/vmm/io/sol_iommu.c b/usr/src/uts/i86pc/io/vmm/io/sol_iommu.c new file mode 100644 index 0000000000..989e88e17b --- /dev/null +++ b/usr/src/uts/i86pc/io/vmm/io/sol_iommu.c @@ -0,0 +1,86 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright 2017 Joyent, Inc. + */ + +#include <sys/types.h> +#include <sys/param.h> +#include <sys/cmn_err.h> + +/* + * IOMMU Stub + * + * Until proper iommu support can be wired into bhyve, stub out all the + * functions to either fail, if reasonable, or panic. + */ + +void +iommu_cleanup(void) +{ +} + +void * +iommu_host_domain(void) +{ + return (NULL); +} + +/*ARGSUSED*/ +void * +iommu_create_domain(vm_paddr_t maxaddr) +{ + return (NULL); +} + +/*ARGSUSED*/ +void +iommu_destroy_domain(void *dom) +{ + panic("unimplemented"); +} + +/*ARGSUSED*/ +void +iommu_create_mapping(void *dom, vm_paddr_t gpa, vm_paddr_t hpa, size_t len) +{ + panic("unimplemented"); +} + +/*ARGSUSED*/ +void +iommu_remove_mapping(void *dom, vm_paddr_t gpa, size_t len) +{ + panic("unimplemented"); +} + +/*ARGSUSED*/ +void +iommu_add_device(void *dom, uint16_t rid) +{ + panic("unimplemented"); +} + +/*ARGSUSED*/ +void +iommu_remove_device(void *dom, uint16_t rid) +{ + panic("unimplemented"); +} + +/*ARGSUSED*/ +void +iommu_invalidate_tlb(void *domain) +{ + panic("unimplemented"); +} + diff --git a/usr/src/uts/i86pc/io/vmm/io/sol_ppt.c b/usr/src/uts/i86pc/io/vmm/io/sol_ppt.c new file mode 100644 index 0000000000..9d5b1f5cdc --- /dev/null +++ b/usr/src/uts/i86pc/io/vmm/io/sol_ppt.c @@ -0,0 +1,92 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright 2017 Joyent, Inc. + */ + +#include <sys/types.h> +#include <sys/errno.h> +#include <sys/cmn_err.h> + +#include <sys/vmm.h> + +/* + * PCI Pass-Through Stub + * + * Until proper passthrough support can be wired into bhyve, stub out all the + * functions to either fail or no-op. + */ + +int +ppt_unassign_all(struct vm *vm) +{ + return (0); +} + +/*ARGSUSED*/ +int +ppt_map_mmio(struct vm *vm, int bus, int slot, int func, vm_paddr_t gpa, + size_t len, vm_paddr_t hpa) +{ + return (ENXIO); +} + +/*ARGSUSED*/ +int +ppt_setup_msi(struct vm *vm, int vcpu, int bus, int slot, int func, + uint64_t addr, uint64_t msg, int numvec) +{ + return (ENXIO); +} + +/*ARGSUSED*/ +int +ppt_setup_msix(struct vm *vm, int vcpu, int bus, int slot, int func, int idx, + uint64_t addr, uint64_t msg, uint32_t vector_control) +{ + return (ENXIO); +} + +/*ARGSUSED*/ +int +ppt_assigned_devices(struct vm *vm) +{ + return (0); +} + +/*ARGSUSED*/ +boolean_t +ppt_is_mmio(struct vm *vm, vm_paddr_t gpa) +{ + return (B_FALSE); +} + +/*ARGSUSED*/ +int +ppt_avail_devices(void) +{ + return (0); +} + +/*ARGSUSED*/ +int +ppt_assign_device(struct vm *vm, int bus, int slot, int func) +{ + return (ENOENT); +} + +/*ARGSUSED*/ +int +ppt_unassign_device(struct vm *vm, int bus, int slot, int func) +{ + return (ENXIO); +} diff --git a/usr/src/uts/i86pc/io/vmm/offsets.in b/usr/src/uts/i86pc/io/vmm/offsets.in deleted file mode 100644 index 4b1fe1d6b6..0000000000 --- a/usr/src/uts/i86pc/io/vmm/offsets.in +++ /dev/null @@ -1,72 +0,0 @@ -/* - * This file and its contents are supplied under the terms of the - * Common Development and Distribution License ("CDDL"), version 1.0. - * You may only use this file in accordance with the terms of version - * 1.0 of the CDDL. - * - * A full copy of the text of the CDDL should have accompanied this - * source. A copy of the CDDL is also available via the Internet at - * http://www.illumos.org/license/CDDL. - */ - -/* - * Copyright 2014 Pluribus Networks Inc. - */ - -#include <sys/types.h> -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/cpuvar.h> - -#include <machine/pmap.h> - -#include <machine/vmm.h> -#include "intel/vmx_cpufunc.h" -#include "intel/vmx.h" - -vmxctx - tmpstktop VMXCTX_TMPSTKTOP - guest_rdi VMXCTX_GUEST_RDI - guest_rsi VMXCTX_GUEST_RSI - guest_rdx VMXCTX_GUEST_RDX - guest_rcx VMXCTX_GUEST_RCX - guest_r8 VMXCTX_GUEST_R8 - guest_r9 VMXCTX_GUEST_R9 - guest_rax VMXCTX_GUEST_RAX - guest_rbx VMXCTX_GUEST_RBX - guest_rbp VMXCTX_GUEST_RBP - guest_r10 VMXCTX_GUEST_R10 - guest_r11 VMXCTX_GUEST_R11 - guest_r12 VMXCTX_GUEST_R12 - guest_r13 VMXCTX_GUEST_R13 - guest_r14 VMXCTX_GUEST_R14 - guest_r15 VMXCTX_GUEST_R15 - guest_cr2 VMXCTX_GUEST_CR2 - host_r15 VMXCTX_HOST_R15 - host_r14 VMXCTX_HOST_R14 - host_r13 VMXCTX_HOST_R13 - host_r12 VMXCTX_HOST_R12 - host_rbp VMXCTX_HOST_RBP - host_rsp VMXCTX_HOST_RSP - host_rbx VMXCTX_HOST_RBX - host_rip VMXCTX_HOST_RIP - launch_error VMXCTX_LAUNCH_ERROR - -vmx VMX_SIZE - -\#define VM_SUCCESS 0 -\#define VM_FAIL_INVALID 1 -\#define VM_FAIL_VALID 2 - -\#define VMX_RETURN_DIRECT 0 -\#define VMX_RETURN_LONGJMP 1 -\#define VMX_RETURN_VMRESUME 2 -\#define VMX_RETURN_VMLAUNCH 3 -\#define VMX_RETURN_AST 4 - -cpu - cpu_thread - -_kthread - t_lwp - _tu._ts._t_astflag T_ASTFLAG diff --git a/usr/src/uts/i86pc/io/vmm/vmm_ipi.h b/usr/src/uts/i86pc/io/vmm/vmm_ipi.h deleted file mode 100644 index 4dff03ba1f..0000000000 --- a/usr/src/uts/i86pc/io/vmm/vmm_ipi.h +++ /dev/null @@ -1,37 +0,0 @@ -/*- - * Copyright (c) 2011 NetApp, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL NETAPP, INC OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD: head/sys/amd64/vmm/vmm_ipi.h 260466 2014-01-09 03:25:54Z neel $ - */ - -#ifndef _VMM_IPI_H_ -#define _VMM_IPI_H_ - -#ifdef __FreeBSD__ -int vmm_ipi_alloc(void); -void vmm_ipi_free(int num); -#endif - -#endif diff --git a/usr/src/uts/i86pc/io/vmm/vmm_sol_mem.c b/usr/src/uts/i86pc/io/vmm/vmm_sol_mem.c deleted file mode 100644 index 3bb5412d16..0000000000 --- a/usr/src/uts/i86pc/io/vmm/vmm_sol_mem.c +++ /dev/null @@ -1,111 +0,0 @@ -/*- - * Copyright (c) 2011 NetApp, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL NETAPP, INC OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD: head/sys/amd64/vmm/vmm_mem.c 245678 2013-01-20 03:42:49Z neel $ - */ -/* - * This file and its contents are supplied under the terms of the - * Common Development and Distribution License ("CDDL"), version 1.0. - * You may only use this file in accordance with the terms of version - * 1.0 of the CDDL. - * - * A full copy of the text of the CDDL should have accompanied this - * source. A copy of the CDDL is also available via the Internet at - * http://www.illumos.org/license/CDDL. - * - * Copyright 2013 Pluribus Networks Inc. - */ - -#include <sys/cdefs.h> -__FBSDID("$FreeBSD: head/sys/amd64/vmm/vmm_mem.c 245678 2013-01-20 03:42:49Z neel $"); - -#include <sys/param.h> -#include <sys/lock.h> -#include <sys/mutex.h> -#include <sys/systm.h> -#include <sys/malloc.h> -#include <sys/kernel.h> - -#include <vm/vm.h> -#include <machine/pmap.h> - -#include <sys/ddi.h> - -#include "vmm_util.h" -#include "vmm_mem.h" - -int -vmm_mem_init(void) -{ - return (0); -} - -vm_paddr_t -vmm_mem_alloc(size_t size) -{ - clock_t usec = 2 * 1000000; - vm_paddr_t pa; - caddr_t addr; - - if (size != PAGE_SIZE) - panic("vmm_mem_alloc: invalid allocation size %lu", size); - - while (usec > 0) { - if ((addr = kmem_zalloc(PAGE_SIZE, KM_NOSLEEP)) != NULL) { - ASSERT(((uintptr_t)addr & PAGE_MASK) == 0); - pa = vtophys((vm_offset_t)addr); - return (pa); - } - delay(drv_usectohz((clock_t)500000)); - usec -= 500000; - } - - return (NULL); -} - -void -vmm_mem_free(vm_paddr_t base, size_t length) -{ - page_t *pp; - - if (base & PAGE_MASK) { - panic("vmm_mem_free: base 0x%0lx must be aligned on a " - "0x%0x boundary\n", base, PAGE_SIZE); - } - - if (length != PAGE_SIZE) { - panic("vmm_mem_free: invalid length %lu", length); - } - - pp = page_numtopp_nolock(btop(base)); - kmem_free((void *)pp->p_offset, PAGE_SIZE); -} - -vm_paddr_t -vmm_mem_maxaddr(void) -{ - - return (ptob(physmax + 1)); -} diff --git a/usr/src/uts/i86pc/io/vmm/vmx_assym.s b/usr/src/uts/i86pc/io/vmm/vmx_assym.s deleted file mode 100644 index d84ca30275..0000000000 --- a/usr/src/uts/i86pc/io/vmm/vmx_assym.s +++ /dev/null @@ -1 +0,0 @@ -#include "vmx_assym.h" diff --git a/usr/src/uts/intel/gld/Makefile b/usr/src/uts/intel/gld/Makefile index 3b88451670..7a5d77368e 100644 --- a/usr/src/uts/intel/gld/Makefile +++ b/usr/src/uts/intel/gld/Makefile @@ -26,7 +26,7 @@ # # -# This makefile drives the production of the gld driver +# This makefile drives the production of the gld driver # kernel module. # # intel architecture dependent @@ -57,6 +57,8 @@ ALL_TARGET = $(BINARY) LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) +LDFLAGS += -dy -Nmisc/mac + # # For now, disable these lint checks; maintainers should endeavor # to investigate and remove these for maximum lint coverage. diff --git a/usr/src/uts/sparc/gld/Makefile b/usr/src/uts/sparc/gld/Makefile index d56548e81b..ad3519c146 100644 --- a/usr/src/uts/sparc/gld/Makefile +++ b/usr/src/uts/sparc/gld/Makefile @@ -25,7 +25,7 @@ # Use is subject to license terms. # # -# This makefile drives the production of the gld driver +# This makefile drives the production of the gld driver # kernel module. # # sparc architecture dependent @@ -56,6 +56,8 @@ ALL_TARGET = $(BINARY) LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) +LDFLAGS += -dy -Nmisc/mac + # # Overrides. # |