Commit Graph

14886 Commits

Author SHA1 Message Date
John-Mark Gurney
b2c696468c add Xref to sound(4)...
MFC after:	1 week
2014-06-02 22:58:00 +00:00
Luiz Otavio O Souza
7b34615303 Never, ever, abbreviate the month names on manual pages.
Pointed out by:	brueffer
Pointy hat to:	loos
2014-06-02 02:20:28 +00:00
Luiz Otavio O Souza
f74e8e4039 Adds the bsnmp module to export the temperature data from lm75 sensors on
the system.

Together with lm75(4) this module allows easy temperature monitoring over
SNMP, specially for embedded systems.

Manual page reviewed by:        brueffer (D128)
2014-06-01 03:14:03 +00:00
Neel Natu
26cdcdbebb Use MIN(a,b) from <sys/param.h> instead of rolling our own version.
Pointed out by:	grehan
2014-06-01 02:47:09 +00:00
Neel Natu
0be3798af5 Limit the maximum number of back-to-back iterations of a "rep; ins/outs"
to 16. This is arbitrary and is used to ensure that a vcpu goes back into
the vm_run() loop to process interrupts or rendezvous events in a timely
fashion.

Found with:	Coverity Scan
CID:		1216436
2014-06-01 02:13:07 +00:00
Neel Natu
95ebc360ef Activate vcpus from bhyve(8) using the ioctl VM_ACTIVATE_CPU instead of doing
it implicitly in vmm.ko.

Add ioctl VM_GET_CPUS to get the current set of 'active' and 'suspended' cpus
and display them via /usr/sbin/bhyvectl using the "--get-active-cpus" and
"--get-suspended-cpus" options.

This is in preparation for being able to reset virtual machine state without
having to destroy and recreate it.
2014-05-31 23:37:34 +00:00
Christian Brueffer
6e898985fc Grammar cleanup; sort SEE ALSO.
MFC after:	1 week
2014-05-31 21:12:14 +00:00
John-Mark Gurney
646fc9ccad convert to using the _daddr_t types like newfs was...
Put the superblock in the correct possition for UFS2... There is a bug
in FFS that if we don't put it here (for UFS2), it will forcefully
relocate the superblock, and I believe cause data loss..

I have a fix for that, but w/ how many releases are broken, we won't be
able to switch to the better _FLOPPY (block 0) for this for a while..
2014-05-31 20:26:34 +00:00
Ed Maste
06cc6df79c Update default callchain depth to 16 to match kernel
MFC after:	1 week
2014-05-30 20:12:47 +00:00
Dag-Erling Smørgrav
9b17fa8f3c Create /var/unbound/conf.d for additional configuration files.
Ensure that it is used if present.

MFH:	3 weeks
2014-05-29 22:34:04 +00:00
Aleksandr Rybalko
2f11ee6205 Enable kbdcontrol(1) to use maps from vt(4) keymaps dir /usr/share/vt/keymaps
if vt(4) is present.

MFC after:	7 days
Sponsored by:	The FreeBSD Foundation
2014-05-29 14:39:25 +00:00
Aleksandr Rybalko
30bf10ef15 o Teach vidcontrol(1) how to load vt(4) font.
o Teach vidcontrol(1) to distinct which virtual terminal system is running now.
o Load vt(4) fonts from different location.
o Add $FreeBSD$ tag for path.h.

Tested by:	Claude Buisson <clbuisson@orange.fr>

MFC after:	7 days
Sponsored by:	The FreeBSD Foundation
2014-05-29 13:09:48 +00:00
Hans Petter Selasky
7cadd9874f Remove nop.
MFC after:	1 week
2014-05-28 12:58:37 +00:00
Hans Petter Selasky
7eff5abf03 Fix for big endian architectures. The "up_address" field is 8-bit and
does not need byte swapping.

MFC after:	1 week
2014-05-28 12:27:41 +00:00
Neel Natu
65ffa035a7 Add segment protection and limits violation checks in vie_calculate_gla()
for 32-bit x86 guests.

Tested using ins/outs executed in a FreeBSD/i386 guest.
2014-05-27 04:26:22 +00:00
Neel Natu
6303b65d35 Fix issue with restarting an "insb/insw/insl" instruction because of a page
fault on the destination buffer.

