Commit Graph

14577 Commits

Author SHA1 Message Date
des
37f594fcd2 MFH (r269074): strip patch level from release name 2014-08-23 11:32:43 +00:00
se
eaf41dd313 MFC 269976.
Add support for NEWCONS to kbdmap and vidfont.
2014-08-21 21:57:18 +00:00
rmacklem
e390c0ba15 MFC: r270005
Try to clarify how file systems are exported for NFSv4.
This is a content change.
2014-08-21 01:07:27 +00:00
grehan
5d455a50f5 MFC r267921, r267934, r267949, r267959, r267966, r268202, r268276,
r268427, r268428, r268521, r268638,	r268639, r268701, r268777,
    r268889, r268922, r269008, r269042,	r269043, r269080, r269094,
    r269108, r269109, r269281, r269317,	r269700, r269896, r269962,
    r269989.

Catch bhyve up to CURRENT.

Lightly tested with FreeBSD i386/amd64,	Linux i386/amd64, and
OpenBSD/amd64. Still resolving an	issue with OpenBSD/i386.

Many thanks to jhb@ for	all the	hard work on the prior MFCs !

r267921 - support the "mov r/m8, imm8" instruction
r267934 - document options
r267949 - set DMI vers/date to fixed values
r267959 - doc: sort cmd flags
r267966 - EPT misconf post-mortem info
r268202 - use correct flag for event index
r268276 - 64-bit virtio capability api
r268427 - invalidate guest TLB when cr3 is updated, needed for TSS
r268428 - identify vcpu's operating mode
r268521 - use correct offset in guest logical-to-linear translation
r268638 - chs value
r268639 - chs fake values
r268701 - instr emul operand/address size override prefix support
r268777 - emulation for legacy x86 task switching
r268889 - nested exception support
r268922 - fix INVARIANTS build
r269008 - emulate instructions found in the OpenBSD/i386 5.5 kernel
r269042 - fix fault injection
r269043 - Reduce VMEXIT_RESTARTs in task_switch.c
r269080 - fix issues in PUSH emulation
r269094 - simplify return values from the inout handlers
r269108 - don't return -1 from the push emulation handler
r269109 - avoid permanent sleep in vm_handle_hlt()
r269281 - list VT-x features in base kernel dmesg
r269317 - Mark AHCI fatal errors as not completed
r269700 - Support PCI extended config space in bhyve
r269896 - Minor cleanup
r269962 - use max guest memory when creating IOMMU domain
r269989 - fix interrupt mode names
2014-08-19 01:20:24 +00:00
mav
f3589bc4f2 MFC r269183, r269191:
Add netmasks support to initiator-portal option.
2014-08-18 16:06:04 +00:00
rmacklem
cdfc4fb07a MFC: r269788
Document the use of the vfs.nfsd sysctls that control the size of
the NFS server's DRC for TCP.
This is a content change.
2014-08-17 19:24:26 +00:00
grehan
46d28d66fb MFC r267311, r267330, r267811, r267884
Turn on interrupt window exiting unconditionally when an ExtINT is being
injected into the guest.

Add helper functions to populate VM exit information for rendezvous and
astpending exits.

Provide APIs to directly get 'lowmem' and 'highmem' size directly.

Expose the amount of resident and wired memory from the guest's vmspace
2014-08-17 01:23:52 +00:00
grehan
7a365d2c05 MFC r267216
Add ioctl(VM_REINIT) to reinitialize the virtual machine state maintained
by vmm.ko. This allows the virtual machine to be restarted without having
to destroy it first.
2014-08-17 01:00:42 +00:00
grehan
e83027edbb MFC r266933
Activate vcpus from bhyve(8) using the ioctl VM_ACTIVATE_CPU instead of doing
it implicitly in vmm.ko.
2014-08-17 00:52:07 +00:00
gavin
2ad4eee5a8 Merge r266206 from head (by bjk):
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:		176832 [1]
2014-08-14 12:50:25 +00:00
gavin
9a525ec03f Merge r268728 from head:
When we fail to extract the pkg binaries (for example, / is read-only),
  give a more helpful error message.
2014-08-13 12:44:44 +00:00
gavin
60b4865344 Merge r268488 from head:
Reword an awkward option description