Prior to this change a page fault would be detected in vm_copyout(). This
was done after the I/O port access was done. If the I/O port access had
side-effects (e.g. reading the uart FIFO) then restarting the instruction
would result in incorrect behavior.

Fix this by validating the guest linear address before doing the I/O port
emulation. If the validation results in a page fault exception being injected
into the guest then the instruction can now be restarted without any
side-effects.
2014-05-26 18:21:08 +00:00
Neel Natu
5382c19d81 Do the linear address calculation for the ins/outs emulation using a new
API function 'vie_calculate_gla()'.

While the current implementation is simplistic it forms the basis of doing
segmentation checks if the guest is in 32-bit protected mode.
2014-05-25 00:57:24 +00:00
Neel Natu
da11f4aa1d Add libvmmapi functions vm_copyin() and vm_copyout() to copy into and out
of the guest linear address space. These APIs in turn use a new ioctl
'VM_GLA2GPA' to convert the guest linear address to guest physical.

Use the new copyin/copyout APIs when emulating ins/outs instruction in
bhyve(8).
2014-05-24 23:12:30 +00:00
Neel Natu
e813a87350 Consolidate all the information needed by the guest page table walker into
'struct vm_guest_paging'.

Check for canonical addressing in vmm_gla2gpa() and inject a protection
fault into the guest if a violation is detected.

If the page table walk is restarted in vmm_gla2gpa() then reset 'ptpphys' to
point to the root of the page tables.
2014-05-24 20:26:57 +00:00
Neel Natu
a7424861fb Check for alignment check violation when processing in/out string instructions. 2014-05-23 19:59:14 +00:00
Neel Natu
d17b5104a9 Add emulation of the "outsb" instruction. NetBSD guests use this to write to
the UART FIFO.

The emulation is constrained in a number of ways: 64-bit only, doesn't check
for all exception conditions, limited to i/o ports emulated in userspace.

Some of these constraints will be relaxed in followup commits.

Requested by:	grehan
Reviewed by:	tychon (partially and a much earlier version)
2014-05-23 05:15:17 +00:00
Devin Teske
47206692f2 Fix syntax error thrown at the point of creating the root pool, caused by
an embedded newline appearing within the options string surrounded by
double-quotes. Rework the logic that goes into setting dataset options on
the root pool dataset while we're here -- added two new variables (which
can be altered via scripting) ZFSBOOT_POOL_CREATE_OPTIONS and also
ZFSBOOT_BOOT_POOL_CREATE_OPTIONS for setting pool/dataset attributes at
the time of pool creation. The former is for setting options on the root
pool (zroot) and the latter is for setting options on the optional separate
boot pool (bootpool) implicitly enabled when using either GELI or MBR. The
default value for the root pool variable (ZFSBOOT_POOL_CREATE_OPTIONS) is
"-O compress=lz4 -O atime=off" and the default value for separate boot pool
variable (ZFSBOOT_BOOT_POOL_CREATE_OPTIONS) is NULL (no additional options
for the separate boot pool dataset).