PR:		191726
Submitted by:	yaneurabeya gmail.com
2014-08-13 12:35:11 +00:00
imp
c7338ae617 MFC: Merge in the changes in -current:
Support ! operator in "files" files.
Improve error detection and reporting
Cleanup code to make it easier to maintain.
Remove mandatory keyword: it has been used for 17 years.
Bump version number (we should have bumped for -I too, but didn't)

	r261501 | imp | 2014-02-04 17:26:11 -0700 (Tue, 04 Feb 2014) | 5 lines
	Fix ! by not clearing not at the bottom of the loop.
	Add a blank line
	Submitted by:   bde (blank line)

	r261493 | imp | 2014-02-04 11:28:58 -0700 (Tue, 04 Feb 2014) | 5 lines
	Implement the '!' operator for files* files. It means 'include this
	only if the specified option is NOT specified.' Bump version because
	old config won't be able to cope with files* files that have this
	construct in them.

	r261446 | imp | 2014-02-03 12:14:36 -0700 (Mon, 03 Feb 2014) | 5 lines
	Convert the loop by gotos into a for loop to improve readability. I
	did this only with the inner loop for the token parsing, and not the
	outer loop which was understandable enough when the extra layers of
	looping went away...

	r261445 | imp | 2014-02-03 12:10:33 -0700 (Mon, 03 Feb 2014) | 4 lines
	Fix a bug introduced in r261437 that failed to honor "optional
	profiling-routine" to work, since profiling-routine is not really an
	option or a device, but a special case elsewhere in the code.

	r261444 | imp | 2014-02-03 11:56:41 -0700 (Mon, 03 Feb 2014) | 2 lines
	Slight cleanup to the error messaging to compress code vertically...

	r261442 | imp | 2014-02-03 11:31:51 -0700 (Mon, 03 Feb 2014) | 2 lines
	Better error messages when EOF is hit in the middle of a phrase.

	r261438 | imp | 2014-02-03 09:54:53 -0700 (Mon, 03 Feb 2014) | 5 lines
	Move the check for standard keyword + optional inclusion specifier to
	its proper location. Otherwise you could have 'file.c standard pci'
	without an error. This construct isn't in our tree, and has no well
	defined meaning.

	r261437 | imp | 2014-02-03 09:47:10 -0700 (Mon, 03 Feb 2014) | 4 lines
	Don't believe we have a requirement until after we've checked all the
	known key words. This will make error messages slightly better in
	weird corner cases, but should otherwise be a nop.

	r261436 | imp | 2014-02-03 09:46:01 -0700 (Mon, 03 Feb 2014) | 3 lines
	In the 17 years since r30796, the mandatory keyword has never been used
	in any files as far as I can tell, and is currently unused. Retire it.

	r261435 | imp | 2014-02-03 08:10:44 -0700 (Mon, 03 Feb 2014) | 6 lines
	Slightly deobfuscate read_file() and likely pessimize the runtime
	performance by epsilon.
	(Translation: elminate bogus macros that hid 'returns' making it hard
	 to read and moved a block of code inline rather than at the end of the
	 fuction where it was effectively a 'gosub' kind of goto).
2014-08-11 18:42:20 +00:00
smh
ffdde8cca2 MFC r269522
Added support for extra ifconfig args to jail ip4.addr & ip6.addr params

This allows for CARP interfaces to be  used in jails e.g.
ip4.addr = "em0|10.10.1.20/32 vhid 1 pass MyPass advskew 100"

r269340 will not be MFC'ed as mentioned due to the slim window and the
amount of additional commits required to support it.

Sponsored by:	Multiplay
2014-08-11 08:58:35 +00:00
rmacklem
647be50edb MFC: r268866
r243637 changed the default number of nfsd threads created,
but the man page did not reflect this.
This is a content change.
2014-08-02 20:06:36 +00:00
wblock
d357493f14 MFC 268931:
Correct spelling errors in ctld.8.  While here, correct similar errors
in ctl.conf.5 and fix a couple of contractions.
2014-07-31 14:53:07 +00:00
mav
dd34ac0859 MFC r268767:
Add support for VMWare dialect of EXTENDED COPY command, aka VAAI Clone.

This allows to clone VMs and move them between LUNs inside one storage
host without generating extra network traffic to the initiator and back,
and without being limited by network bandwidth.

LUNs participating in copy operation should have UNIQUE NAA or EUI IDs set.
For LUNs without these IDs VMWare will use traditional copy operations.

Beware: the above LUN IDs explicitly set to values non-unique from the VM
cluster point of view may cause data corruption if wrong LUN is addressed!

Sponsored by:	iXsystems, Inc.
2014-07-30 07:18:32 +00:00
des
fe6d937978 MFH (r266114, r266138): upgrade to latest ldns and unbound
MFH (r266139-r266143, r266145, r266149, r266150): fix props
MFH (r266179, r266180, r266193, r266238, r266777): misc cleanup
MFH (r266863): create and use /var/unbound/conf.d
MFH (r268839): import unblock-lan-zones patch from upstream
MFH (r268840): fix reverse lookups on private networks
MFH (r268883): avoid spamming source tree during build

PR:		190739 (for r268883)
2014-07-29 20:57:38 +00:00
mav
bc8d80ff4e MFC r268457 (by pluknet):
Fix typos.
2014-07-24 15:49:28 +00:00
mav
e65da97c90 MFC r268289:
Fix minor copy-paste bug in r268284.
2014-07-24 15:48:18 +00:00
mav
70c3d88292 MFC r267612 (by trasz):
Get rid of unneccessary argument.
2014-07-24 15:42:32 +00:00
mav
26b69cce3d MFC r267609 (by trasz):
Improve code a little; no functional changes.
2014-07-24 15:41:16 +00:00
mav
15ff7e1d3a MFC r267608 (by trasz):
Use proper term in debug messages.
2014-07-24 15:38:49 +00:00
mav
0a10281b81 MFC r266169 (by trasz):
Remove unused variable.
2014-07-24 15:37:31 +00:00
mav
65d6dfa894 MFC r267613 (by trasz):
Implement redirection handling in initiator.
2014-07-24 15:31:45 +00:00
emaste
35d9abcb8d MFC r265157: 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-07-23 14:30:58 +00:00
jhb
ce450da430 MFC 266424,266476,266524,266573,266595,266626,266627,266633,266641,266642,
266708,266724,266934,266935,268521:
Emulation of the "ins" and "outs" instructions.

Various fixes for translating guest linear addresses to guest physical
addresses.
2014-07-22 04:39:16 +00:00
jhb
c1fe945ebd MFC 266125:
Implement a PCI interrupt router to route PCI legacy INTx interrupts to
the legacy 8259A PICs.
2014-07-22 03:14:37 +00:00
jhb
e6b48465b7 MFC 264353,264509,264768,264770,264825,264846,264988,265114,265165,265365,
265941,265951,266390,266550,266910:
Various bhyve fixes:
- Don't save host's return address in 'struct vmxctx'.
- Permit non-32-bit accesses to local APIC registers.
- Factor out common ioport handler code.
- Use calloc() in favor of malloc + memset.
- Change the vlapic timer frequency to be in the ballpark of contemporary
  hardware.
- Allow the guest to read the TSC via MSR 0x10.
- A VMCS is always inactive when it exits the vmx_run() loop.  Remove
  redundant code and the misleading comment that suggest otherwise.
- Ignore writes to microcode update MSR.  This MSR is accessed by RHEL7
  guest.
  Add KTR tracepoints to annotate wrmsr and rdmsr VM exits.
- Provide an alias for the userboot console and name it 'comconsole'.
- Use EV_ADD to create an mevent and EV_ENABLE to enable it.
- abort(3) the process in response to a VMEXIT_ABORT.
- Don't include the guest memory segments in the bhyve(8) process core dump.
- Make the vmx asm code dtrace-fbt-friendly.
- Allow vmx_getdesc() and vmx_setdesc() to be called for a vcpu that is in
  the VCPU_RUNNING state.
- Enable VMX in the IA32_FEATURE_CONTROL MSR if it not enabled and the MSR
  isn't locked.
2014-07-21 19:08:02 +00:00
jhb
044fcd5dc2 MFC 264275:
Explicitly initialize 'vmname' to NULL.
2014-07-21 18:23:48 +00:00
jhb
888f6511e3 MFC 263780,264516,265062,265101,265203,265364:
Add an ioctl to suspend a virtual machine (VM_SUSPEND).

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.

This logic can be disabled via the tunable 'hw.vmm.halt_detection'.
2014-07-21 02:39:17 +00:00
jhb
d034cf40e5 MFC 264916,267611:
Provide a very basic stub for the 8042 PS/2 keyboard controller.
2014-07-21 02:17:28 +00:00
jhb
cf1a222326 MFC 260847,264055,264867:
- Add a very simple virtio_random(4) driver for FreeBSD guests to harvest
  entropy from hypervisors.
- Add support to bhyve for the virtio RNG entropy-source device to provide
  entry to bhyve guests.
2014-07-21 00:21:56 +00:00
jhb
25b41d0882 MFC 262331,262487,262495,262523:
ZFS boot support for bhyveload.
2014-07-20 22:54:03 +00:00
bapt
9822066797 MFC: r263650, r263686
Add missing dependency on libm
2014-07-20 10:54:45 +00:00
mav
394f34f485 MFC r268795:
Fix ctld crash on startup if target alias is not set.
2014-07-20 07:35:00 +00:00
bapt
6f718e3669 MFC: r263648, r264789, r266636
This brings:
- schema validation
- xpath-like interface for ucl objects

Adapt pkg(7) to the new libucl API
2014-07-19 23:44:57 +00:00
jhb
6095428430 MFC 263432,265366,265376:
Fixes for vcpu management in bhyve:
- Use 'cpuset_t' to represent the vcpus active in a virtual machine.
- Modify the "-p" option to be more flexible when associating a 'vcpu' with
  a 'hostcpu'.
2014-07-19 22:24:29 +00:00
jhb
da07382880 MFC 262884,263236,265407:
Various uart fixes:
- Open the uart emulation's backing tty in non-blocking mode.
- Support 16-bit register access.
- Disable the 'uart_drain()' callback when the emulated receive FIFO
  is full.
2014-07-19 22:13:12 +00:00
jhb
3da9c304ee MFC 259942,262274,263035,263054,263211,263744,264179,264324,264468,264631,
264648,264650,264651,266572,267558:
Flesh out the AT PIC and 8254 PIT emulations and move them into the kernel.
2014-07-19 22:06:46 +00:00
jhb
ba55949ac3 MFC 261904,261905,262143,262184,264921,265211,267169,267292,267294:
Various PCI fixes:
- Allow PCI devices to be configured on all valid bus numbers from 0 to 255.
- Tweak the handling of PCI capabilities in emulated devices to remove
  the non-standard zero capability list terminator.
- Add a check to validate that memory BARs of passthru devices are 4KB
  aligned.
- Respect and track the enable bit in the PCI configuration address word.
- Handle quad-word access to 32-bit register pairs.
2014-07-19 20:13:01 +00:00
delphij
08c695a76f MFC r268238:
Add an option, -p, which makes gstat(8) to only display physical providers
(those with rank of 1).
2014-07-17 06:36:22 +00:00
gavin
023ca0c8f6 Merge r268298,r268299 from head:
Correct format string to fix build of uhsoctl when DEBUG is defined

PR:		185007
Submitted by:	saper saper.info
2014-07-16 12:57:53 +00:00
mav
e6aad79578 MFC r268326:
Make iSCSI initiator keep Initiator Session ID (ISID) across reconnects.

Previously ISID was changed every time, that made impossible correct
persistent reservation, because reconnected session was identified as
completely new one.
2014-07-15 18:21:26 +00:00
mav
c0be426ce6 MFC r268447:
Add LUN options to specify 64-bit EUI and NAA identifiers.
2014-07-15 17:20:40 +00:00
mav
7bd4e3c249 MFC r268363:
Add support for READ FULL STATUS action of PERSISTENT RESERVE IN command.
2014-07-15 17:16:06 +00:00
mav
100d0f0aa6 MFC r268328:
Close race in r268291 between port destruction, delayed by sessions
teardown, and new port creation during `service ctld restart`.

Close it by returning iSCSI port internal state, that allows to identify
dying ports, which should not be counted as existing, from really alive.
2014-07-15 17:10:48 +00:00
mav
0468376762 MFC r268302:
Pass through iSCSI session ISID from LOGIN request to the CTL frontend.

ISID is an important part of initiator transport ID for iSCSI.  It is not
used now, but should be to properly implement persistent reservation.
2014-07-15 17:07:07 +00:00
mav
f1200cac15 MFC r268293:
Burry devid port method, which was a gross hack.

Instead make ports provide wanted port and target IDs, and LUNs provide
wanted LUN IDs.  After that core Device ID VPD code only had to link all
of them together and add relative port and port group numbers.

LUN ID for iSCSI LUNs no longer created by CTL, but by ctld, and passed
to CTL as "scsiname" LUN option.  This makes LUNs to report the same set
of IDs, independently from the port through which it is accessed, as
required by SCSI specifications.
2014-07-15 17:06:10 +00:00
mav
b40b547aa1 MFC r268291:
Create separate CTL port for every iSCSI target (and maybe portal group).

Having single port for all iSCSI connections makes problematic implementing
some more advanced SCSI functionality in CTL, that require proper ports
enumeration and identification.

This change extends CTL iSCSI API, making ctld daemon to control list of
iSCSI ports in CTL.  When new target is defined in config fine, ctld will
create respective port in CTL.  When target is removed -- port will be
also removed after all active commands through that port properly aborted.
This change require ctld to be rebuilt to match the kernel.

As a minor side effect, this allows to have iSCSI targets without LUNs.
While that may look odd and not very useful, that is not incorrect.
2014-07-15 17:05:11 +00:00
mav
7da5c8a0d6 MFC r268284:
Introduce new IOCTL CTL_PORT_LIST reporting in more flexible XML format.

Leave old CTL_GET_PORT_LIST in place so far.  Garbage-collect it later.
2014-07-15 16:59:46 +00:00
ray
74b8e10dc8 267622 Log:
Rename vt(4) vga module to dismiss interference with syscons(4) vga module.
267623 Log:
  Remove stale link to deleted vt(4) xboxfb driver.
267624 Log:
  syscons(4) and vt(4) can be built together now.
267625 Log:
  Allow to disable syscons(4) if "hw.syscons.disable" kenv is set.
267626 Log:
  Suspend vt(4) initialization if "kern.vt.disable" kenv is set.
267965 by emaste@ Log:
  Use a common tunable to choose between vt(4)/sc(4)
  With this change and previous work from ray@ it will be possible to put
  both in GENERIC, and have one enabled by default, but allow the other to
  be selected via the loader.
  (The previous implementation had separate kern.vt.disable and
  hw.syscons.disable tunables, and would panic if both drivers were
  compiled in and neither was explicitly disabled.)
268175 by emaste@ Log:
  Fix vt(4) detection in kbdcontrol and vidcontrol
  As sc(4) and vt(4) coexist and are both enabled in GENERIC, the existence
  of a vt(4) sysctl is not sufficient to determine that vt(4) is in use.
  Reported by:  Trond Endrestøl
268045 by emaste@ Log:
  Add vt(4) to GENERIC and retire the separate VT config
  vt(4) and sc(4) can now coexist in the same kernel.  To choose the vt
  driver, set the loader tunable kern.vty=vt .

Sponsored by:	The FreeBSD Foundation
2014-07-07 14:16:05 +00:00
bapt
6763aa7bd2 MFH: r264781, r267669, r267670
Simplify reading pw.conf(5) by using getline(3)

Removed compatibility with pre FreeBSD 2.2 pw_mkdb command [1]
Fix some broken indentattion [1]

Fix changing the username [2]

PR:		189172 [1], 189173 [2]
Submitted by:	fullermd@over-yonder.net [1][2]
2014-07-06 23:24:06 +00:00
mav
3b926638cf MFC r267648:
serial_num and device_id fields are not necessarily null-terminated.

Before this it was impossible to use all 16 bytes of serial number, and
client always got serial number NULL-terminated, that is not required.
2014-07-04 16:17:15 +00:00
dteske
4f317bd085 MFC r267680:
Fix a code typo that prevented mkdir from firing (unnoticed
usually because another part of the code succeeded in making
the same directory).
2014-07-02 19:25:25 +00:00
kib
62024097ea MFC r267651 (by attilio):
Add the possibility to specify ecx when performing cpuid calls.

MFC r267673:
Restore the ABI of the cpuctl(4) ioctl request CPUCTL_CPUID.

MFC r267814:
Make cpuctl_do_cpuid() and cpuctl_do_cpuid_count() return void.
2014-07-02 13:09:26 +00:00
mav
712f53c0c4 MFC r267516i (by joel):
mdoc: add missing width to Bl -tag.
2014-07-02 10:49:06 +00:00
mav
cdc0d0159f MFC r267506:
Document additional LUN/backend options.
2014-07-02 10:48:06 +00:00
mav
2b0cbbb52b MFC r267606:
On discovery stage add set of TargetAddress keys to reply, reporting to
the client all the portal groups addresses and ports.
2014-07-02 10:18:42 +00:00
delphij
efafd0ece4 MFC r267493:
Fix two issues:

 - Check for rc.d directory's existence before traversing
   it;
 - Don't output * when rc.d directory is empty.

PR:		bin/190665
Submitted by:	Oleg Ginzburg <olevole olevole ru> (with changes)
2014-07-01 15:50:34 +00:00
jpaetzel
79ef481e2b MFC: 267833
Fix issues in config parser relating to lun serial numbers.

Without this fix some serial numbers needed to be quoted
to avoid the config parser bailing out.

Submitted by:	delphij
Sponsored by:	iXsystems
2014-06-27 17:10:28 +00:00
jhb
b9c113aadd MFC 264277:
Handle single-byte reads from the bvmcons port (0x220) by returning
0xff.  Some guests may attempt to read from this port to identify
psuedo-PNP ISA devices.  (The ie(4) driver in FreeBSD/i386 is one
example.)
2014-06-26 19:19:06 +00:00
ray
d518940c2d MFC: 266836, 266839
vt(4) support for vidcontrol(1).
  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.
vt(4) support for kbdcontrol(1).
  Enable kbdcontrol(1) to use maps from vt(4) keymaps dir /usr/share/vt/keymaps
  if vt(4) is present.

Sponsored by:	The FreeBSD Foundation
2014-06-16 11:51:00 +00:00
jhb
30000c41d7 MFC 262744:
Add SMBIOS support.

A new option, -U, can be used to set the UUID in the System
Information (Type 1) structure.
2014-06-13 21:30:40 +00:00
jhb
f6a797dc57 MFC 262139,262140,262236,262281,262532:
Various x2APIC fixes and enhancements:
- Use spinlocks for the vioapic.
- Handle the SELF_IPI MSR.
- Simplify the APIC mode switching between MMIO and x2APIC.  The guest is
  no longer allowed to switch modes at runtime.  Instead, the desired mode
  is set when the virtual machine is created.
- Disallow MMIO access in x2APIC mode and MSR access in xAPIC mode.
- Add support for x2APIC virtualization assist in Intel VT-x.
2014-06-13 19:10:40 +00:00
jhb
3e1f2ae835 MFC 261638,262144,262506,266765:
Add virtualized XSAVE support to bhyve which permits guests to use XSAVE and
XSAVE-enabled features like AVX.
- Store a per-cpu guest xcr0 register and handle xsetbv VM exits by emulating
  the instruction.
- Only expose XSAVE to guests if XSAVE is enabled in the host.  Only expose
  a subset of XSAVE features currently supported by the guest and for which
  the proper emulation of xsetbv is known.  Currently this includes X87, SSE,
  AVX, AVX-512, and Intel MPX.
- Add support for injecting hardware exceptions into the guest and use this
  to trigger exceptions in the guest for invalid xsetbv operations instead
  of potentially faulting in the host.
- Queue pending exceptions in the 'struct vcpu' instead of directly updating
  the processor-specific VMCS or VMCB. The pending exception will be delivered
  right before entering the guest.
- Rename the unused ioctl VM_INJECT_EVENT to VM_INJECT_EXCEPTION and restrict
  it to only deliver x86 hardware exceptions. This new ioctl is now used to
  inject a protection fault when the guest accesses an unimplemented MSR.
- Expose a subset of known-safe features from leaf 0 of the structured
  extended features to guests if they are supported on the host including
  RDFSBASE/RDGSBASE, BMI1/2, AVX2, AVX-512, HLE, ERMS, and RTM.  Aside
  from AVX-512, these features are all new instructions available for use
  in ring 3 with no additional hypervisor changes needed.
2014-06-12 19:58:12 +00:00
jhb
cebc7c305f MFC 262311: Fix virtio spec URL. 2014-06-12 15:24:33 +00:00
jhb
fa121e2a05 MFC 261504:
Add support for FreeBSD/i386 guests under bhyve.
2014-06-12 15:20:59 +00:00
jhb
d87aa1ec6e MFC 261229:
o Fix typo, sort .Xrs.

PR:		docs/186191
2014-06-12 13:17:11 +00:00
jhb
835cb387cc MFC 260239,261268,265058:
Expand the support for PCI INTx interrupts including providing interrupt
routing information for INTx interrupts to I/O APIC pins and enabling
INTx interrupts in the virtio and AHCI backends.
2014-06-12 13:13:15 +00:00
jhb
e2cfb98334 MFC 261217:
Remove support for legacy PCI devices.  These haven't been needed since
support for LPC uart devices was added and it conflicts with upcoming
patches to add PCI INTx support.

Approved by:	grehan
2014-06-10 21:20:37 +00:00
jhb
986f765d45 MFC 261000,261785,263238,263322,264302:
Various AHCI fixes:
- Fix issue with stale fields from a recycled request pulled off the
  freelist.
- Provide an indication a "PIO Setup Device to Host FIS" occurred while
  executing the IDENTIFY DEVICE and IDENTIFY PACKET DEVICE commands.
- Provide an indication a "D2H Register FIS" occurred during a SET FEATURES
  command.
- Though there currently isn't a way to insert new media into an ATAPI
  drive, at least pretend to support Asynchronous Notification (AN) to
  avoid a guest needlessly polling for it.
- Don't reissue in-flight commands.
- Constrain the amount of data returned to what is actually available
  not the size of the buffer.
2014-06-10 19:00:14 +00:00
brueffer
597700b022 MFC: r266931
Grammar cleanup; sort SEE ALSO.
2014-06-07 19:12:43 +00:00
emaste
f6c16fe464 MFC r266903: Update default callchain depth to 16 to match kernel 2014-06-06 01:35:52 +00:00
bdrewery
c2e2f22c39 MFC r266463:
- Include /etc/newsyslog.conf.d/* and /usr/local/etc/newsyslog.conf.d/* by
    default for newsyslog(8).
2014-06-05 15:21:25 +00:00
jhb
9464d250b6 MFC 260999:
Increase the block-layer backend maximum number of requests to match
the AHCI command queue depth.
2014-06-04 18:08:08 +00:00
roberto
3af9d4776e 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
2014-06-04 15:31:57 +00:00
roberto
912232c83b MFC r266107,r266108,r266109:
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)

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.

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
Sponsored by:	ScaleEngine Inc.
2014-06-04 14:58:51 +00:00
hselasky
0718341c3a MFC r266798 and r266803:
Fix for big-endian architectures.
2014-06-04 10:33:30 +00:00
mav
40e2c2f2d8 MFC r266468:
Add IOMMU PCI subclass, found on Tyan S8236 motherboard.

Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
2014-06-03 06:48:35 +00:00
jilles
5b93c96241 MFC r264480: mergemaster: Avoid "/var/tmp/temproot disappeared" if there is
nothing to compare.

Because of the change to find in SVN r253886, the entire temproot would be
deleted if it became empty, leading to a confusing message "*** FATAL ERROR:
The temproot directory ${TEMPROOT} has disappeared!"

Note that mergemaster does not do anything useful in this situation anyway
(e.g. put IGNORE_FILES="/etc/group /etc/master.passwd" in
/etc/mergemaster.rc and run mergemaster -p).

As noted in that commit, add -mindepth 1.

PR:		bin/188485
Submitted by:	David Boyd
2014-06-01 18:52:21 +00:00
gnn
cc6785bd5f MFC: 266209
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>
Relnotes:	yes
2014-05-30 15:02:29 +00:00
gnn
96656f614a MFC: 266166
Extend the size of the function or symbol that can be annotated.
2014-05-30 15:00:50 +00:00
mav
806f6922ee MFC r266320:
Add -o option to gstat to display "other" operatins (e.g. BIO_FLUSH).
2014-05-24 10:37:56 +00:00
jhb
0a175e57d1 MFC 260469:
Fix issue with the virtio descriptor region being truncated
if it was above 4GB.
2014-05-23 19:06:35 +00:00
emaste
e761352067 MFC r266208: 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-23 17:46:00 +00:00
dteske
4ea8710a4b MFC r266297: Update example portion of comment to coincide with r264840 2014-05-22 22:10:16 +00:00
jhb
4670db3f86 MFC 264765,264766:
- Don't claim the adapter is idle if it is clearing a drive.
- Fix an off by one error when checking for the stop event.  This
  resulted in not showing the most recent event by default.
- When the stop even is hit, break out of the outer loop to stop
  fetching more events.
2014-05-18 15:28:25 +00:00
jhb
5e2f766c6c MFC 259737, 262646:
Fix a couple of issues with vcpu state:
- Add a parameter to 'vcpu_set_state()' to enforce that the vcpu is in the
  IDLE state before the requested state transition. This guarantees that
  there is exactly one ioctl() operating on a vcpu at any point in time and
  prevents unintended state transitions.
- Fix a race between VMRUN() and vcpu_notify_event() due to 'vcpu->hostcpu'
  being updated outside of the vcpu_lock().
2014-05-18 04:33:24 +00:00
jhb
bbf655f9b4 MFC 259641,259863,259924,259937,259961,259978,260380,260383,260410,260466,
260531,260532,260550,260619,261170,261453,261621,263280,263290,264516:
Add support for local APIC hardware-assist.
- Restructure vlapic access and register handling to support hardware-assist
  for the local APIC.
- Use the 'Virtual Interrupt Delivery' and 'Posted Interrupt Processing'
  feature of Intel VT-x if supported by hardware.
- Add an API to rendezvous all active vcpus in a virtual machine and use
  it to support level triggered interrupts with VT-x 'Virtual Interrupt
  Delivery'.
- Use a cheaper IPI handler than IPI_AST for nested page table shootdowns
  and avoid doing unnecessary nested TLB invalidations.

Reviewed by:	neel
2014-05-17 19:11:08 +00:00
dteske
938242c727 MFC r264841: Update zfsboot to coincide with MFC of r264840
adding GEOM support.
2014-05-17 03:59:01 +00:00
dteske
5dd59bc6ac MFC r264840: Implement GEOM based media device classification. 2014-05-17 03:28:43 +00:00
sbruno
ebb52114cf MFC r264269, r264282, r264280, r264291, r264276, r264314
Merge sson's binmiscctl and image activator features to stable/10

Submitted by:	sson@freebsd.org
2014-05-16 21:56:33 +00:00
loos
faac8f5770 MFC r258044, r258679, r263990
Adds gpioiic.4 and gpioled.4 man pages.  Moves some of the information that
was previously available on gpio.4 to their respectives pages.  Add the
cross references on gpioctl.8.

Add gpiobus(4) as a link to gpio(4).
2014-05-14 23:33:38 +00:00
jh
93d38c10ec MFC r264194:
Fork a child process and wait until the process terminates when the -P
option is specified. This behavior is documented on the manual page.

PR:		bin/187265
2014-05-09 15:55:45 +00:00
delphij
1b18a5ca98 MFC r264740:
Use case insensitive match in portsnap.

PR:		bin/186510
Submitted by:	olli
2014-05-09 07:07:25 +00:00
scottl
76892e1ddc Merged r262424-262425,265085
Add the -a option to pmcstat.  This produces a full stack track on the
sampled points.  See the man page for details on how this works.

Obtained from:  Netflix, Inc.
2014-05-07 20:20:52 +00:00
trasz
73fdbcd002 MFC r264877:
Style fixes.

Sponsored by:	The FreeBSD Foundation
2014-05-07 08:00:59 +00:00
trasz
721f1b951c MFC r264604:
Remove redundant code.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:57:53 +00:00
trasz
c8af11f514 MFC r264549:
Make it possible for the initiator side to operate in both proxy
and normal mode; this makes it possible to compile with the former
by default, but use it only when neccessary.  That's especially
important for the userland part.

Sponsored by:	The FreeBSD Foundation
2014-05-07 07:56:36 +00:00