Reviewed by:	allanjude
MFC after:	7 days
X-MFC-with:	r266107-266109
2014-05-22 19:36:29 +00:00
Alexander Motin
e887c1dedf Add IOMMU PCI subclass, found on Tyan S8236 motherboard.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	2 weeks
2014-05-20 14:39:22 +00:00
Bryan Drewery
b39df8fe2d - Include /etc/newsyslog.conf.d/* and /usr/local/etc/newsyslog.conf.d/* by
default for newsyslog(8).

  The /usr/local/etc/newsyslog.conf.d will give packages an opportunity to
  install a default configuration to handle their own log files.

MFC after:	2 weeks
Relnotes:	yes
2014-05-20 03:00:20 +00:00
George V. Neville-Neil
1cb3ec2eb7 Update the date on the manual page.
Pointed out by: bz
2014-05-18 15:31:53 +00:00
Alexander Motin
16f6e71505 Add -o option to gstat to display "other" operatins (e.g. BIO_FLUSH).
MFC after:	1 week
2014-05-17 15:26:08 +00:00
Devin Teske
0aec73f349 Update example portion of comment to coincide with r264840 changes.
MFC after:	3 days
2014-05-17 04:29:14 +00:00
Benjamin Kaduk
aaf40f14ee Bump .Dd, missed in r266206
Approved by:	hrs (mentor, implicit)
2014-05-17 02:53:10 +00:00
George V. Neville-Neil
72fe532cd6 Add a command line argument (-l) to end event collection after some
number of seconds.  The number of seconds may be a fraction.

Submitted by:	Julien Charbon <jcharbon@versign.com>
MFC after:	2 weeks
Relnotes:	yes
2014-05-16 03:18:09 +00:00
Ed Maste
dc17b1feaa Speed up pmcstat by improving string hash
In one case generating callgraph output from a 24MB system-wide sampling
data file took 17.4 seconds on average.  Profiling showed pmcstat
spending a lot of time in strcmp, due to hash collisions.

Replacing the XOR-only hash with FNV-1a reduces the run time for my
test by 40%.
2014-05-16 03:05:53 +00:00
Benjamin Kaduk
06e36338ca Review pass through jail.8
Replace usage of "prison" with "jail", since that term has mostly dropped
out of use.  Note once at the beginning that the "prison" term is equivalent,
but do not use it otherwise. [1]

Some grammar issues.

Some mdoc formatting fixes.

Consistently use \(em for em dashes, with spaces around it.

Avoid contractions.

Prefer ssh to telnet.

PR:		docs/176832 [1]
Approved by:	hrs (mentor)
2014-05-16 01:50:04 +00:00
John-Mark Gurney
04abf5f152 make a note that FNBUFF cannot overflow as long as LNBUFF is smaller..
MFC after:	2 weeks
2014-05-15 18:51:01 +00:00
Edward Tomasz Napierala
f851961034 Remove unused variable. 2014-05-15 18:34:31 +00:00
George V. Neville-Neil
caaeeed44b Extend the size of the function or symbol that can be annotated.
MFC after:	2 weeks
2014-05-15 18:12:47 +00:00
Brooks Davis
525e2a83f6 Revert r261296. This removes the WITHOUT_NCURSESW option.
It was the wrong direction.  We will instead remove use of the
non-wide-character supporting libncurses.
2014-05-15 16:44:25 +00:00
John Baldwin
b3e9732a76 Implement a PCI interrupt router to route PCI legacy INTx interrupts to
the legacy 8259A PICs.
- Implement an ICH-comptabile PCI interrupt router on the lpc device with
  8 steerable pins configured via config space access to byte-wide
  registers at 0x60-63 and 0x68-6b.
- For each configured PCI INTx interrupt, route it to both an I/O APIC
  pin and a PCI interrupt router pin.  When a PCI INTx interrupt is
  asserted, ensure that both pins are asserted.
- Provide an initial routing of PCI interrupt router (PIRQ) pins to
  8259A pins (ISA IRQs) and initialize the interrupt line config register
  for the corresponding PCI function with the ISA IRQ as this matches
  existing hardware.
- Add a global _PIC method for OSPM to select the desired interrupt routing
  configuration.
- Update the _PRT methods for PCI bridges to provide both APIC and legacy
  PRT tables and return the appropriate table based on the configured
  routing configuration.  Note that if the lpc device is not configured, no
  routing information is provided.
- When the lpc device is enabled, provide ACPI PCI link devices corresponding
  to each PIRQ pin.
- Add a VMM ioctl to adjust the trigger mode (edge vs level) for 8259A
  pins via the ELCR.
- Mark the power management SCI as level triggered.
- Don't hardcode the number of elements in Packages in the source for
  the DSDT.  iasl(8) will fill in the actual number of elements, and
  this makes it simpler to generate a Package with a variable number of
  elements.

Reviewed by:	tycho
2014-05-15 14:16:55 +00:00
Ollivier Robert
695a612f67 Fix the "disks" variable reuse.
It starts off being used to track the grammar for the number of disks
(singular vs plural) and then it is reused as the list of available disks.

Replace the variable with disks_grammar and move 'disk' and 'disks' to
msg_ vars so they can be translated in the future.

Submitted by:	Allan Jude <freebsd@allanjude.com>
Reviewed by:	roberto
MFC after:		2 weeks
Sponsored by:	ScaleEngine Inc.
2014-05-15 02:37:59 +00:00
Ollivier Robert
ed8690e36b Updates to the datasets created by zfsboot.
Set compress=lz4 for the entire pool, removing it from the individual
datasets

Remove exec=no from /usr/src, breaks the test suite.

Submitted by:	Allan Jude <freebsd@allanjude.com>
Reviewed by:	roberto
MFC after:		2 weeks
Sponsored by:	ScaleEngine Inc.
2014-05-15 02:31:02 +00:00
Ollivier Robert
2875e59f52 Here is a patch for the bsdinstall root-on-zfs stuff that adds optional
encryption for swap, and optional gmirror for swap (which can be combined)

Submitted by:	Allan Jude <freebsd@allanjude.com>
Requested By:	roberto
Sponsored By:	ScaleEngine Inc.
MFC after:		2 weeks
2014-05-15 02:27:10 +00:00
Neel Natu
0dd10c0047 Don't include the guest memory segments in the bhyve(8) process core dump.
This has not added a lot of value when debugging bhyve issues while greatly
increasing the time and space required to store the core file.

Passing the "-C" option to bhyve(8) will change the default and dump guest
memory in the core dump.

Requested by:	grehan
Reviewed by:	grehan
2014-05-13 16:40:27 +00:00
Neel Natu
ee2dbd023c abort(3) the process in response to a VMEXIT_ABORT. This usually happens in
response to an unhandled VM exit or an unexpected error so a core is useful.

Remove unused macro VMEXIT_SWITCH.

Reviewed by:	grehan
2014-05-12 23:35:10 +00:00
Alexander V. Chernikov
aa06c87e50 Fix ndp(8) -f flag parsing
PR:		bin/136661
Reminded by:	Vinicius Zavam
MFC after:	2 weeks
2014-05-09 14:24:02 +00:00
Warner Losh
c6063d0da8 Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.
2014-05-06 04:22:01 +00:00
Neel Natu
2bd073e13b Disable the 'uart_drain()' callback when the emulated receive FIFO is full.
Failing to do this will cause the kevent(2) notification to trigger
continuously and the bhyve(8) mevent thread will hog the cpu until the
characters on the backend tty device are drained.

Also, make the uart backend file descriptor non-blocking to avoid a
select(2) before every byte read from that backend.

Reviewed by:	grehan
2014-05-05 23:54:13 +00:00
Neel Natu
9b6155a20c Modify the "-p" option to be more flexible when associating a 'vcpu' with
a 'hostcpu'. The new format of the argument string is "vcpu:hostcpu".

This allows pinning a subset of the vcpus if desired.

It also allows pinning a vcpu to more than a single 'hostcpu'.

Submitted by:	novel (initial version)
2014-05-05 18:06:35 +00:00
Neel Natu
067824256f Remove misleading "addcpu" in an error message emitted by fbsdrun_deletecpu().
Pointed out by:	novel
2014-05-05 16:35:37 +00:00
Neel Natu
09fd42cb88 Re-adding an event to a kqueue modifies the parameters of the original event.
However, if the original knote had been disabled then it is not automatically
re-enabled.

Fix this by using EV_ADD to create an mevent and EV_ENABLE to enable it.

Adding a kevent for the first time implicitly enables it so existing callers
of mevent_add() don't need to change.

Reviewed by:	grehan
2014-05-05 16:30:03 +00:00
Neel Natu
b100acf254 Don't allow MPtable generation if there are multiple PCI hierarchies. This is
because there isn't a standard way to relay this information to the guest OS.

Add a command line option "-Y" to bhyve(8) to inhibit MPtable generation.

If the virtual machine is using PCI devices on buses other than 0 then it can
still use ACPI tables to convey this information to the guest.

Discussed with:	grehan@
2014-05-02 04:51:31 +00:00
Neel Natu
e50ce2aa06 Add logic in the HLT exit handler to detect if the guest has put all vcpus
to sleep permanently by executing a HLT with interrupts disabled.

When this condition is detected the guest with be suspended with a reason of
VM_SUSPEND_HALT and the bhyve(8) process will exit.

Tested by executing "halt" inside a RHEL7-beta guest.

Discussed with:	grehan@
Reviewed by:	jhb@, tychon@
2014-05-02 00:33:56 +00:00
Ed Maste
2bd7b9e5cc kldxref: Clean up error reporting
Omit "too many sections" warnings if the ELF file is not dynamically
linked (and is therefore skipped anyway), and otherwise output it only
once.  An errant core file would previously cause kldxref to output a
number of warnings.

Also introduce a MAXSEGS #define and replace literal 2 with it, to make
comparisons clear.

Reviewed by:	kib
Sponsored by:	The FreeBSD Foundation
2014-04-30 18:11:53 +00:00