History log of /freebsd-10-stable/usr.sbin/bhyvectl/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
295124 01-Feb-2016 grehan

MFC r284539, r284630, r284688, r284877, r285217, r285218,
r286837, r286838, r288470, r288522, r288524, r288826,
r289001

Pull in bhyve bug fixes and changes to allow UEFI booting.
This provides Windows support.

Tested on Intel and AMD with:
- Arch Linux i386+amd64 (kernel 4.3.3)
- Ubuntu 15.10 server 64-bit
- FreeBSD-CURRENT/amd64 20160127 snap
- FreeBSD 10.2 i386+amd64
- OpenBSD 5.8 i386+amd64
- SmartOS latest
- Windows 10 build 1511'

Huge thanks to Yamagi Burmeister who submitted the patch
and did the majority of the testing.

r284539 - bootrom mem allocation support
r284630 - Add SO_REUSEADDR when starting debug port
r284688 - Fix a regression in "movs" emulation
r284877 - verify_gla() non-zero segment base fix
r285217 - Always assert DCD and DSR in the uart
r285218 - devmem nodes moved to /dev/vmm.io/
r286837 - Add define for SATA Check-Power-Mode
r286838 - Add simple (no-op) SATA cmd emulations
r288470 - Increase virtio-blk indirect descs
r288522 - Firmware guest query interface
r288524 - Fix post-test typo
r288826 - Clean up SATA unimplemented cmd msg
r289001 - Add -l option to specify userboot path

Submitted by: Yamagi Burmeister
Approved by: re (kib)

294790 26-Jan-2016 brueffer

MFH: r293745

Add a basic bhyvectl manpage.

284900 28-Jun-2015 neel

MFC r282209:
Emulate the 'bit test' instruction.

MFC r282259:
Re-implement RTC current time calculation to eliminate the possibility of
losing time.

MFC r282281:
Advertise the MTRR feature via CPUID and emulate the minimal set of MTRR MSRs.

MFC r282284:
When an instruction cannot be decoded just return to userspace so bhyve(8)
can dump the instruction bytes.

MFC r282287:
Don't require <sys/cpuset.h> to be always included before <machine/vmm.h>.

MFC r282296:
Emulate MSR_SYSCFG which is accessed by Linux on AMD cpus when MTRRs are
enabled.

MFC r282301:
Relax limits when transitioning a vector from the IRR to the ISR and also
when extinguishing it from the ISR in response to an EOI.

MFC r282335:
Advertise an additional memory BAR in the "dummy" device emulation.

MFC r282336:
Emulate machine check related MSRs to allow guest OSes like Windows to boot.

MFC r282351:
Don't advertise the Intel SMX capability to the guest.

MFC r282407:
Emulate the 'CMP r/m8, imm8' instruction.

MFC r282519:
Add macros for AMD-specific bits in MSR_EFER: LMSLE, FFXSR and TCE.

MFC r282520:
Emulate guest writes to EFER_MSR properly.

MFC r282558:
Deprecate the 3-way return values from vm_gla2gpa() and vm_copy_setup().

MFC r282571:
Check 'td_owepreempt' and yield the vcpu thread if it is set.

MFC r282595:
Allow byte reads of AHCI registers.

MFC r282784:
Handling indirect descriptors is a capability of the host and not one that
needs to be negotiated. Use the host capabilities field and not the negotiated
field when verifying that indirect descriptors are supported.

MFC r282788:
Allow configuration of the sector size advertised to the guest.

MFC r282865:
Set the subvendor field in config space to the vendor ID. This is required
by the Windows virtio drivers to correctly match a device.

MFC r282922:
Bump the size of the blockif scatter-gather list to 67.

MFC r283075:
Fix off-by-one in array index bounds check. bhyveload would allow you to
create 33 entries on an array that only has 32 slots

MFC r283168:
Temporarily revert r282922 which bumped the max descriptors.

MFC r283255:
Emulate the "CMP r/m, reg" instruction (opcode 39H).

MFC r283256:
Add an option "--get-vmcs-exit-inst-length" to display the instruction length
of the instruction that caused the VM-exit.

MFC r283264:
Change the header type of the emulated host-bridge from type 1 to type 0.

MFC r283293:
Don't rely on the 'VM-exit instruction length' field in the VMCS to always
have an accurate length on an EPT violation.

MFC r283299:
Remove bogus verification of instruction length after instruction decode.

MFC r283308:
Exceptions don't deliver an error code in real mode.

MFC r283657:
Fix non-deterministic delays when accessing a vcpu that was in "running" or
"sleeping" state.

MFC r283973:
Use tunable 'hw.vmm.svm.features' to disable specific SVM features even
though they might be available in hardware. Use tunable 'hw.vmm.svm.num_asids'
to limit the number of ASIDs used by the hypervisor.

MFC r284046:
Fix regression in 'verify_gla()' with the RIP-relative addressing mode.

MFC r284174:
Support guest writes to the TSC by enabling the "use TSC offsetting"
execution control.


/freebsd-10-stable/lib/libvmmapi/vmmapi.c
/freebsd-10-stable/lib/libvmmapi/vmmapi.h
/freebsd-10-stable/sys/amd64/include/vmm.h
/freebsd-10-stable/sys/amd64/include/vmm_instruction_emul.h
/freebsd-10-stable/sys/amd64/vmm/amd/amdv.c
/freebsd-10-stable/sys/amd64/vmm/amd/svm.c
/freebsd-10-stable/sys/amd64/vmm/amd/svm_msr.c
/freebsd-10-stable/sys/amd64/vmm/amd/vmcb.c
/freebsd-10-stable/sys/amd64/vmm/intel/vmx.c
/freebsd-10-stable/sys/amd64/vmm/intel/vmx.h
/freebsd-10-stable/sys/amd64/vmm/intel/vmx_msr.c
/freebsd-10-stable/sys/amd64/vmm/io/vatpic.c
/freebsd-10-stable/sys/amd64/vmm/io/vatpit.c
/freebsd-10-stable/sys/amd64/vmm/io/vhpet.c
/freebsd-10-stable/sys/amd64/vmm/io/vioapic.c
/freebsd-10-stable/sys/amd64/vmm/io/vlapic.c
/freebsd-10-stable/sys/amd64/vmm/io/vpmtmr.c
/freebsd-10-stable/sys/amd64/vmm/io/vrtc.c
/freebsd-10-stable/sys/amd64/vmm/vmm.c
/freebsd-10-stable/sys/amd64/vmm/vmm_dev.c
/freebsd-10-stable/sys/amd64/vmm/vmm_instruction_emul.c
/freebsd-10-stable/sys/amd64/vmm/vmm_ioport.c
/freebsd-10-stable/sys/amd64/vmm/vmm_stat.c
/freebsd-10-stable/sys/amd64/vmm/vmm_stat.h
/freebsd-10-stable/sys/amd64/vmm/x86.c
/freebsd-10-stable/sys/amd64/vmm/x86.h
/freebsd-10-stable/sys/x86/include/specialreg.h
/freebsd-10-stable/usr.sbin/bhyve/bhyve.8
/freebsd-10-stable/usr.sbin/bhyve/bhyverun.c
/freebsd-10-stable/usr.sbin/bhyve/block_if.c
/freebsd-10-stable/usr.sbin/bhyve/inout.c
/freebsd-10-stable/usr.sbin/bhyve/pci_ahci.c
/freebsd-10-stable/usr.sbin/bhyve/pci_emul.c
/freebsd-10-stable/usr.sbin/bhyve/pci_hostbridge.c
/freebsd-10-stable/usr.sbin/bhyve/pci_virtio_block.c
/freebsd-10-stable/usr.sbin/bhyve/pci_virtio_net.c
/freebsd-10-stable/usr.sbin/bhyve/pci_virtio_rnd.c
/freebsd-10-stable/usr.sbin/bhyve/task_switch.c
/freebsd-10-stable/usr.sbin/bhyve/virtio.c
bhyvectl.c
/freebsd-10-stable/usr.sbin/bhyveload/bhyveload.c
284899 28-Jun-2015 neel

MFC r279444:
Allow passthrough devices to be hinted.

MFC r279683:
When ICW1 is issued the edge sense circuit is reset which means that
following an initialization a low-to-high transistion is necesary to
generate an interrupt.

MFC r279925:
Add -p parameter to list PCI device to pass through to the guest.

MFC r281559:
Fix handling of BUS_PROBE_NOWILDCARD in 'device_probe_child()'.

MFC r280447:
When fetching an instruction in non-64bit mode, consider the value of the
code segment base address.

MFC r280725:
Move legacy interrupt allocation for virtio devices to common code.

MFC r280775:
Fix the RTC device model to operate correctly in 12-hour mode.

MFC r280929:
Fix "MOVS" instruction memory to MMIO emulation.

MFC r280968:
Display instruction bytes and %rip prior to aborting due to an instruction
emulation error.

MFC r281145:
Enhance the support for Group 1 Extended opcodes for CMP, AND, OR instructions.

MFC r281542:
Initialize 'error' before use (Coverity IDs 1249748, 1249747, 1249751, 1249749)

MFC r281561:
Prior to aborting due to an ioport error, it is always interesting to see what
the guest's %rip is.

MFC r281611:
If the number of guest vcpus is less than '1' then flag it as an error.

MFC r281612:
Prefer 'vcpu_should_yield()' over checking 'curthread->td_flags' directly.

MFC r281630:
Relax the check on which vectors can be delivered through the APIC. According
to the Intel SDM vectors 16 through 255 are allowed to be delivered via the
local APIC.

MFC r281879:
Missing break in switch case (Coverity ID 1292499)

MFC r281946:
Don't allow guest to modify readonly bits in the PCI config 'status' register.

MFC r281987:
STOS/STOSB/STOSW/STOSD/STOSQ instruction emulation.

MFC r282206:
Implement the century byte in the RTC.

284894 27-Jun-2015 neel

MFC r276428:
Replace bhyve's minimal RTC emulation with a fully featured one in vmm.ko.

MFC r276432:
Initialize all fields of 'struct vm_exception exception' before passing it
to vm_inject_exception().

MFC r276763:
Clear blocking due to STI or MOV SS in the hypervisor when an instruction is
emulated or when the vcpu incurs an exception.

MFC r277149:
Clean up usage of 'struct vm_exception' to only to communicate information
from userspace to vmm.ko when injecting an exception.

MFC r277168:
Fix typo (missing comma).

MFC r277309:
Make the error message explicit instead of just printing the usage if the
virtual machine name is not specified.

MFC r277310:
Simplify instruction restart logic in bhyve.

MFC r277359:
Fix a bug in libvmmapi 'vm_copy_setup()' where it would return success even
if the 'gpa' was in the guest MMIO region.

MFC r277360:
MOVS instruction emulation.

MFC r277626:
Add macro to identify AVIC capability (advanced virtual interrupt controller)
in AMD processors.

MFC r279220:
Don't close a block context if it couldn't be opened avoiding a null deref.

MFC r279225:
Add "-u" option to bhyve(8) to indicate that the RTC should maintain UTC time.

MFC r279227:
Emulate MSR 0xC0011024 when running on AMD processors.

MFC r279228:
Always emulate MSR_PAT on Intel processors and don't rely on PAT save/restore
capability of VT-x. This lets bhyve run nested in older VMware versions that
don't support the PAT save/restore capability.

MFC r279540:
Fix warnings/errors when building vmm.ko with gcc.

276486 31-Dec-2014 ngie

MFC r264400,r265836:

r264400:

NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
and finish the job. ncurses is now the only Makefile in the tree that
uses it since it wasn't a simple mechanical change, and will be
addressed in a future commit.

r265836:

Remove last two NO_MAN= in the tree. In both of these cases, MAN= is
what is needed.


/freebsd-10-stable/cddl/usr.bin/sgsmsg/Makefile
/freebsd-10-stable/cddl/usr.bin/zinject/Makefile
/freebsd-10-stable/cddl/usr.bin/zlook/Makefile
/freebsd-10-stable/cddl/usr.bin/ztest/Makefile
/freebsd-10-stable/cddl/usr.sbin/zhack/Makefile
/freebsd-10-stable/contrib/libucl/Makefile.am
/freebsd-10-stable/contrib/libucl/doc/Makefile.am
/freebsd-10-stable/contrib/libucl/tests/Makefile.am
/freebsd-10-stable/contrib/libucl/utils/Makefile.am
/freebsd-10-stable/contrib/ofed/usr.bin/ibsendtrap/Makefile
/freebsd-10-stable/contrib/ofed/usr.lib/libsdp/Makefile
/freebsd-10-stable/crypto/heimdal/appl/Makefile.am
/freebsd-10-stable/crypto/heimdal/appl/ftp/Makefile.am
/freebsd-10-stable/crypto/heimdal/appl/ftp/common/Makefile.am
/freebsd-10-stable/crypto/heimdal/lib/Makefile.am
/freebsd-10-stable/crypto/heimdal/lib/ipc/Makefile.am
/freebsd-10-stable/games/fortune/unstr/Makefile
/freebsd-10-stable/games/ppt/Makefile
/freebsd-10-stable/games/primes/Makefile
/freebsd-10-stable/gnu/usr.bin/cc/c++/Makefile
/freebsd-10-stable/gnu/usr.bin/cc/c++filt/Makefile
/freebsd-10-stable/gnu/usr.bin/cc/cc1/Makefile
/freebsd-10-stable/gnu/usr.bin/cc/cc1plus/Makefile
/freebsd-10-stable/gnu/usr.bin/cc/collect2/Makefile
/freebsd-10-stable/gnu/usr.bin/cc/protoize/Makefile
/freebsd-10-stable/gnu/usr.bin/gdb/Makefile.inc
/freebsd-10-stable/gnu/usr.bin/gdb/gdbtui/Makefile
/freebsd-10-stable/gnu/usr.bin/groff/src/devices/grohtml/Makefile
/freebsd-10-stable/gnu/usr.bin/groff/src/preproc/html/Makefile
/freebsd-10-stable/kerberos5/libexec/digest-service/Makefile
/freebsd-10-stable/kerberos5/libexec/ipropd-slave/Makefile
/freebsd-10-stable/kerberos5/tools/asn1_compile/Makefile
/freebsd-10-stable/kerberos5/tools/make-roken/Makefile
/freebsd-10-stable/kerberos5/tools/slc/Makefile
/freebsd-10-stable/kerberos5/usr.bin/hxtool/Makefile
/freebsd-10-stable/kerberos5/usr.bin/ksu/Makefile
/freebsd-10-stable/lib/libarchive/test/Makefile
/freebsd-10-stable/lib/libauditd/Makefile
/freebsd-10-stable/lib/libproc/Makefile
/freebsd-10-stable/lib/libproc/test/t1-bkpt/Makefile
/freebsd-10-stable/lib/libproc/test/t2-name2map/Makefile
/freebsd-10-stable/lib/libproc/test/t3-name2sym/Makefile
/freebsd-10-stable/lib/ncurses/form/Makefile
/freebsd-10-stable/lib/ncurses/menu/Makefile
/freebsd-10-stable/lib/ncurses/ncurses/Makefile
/freebsd-10-stable/lib/ncurses/panel/Makefile
/freebsd-10-stable/libexec/bootpd/bootpgw/Makefile
/freebsd-10-stable/libexec/ulog-helper/Makefile
/freebsd-10-stable/release/picobsd/tinyware/aps/Makefile
/freebsd-10-stable/release/picobsd/tinyware/help/Makefile
/freebsd-10-stable/release/picobsd/tinyware/msg/Makefile
/freebsd-10-stable/release/picobsd/tinyware/ns/Makefile
/freebsd-10-stable/release/picobsd/tinyware/oinit/Makefile
/freebsd-10-stable/release/picobsd/tinyware/simple_httpd/Makefile
/freebsd-10-stable/release/picobsd/tinyware/sps/Makefile
/freebsd-10-stable/release/picobsd/tinyware/view/Makefile
/freebsd-10-stable/release/picobsd/tinyware/vm/Makefile
/freebsd-10-stable/rescue/rescue/Makefile
/freebsd-10-stable/sbin/geom/Makefile
/freebsd-10-stable/sbin/rtsol/Makefile
/freebsd-10-stable/secure/lib/libcrypto/engines/lib4758cca/Makefile
/freebsd-10-stable/share/examples/FreeBSD_version/Makefile
/freebsd-10-stable/share/examples/find_interface/Makefile
/freebsd-10-stable/share/examples/kld/cdev/test/Makefile
/freebsd-10-stable/share/examples/kld/syscall/test/Makefile
/freebsd-10-stable/share/examples/libvgl/Makefile
/freebsd-10-stable/share/examples/perfmon/Makefile
/freebsd-10-stable/share/examples/ppi/Makefile
/freebsd-10-stable/share/mk/bsd.README
/freebsd-10-stable/share/mk/bsd.test.mk
/freebsd-10-stable/sys/boot/amd64/boot1.efi/Makefile
/freebsd-10-stable/sys/boot/amd64/efi/Makefile
/freebsd-10-stable/sys/boot/arm/at91/boot0/Makefile
/freebsd-10-stable/sys/boot/arm/at91/boot0iic/Makefile
/freebsd-10-stable/sys/boot/arm/at91/boot0spi/Makefile
/freebsd-10-stable/sys/boot/arm/at91/boot2/Makefile
/freebsd-10-stable/sys/boot/arm/at91/bootiic/Makefile
/freebsd-10-stable/sys/boot/arm/at91/bootspi/Makefile
/freebsd-10-stable/sys/boot/arm/at91/libat91/Makefile
/freebsd-10-stable/sys/boot/arm/ixp425/boot2/Makefile
/freebsd-10-stable/sys/boot/i386/boot0/Makefile
/freebsd-10-stable/sys/boot/i386/btx/btx/Makefile
/freebsd-10-stable/sys/boot/i386/btx/btxldr/Makefile
/freebsd-10-stable/sys/boot/i386/btx/lib/Makefile
/freebsd-10-stable/sys/boot/i386/cdboot/Makefile
/freebsd-10-stable/sys/boot/i386/kgzldr/Makefile
/freebsd-10-stable/sys/boot/i386/mbr/Makefile
/freebsd-10-stable/sys/boot/i386/pmbr/Makefile
/freebsd-10-stable/sys/boot/i386/zfsloader/Makefile
/freebsd-10-stable/sys/boot/ia64/efi/Makefile
/freebsd-10-stable/sys/boot/ia64/ski/Makefile
/freebsd-10-stable/sys/boot/libstand32/Makefile
/freebsd-10-stable/sys/boot/pc98/boot0.5/Makefile
/freebsd-10-stable/sys/boot/pc98/boot0/Makefile
/freebsd-10-stable/sys/boot/pc98/btx/btx/Makefile
/freebsd-10-stable/sys/boot/pc98/btx/btxldr/Makefile
/freebsd-10-stable/sys/boot/pc98/btx/lib/Makefile
/freebsd-10-stable/sys/boot/pc98/cdboot/Makefile
/freebsd-10-stable/sys/boot/pc98/kgzldr/Makefile
/freebsd-10-stable/sys/boot/powerpc/boot1.chrp/Makefile
/freebsd-10-stable/sys/boot/powerpc/uboot/Makefile
/freebsd-10-stable/sys/boot/sparc64/boot1/Makefile
/freebsd-10-stable/sys/boot/userboot/libstand/Makefile
/freebsd-10-stable/sys/boot/userboot/test/Makefile
/freebsd-10-stable/sys/boot/userboot/userboot/Makefile
/freebsd-10-stable/sys/crypto/rijndael/Makefile
/freebsd-10-stable/sys/dev/aic7xxx/aicasm/Makefile
/freebsd-10-stable/sys/dev/patm/genrtab/Makefile
/freebsd-10-stable/tests/sys/netinet/Makefile
/freebsd-10-stable/tools/KSE/ksetest/Makefile
/freebsd-10-stable/tools/KSE/rr/Makefile
/freebsd-10-stable/tools/bsdbox/Makefile
/freebsd-10-stable/tools/diag/dumpvfscache/Makefile
/freebsd-10-stable/tools/diag/localeck/Makefile
/freebsd-10-stable/tools/regression/acct/Makefile
/freebsd-10-stable/tools/regression/aio/aiop/Makefile
/freebsd-10-stable/tools/regression/aio/aiotest/Makefile
/freebsd-10-stable/tools/regression/aio/kqueue/Makefile
/freebsd-10-stable/tools/regression/aio/kqueue/lio/Makefile
/freebsd-10-stable/tools/regression/audit/audit_pipe_ioctl/Makefile
/freebsd-10-stable/tools/regression/doat/Makefile
/freebsd-10-stable/tools/regression/environ/Makefile.envctl
/freebsd-10-stable/tools/regression/environ/Makefile.retention
/freebsd-10-stable/tools/regression/environ/Makefile.timings
/freebsd-10-stable/tools/regression/ethernet/ethermulti/Makefile
/freebsd-10-stable/tools/regression/execve/Makefile
/freebsd-10-stable/tools/regression/fifo/fifo_create/Makefile
/freebsd-10-stable/tools/regression/fifo/fifo_io/Makefile
/freebsd-10-stable/tools/regression/fifo/fifo_misc/Makefile
/freebsd-10-stable/tools/regression/fifo/fifo_open/Makefile
/freebsd-10-stable/tools/regression/file/dup/Makefile
/freebsd-10-stable/tools/regression/file/flock/Makefile
/freebsd-10-stable/tools/regression/file/ftruncate/Makefile
/freebsd-10-stable/tools/regression/file/newfileops_on_fork/Makefile
/freebsd-10-stable/tools/regression/filemon/Makefile
/freebsd-10-stable/tools/regression/fsx/Makefile
/freebsd-10-stable/tools/regression/gaithrstress/Makefile
/freebsd-10-stable/tools/regression/geom/ConfCmp/Makefile
/freebsd-10-stable/tools/regression/geom/MdLoad/Makefile
/freebsd-10-stable/tools/regression/include/stdatomic/Makefile
/freebsd-10-stable/tools/regression/include/tgmath/Makefile
/freebsd-10-stable/tools/regression/kgssapi/Makefile
/freebsd-10-stable/tools/regression/kqueue/Makefile
/freebsd-10-stable/tools/regression/kthread/kld/Makefile
/freebsd-10-stable/tools/regression/lib/libc/resolv/Makefile
/freebsd-10-stable/tools/regression/mac/mac_bsdextended/Makefile
/freebsd-10-stable/tools/regression/mlock/Makefile
/freebsd-10-stable/tools/regression/mmap/Makefile
/freebsd-10-stable/tools/regression/mqueue/mqtest1/Makefile
/freebsd-10-stable/tools/regression/mqueue/mqtest2/Makefile
/freebsd-10-stable/tools/regression/mqueue/mqtest3/Makefile
/freebsd-10-stable/tools/regression/mqueue/mqtest4/Makefile
/freebsd-10-stable/tools/regression/mqueue/mqtest5/Makefile
/freebsd-10-stable/tools/regression/netinet/arphold/Makefile
/freebsd-10-stable/tools/regression/netinet/ipbroadcast/Makefile
/freebsd-10-stable/tools/regression/netinet/ipdivert/Makefile
/freebsd-10-stable/tools/regression/netinet/ipmulticast/Makefile
/freebsd-10-stable/tools/regression/netinet/ipsockopt/Makefile
/freebsd-10-stable/tools/regression/netinet/msocket/Makefile
/freebsd-10-stable/tools/regression/netinet/msocket_ifnet_remove/Makefile
/freebsd-10-stable/tools/regression/netinet/rawconnect/Makefile
/freebsd-10-stable/tools/regression/netinet/tcpconnect/Makefile
/freebsd-10-stable/tools/regression/netinet/tcpdrop/Makefile
/freebsd-10-stable/tools/regression/netinet/tcpfullwindowrst/Makefile
/freebsd-10-stable/tools/regression/netinet/tcpsockclosebeforeaccept/Makefile
/freebsd-10-stable/tools/regression/netinet/tcpsocktimewait/Makefile
/freebsd-10-stable/tools/regression/netinet/tcpstream/Makefile
/freebsd-10-stable/tools/regression/netinet/udpconnectjail/Makefile
/freebsd-10-stable/tools/regression/netinet/udpzerobyte/Makefile
/freebsd-10-stable/tools/regression/netinet6/icmp6_filter/Makefile
/freebsd-10-stable/tools/regression/netinet6/inet6_rth/Makefile
/freebsd-10-stable/tools/regression/netinet6/ip6_sockets/Makefile
/freebsd-10-stable/tools/regression/nfsmmap/test1/Makefile
/freebsd-10-stable/tools/regression/nfsmmap/test2/Makefile
/freebsd-10-stable/tools/regression/p1003_1b/Makefile
/freebsd-10-stable/tools/regression/pipe/Makefile
/freebsd-10-stable/tools/regression/posixsem/Makefile
/freebsd-10-stable/tools/regression/posixsem2/Makefile
/freebsd-10-stable/tools/regression/posixshm/Makefile
/freebsd-10-stable/tools/regression/pthread/cv_cancel1/Makefile
/freebsd-10-stable/tools/regression/pthread/mutex_isowned_np/Makefile
/freebsd-10-stable/tools/regression/rpcsec_gss/Makefile
/freebsd-10-stable/tools/regression/security/access/Makefile
/freebsd-10-stable/tools/regression/security/cap_test/Makefile
/freebsd-10-stable/tools/regression/security/open_to_operation/Makefile
/freebsd-10-stable/tools/regression/security/proc_to_proc/Makefile
/freebsd-10-stable/tools/regression/sigqueue/sigqtest1/Makefile
/freebsd-10-stable/tools/regression/sigqueue/sigqtest2/Makefile
/freebsd-10-stable/tools/regression/sockets/accept_fd_leak/Makefile
/freebsd-10-stable/tools/regression/sockets/accf_data_attach/Makefile
/freebsd-10-stable/tools/regression/sockets/fstat/Makefile
/freebsd-10-stable/tools/regression/sockets/kqueue/Makefile
/freebsd-10-stable/tools/regression/sockets/listen_backlog/Makefile
/freebsd-10-stable/tools/regression/sockets/listenclose/Makefile
/freebsd-10-stable/tools/regression/sockets/pr_atomic/Makefile
/freebsd-10-stable/tools/regression/sockets/reconnect/Makefile
/freebsd-10-stable/tools/regression/sockets/rtsocket/Makefile
/freebsd-10-stable/tools/regression/sockets/sblock/Makefile
/freebsd-10-stable/tools/regression/sockets/sendfile/Makefile
/freebsd-10-stable/tools/regression/sockets/shutdown/Makefile
/freebsd-10-stable/tools/regression/sockets/sigpipe/Makefile
/freebsd-10-stable/tools/regression/sockets/so_setfib/Makefile
/freebsd-10-stable/tools/regression/sockets/socketpair/Makefile
/freebsd-10-stable/tools/regression/sockets/unix_bindconnect/Makefile
/freebsd-10-stable/tools/regression/sockets/unix_close_race/Makefile
/freebsd-10-stable/tools/regression/sockets/unix_cmsg/Makefile
/freebsd-10-stable/tools/regression/sockets/unix_gc/Makefile
/freebsd-10-stable/tools/regression/sockets/unix_passfd/Makefile
/freebsd-10-stable/tools/regression/sockets/unix_sendtorace/Makefile
/freebsd-10-stable/tools/regression/sockets/unix_socket/Makefile
/freebsd-10-stable/tools/regression/sockets/unix_sorflush/Makefile
/freebsd-10-stable/tools/regression/sockets/zerosend/Makefile
/freebsd-10-stable/tools/regression/sysvmsg/Makefile
/freebsd-10-stable/tools/regression/sysvsem/Makefile
/freebsd-10-stable/tools/regression/sysvshm/Makefile
/freebsd-10-stable/tools/regression/tls/ttls1/Makefile
/freebsd-10-stable/tools/regression/tls/ttls2/Makefile
/freebsd-10-stable/tools/regression/tls/ttls4/Makefile
/freebsd-10-stable/tools/regression/tmpfs/Makefile
/freebsd-10-stable/tools/regression/ufs/uprintf/Makefile
/freebsd-10-stable/tools/test/auxinfo/Makefile
/freebsd-10-stable/tools/test/iconv/gnu/Makefile
/freebsd-10-stable/tools/test/iconv/posix/Makefile
/freebsd-10-stable/tools/test/iconv/refgen/Makefile
/freebsd-10-stable/tools/test/iconv/tablegen/Makefile
/freebsd-10-stable/tools/test/malloc/Makefile
/freebsd-10-stable/tools/test/netfibs/Makefile
/freebsd-10-stable/tools/test/ppsapi/Makefile
/freebsd-10-stable/tools/test/ptrace/Makefile
/freebsd-10-stable/tools/test/upsdl/Makefile
/freebsd-10-stable/tools/tools/aac/Makefile
/freebsd-10-stable/tools/tools/ath/Makefile.inc
/freebsd-10-stable/tools/tools/ath/ath_ee_9287_print/Makefile
/freebsd-10-stable/tools/tools/ath/ath_ee_9300_print/Makefile
/freebsd-10-stable/tools/tools/ath/ath_ee_v14_print/Makefile
/freebsd-10-stable/tools/tools/ath/ath_ee_v4k_print/Makefile
/freebsd-10-stable/tools/tools/ath/athstats/Makefile
/freebsd-10-stable/tools/tools/atsectl/Makefile
/freebsd-10-stable/tools/tools/bootparttest/Makefile
/freebsd-10-stable/tools/tools/cfi/Makefile
/freebsd-10-stable/tools/tools/cxgbetool/Makefile
/freebsd-10-stable/tools/tools/cxgbtool/Makefile
/freebsd-10-stable/tools/tools/drm/radeon/mkregtable/Makefile
/freebsd-10-stable/tools/tools/find-sb/Makefile
/freebsd-10-stable/tools/tools/gdb_regofs/Makefile
/freebsd-10-stable/tools/tools/ifinfo/Makefile
/freebsd-10-stable/tools/tools/ifpifa/Makefile
/freebsd-10-stable/tools/tools/ipw/Makefile
/freebsd-10-stable/tools/tools/iwi/Makefile
/freebsd-10-stable/tools/tools/mfi/Makefile
/freebsd-10-stable/tools/tools/mwl/mwldebug/Makefile
/freebsd-10-stable/tools/tools/mwl/mwlstats/Makefile
/freebsd-10-stable/tools/tools/ncpus/Makefile
/freebsd-10-stable/tools/tools/net80211/stumbler/Makefile
/freebsd-10-stable/tools/tools/net80211/w00t/Makefile.inc
/freebsd-10-stable/tools/tools/net80211/wesside/dics/Makefile
/freebsd-10-stable/tools/tools/net80211/wesside/udps/Makefile
/freebsd-10-stable/tools/tools/net80211/wesside/wesside/Makefile
/freebsd-10-stable/tools/tools/net80211/wlaninject/Makefile
/freebsd-10-stable/tools/tools/net80211/wlanstats/Makefile
/freebsd-10-stable/tools/tools/net80211/wlantxtime/Makefile
/freebsd-10-stable/tools/tools/net80211/wlanwatch/Makefile
/freebsd-10-stable/tools/tools/net80211/wlanwds/Makefile
/freebsd-10-stable/tools/tools/netmap/Makefile
/freebsd-10-stable/tools/tools/netrate/http/Makefile
/freebsd-10-stable/tools/tools/netrate/httpd/Makefile
/freebsd-10-stable/tools/tools/netrate/juggle/Makefile
/freebsd-10-stable/tools/tools/netrate/netblast/Makefile
/freebsd-10-stable/tools/tools/netrate/netreceive/Makefile
/freebsd-10-stable/tools/tools/netrate/netsend/Makefile
/freebsd-10-stable/tools/tools/netrate/tcpconnect/Makefile
/freebsd-10-stable/tools/tools/netrate/tcpp/Makefile
/freebsd-10-stable/tools/tools/netrate/tcpreceive/Makefile
/freebsd-10-stable/tools/tools/npe/npestats/Makefile
/freebsd-10-stable/tools/tools/nxge/Makefile
/freebsd-10-stable/tools/tools/pciroms/Makefile
/freebsd-10-stable/tools/tools/pirtool/Makefile
/freebsd-10-stable/tools/tools/syscall_timing/Makefile
/freebsd-10-stable/tools/tools/tionxcl/Makefile
/freebsd-10-stable/tools/tools/umastat/Makefile
/freebsd-10-stable/tools/tools/vxge/Makefile
/freebsd-10-stable/tools/tools/wtap/vis_map/Makefile
/freebsd-10-stable/tools/tools/wtap/wtap/Makefile
/freebsd-10-stable/tools/tools/zfsboottest/Makefile
/freebsd-10-stable/usr.bin/bzip2recover/Makefile
/freebsd-10-stable/usr.bin/clang/clang-tblgen/Makefile
/freebsd-10-stable/usr.bin/clang/llvm-mc/Makefile
/freebsd-10-stable/usr.bin/clang/llvm-objdump/Makefile
/freebsd-10-stable/usr.bin/clang/llvm-rtdyld/Makefile
/freebsd-10-stable/usr.bin/clang/macho-dump/Makefile
/freebsd-10-stable/usr.bin/cpio/test/Makefile
/freebsd-10-stable/usr.bin/dirname/Makefile
/freebsd-10-stable/usr.bin/locate/bigram/Makefile
/freebsd-10-stable/usr.bin/locate/code/Makefile
/freebsd-10-stable/usr.bin/mkcsmapper_static/Makefile
/freebsd-10-stable/usr.bin/mkesdb_static/Makefile
/freebsd-10-stable/usr.bin/svn/svn/Makefile
/freebsd-10-stable/usr.bin/svn/svnadmin/Makefile
/freebsd-10-stable/usr.bin/svn/svndumpfilter/Makefile
/freebsd-10-stable/usr.bin/svn/svnlook/Makefile
/freebsd-10-stable/usr.bin/svn/svnmucc/Makefile
/freebsd-10-stable/usr.bin/svn/svnrdump/Makefile
/freebsd-10-stable/usr.bin/svn/svnserve/Makefile
/freebsd-10-stable/usr.bin/svn/svnsync/Makefile
/freebsd-10-stable/usr.bin/svn/svnversion/Makefile
/freebsd-10-stable/usr.bin/tar/test/Makefile
/freebsd-10-stable/usr.bin/unexpand/Makefile
/freebsd-10-stable/usr.bin/uudecode/Makefile
/freebsd-10-stable/usr.bin/vgrind/RETEST/Makefile
/freebsd-10-stable/usr.bin/xlint/lint2/Makefile
Makefile
/freebsd-10-stable/usr.sbin/bootparamd/callbootd/Makefile
/freebsd-10-stable/usr.sbin/bsdinstall/distextract/Makefile
/freebsd-10-stable/usr.sbin/bsdinstall/distfetch/Makefile
/freebsd-10-stable/usr.sbin/bsdinstall/scripts/Makefile
/freebsd-10-stable/usr.sbin/crunch/examples/Makefile
/freebsd-10-stable/usr.sbin/ctm/ctm_dequeue/Makefile
/freebsd-10-stable/usr.sbin/ctm/ctm_smail/Makefile
/freebsd-10-stable/usr.sbin/ctm/mkCTM/Makefile
/freebsd-10-stable/usr.sbin/fifolog/fifolog_reader/Makefile
/freebsd-10-stable/usr.sbin/fifolog/fifolog_writer/Makefile
/freebsd-10-stable/usr.sbin/lpr/filters.ru/koi2855/Makefile
/freebsd-10-stable/usr.sbin/lpr/filters.ru/koi2alt/Makefile
/freebsd-10-stable/usr.sbin/lpr/filters/Makefile
/freebsd-10-stable/usr.sbin/ntp/ntp-keygen/Makefile
/freebsd-10-stable/usr.sbin/ntp/ntpd/Makefile
/freebsd-10-stable/usr.sbin/ntp/ntpdate/Makefile
/freebsd-10-stable/usr.sbin/ntp/ntpdc/Makefile
/freebsd-10-stable/usr.sbin/ntp/ntpq/Makefile
/freebsd-10-stable/usr.sbin/ntp/ntptime/Makefile
/freebsd-10-stable/usr.sbin/portsnap/make_index/Makefile
/freebsd-10-stable/usr.sbin/portsnap/phttpget/Makefile
/freebsd-10-stable/usr.sbin/rpc.ypupdated/Makefile
276403 30-Dec-2014 neel

MFC r273375
Add support AMD processors with the SVM/AMD-V hardware extensions.

MFC r273749
Remove bhyve SVM feature printf's now that they are available in the general
CPU feature detection code.

MFC r273766
Add missing 'break' pointed out by Coverity CID 1249760.

MFC r276098
Allow ktr(4) tracing of all guest exceptions via the tunable "hw.vmm.trace_guest_exceptions"

MFC r276392
Inject #UD into the guest when it executes either 'MONITOR' or 'MWAIT' on an
AMD/SVM host.

MFC r276402
Remove "svn:mergeinfo" property that was dragged along when these files were
svn copied in r273375.

276349 28-Dec-2014 neel

MFC r270326
Fix a recursive lock acquisition in vi_reset_dev().

MFC r270434
Return the spurious interrupt vector (IRQ7 or IRQ15) if the atpic cannot find
any unmasked pin with an interrupt asserted.

MFC r270436
Fix a bug in the emulation of CPUID leaf 0x4.

MFC r270437
Add "hw.vmm.topology.threads_per_core" and "hw.vmm.topology.cores_per_package"
tunables to modify the default cpu topology advertised by bhyve.

MFC r270855
Set the 'inst_length' to '0' early on before any error conditions are detected
in the emulation of the task switch. If any exceptions are triggered then the
guest %rip should point to instruction that caused the task switch as opposed
to the one after it.

MFC r270857
The "SUB" instruction used in getcc() actually does 'x -= y' so use the
proper constraint for 'x'. The "+r" constraint indicates that 'x' is an
input and output register operand.

While here generate code for different variants of getcc() using a macro
GETCC(sz) where 'sz' indicates the operand size.

Update the status bits in %rflags when emulating AND and OR opcodes.

MFC r271439
Initialize 'bc_rdonly' to the right value.

MFC r271451
Optimize the common case of injecting an interrupt into a vcpu after a HLT
by explicitly moving it out of the interrupt shadow.

MFC r271888
Restructure the MSR handling so it is entirely handled by processor-specific
code.

MFC r271890
MSR_KGSBASE is no longer saved and restored from the guest MSR save area. This
behavior was changed in r271888 so update the comment block to reflect this.

MFC r271891
Add some more KTR events to help debugging.

MFC r272197
mmap(2) requires either MAP_PRIVATE or MAP_SHARED for non-anonymous mappings.

MFC r272395
Get rid of code that dealt with the hardware not being able to save/restore
the PAT MSR on guest exit/entry. This workaround was done for a beta release
of VMware Fusion 5 but is no longer needed in later versions.

All Intel CPUs since Nehalem have supported saving and restoring MSR_PAT
in the VM exit and entry controls.

MFC r272670
Inject #UD into the guest when it executes either 'MONITOR' or 'MWAIT'.

MFC r272710
Implement the FLUSH operation in the virtio-block emulation.

MFC r272838
iasl(8) expects integer fields in data tables to be specified as hexadecimal
values. Therefore the bit width of the "PM Timer Block" was actually being
interpreted as 50-bits instead of the expected 32-bit.

This eliminates an error message emitted by a Linux 3.17 guest during boot:
"Invalid length for FADT/PmTimerBlock: 50, using default 32"

MFC r272839
Support Intel-specific MSRs that are accessed when booting up a linux in bhyve:
- MSR_PLATFORM_INFO
- MSR_TURBO_RATIO_LIMITx
- MSR_RAPL_POWER_UNIT

MFC r273108
Emulate "POP r/m". This is needed to boot OpenBSD/i386 MP kernel in bhyve.

MFC r273212
Support stopping and restarting the AHCI command list via toggling PxCMD.ST
from '1' to '0' and back. This allows the driver a chance to recover if
for instance a timeout occurred due to activity on the host.

270159 19-Aug-2014 grehan

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


/freebsd-10-stable/lib/libvmmapi/vmmapi.c
/freebsd-10-stable/lib/libvmmapi/vmmapi.h
/freebsd-10-stable/sys/amd64/amd64/identcpu.c
/freebsd-10-stable/sys/amd64/include/vmm.h
/freebsd-10-stable/sys/amd64/include/vmm_dev.h
/freebsd-10-stable/sys/amd64/include/vmm_instruction_emul.h
/freebsd-10-stable/sys/amd64/vmm/intel/vmcs.c
/freebsd-10-stable/sys/amd64/vmm/intel/vmcs.h
/freebsd-10-stable/sys/amd64/vmm/intel/vmx.c
/freebsd-10-stable/sys/amd64/vmm/intel/vmx_msr.c
/freebsd-10-stable/sys/amd64/vmm/intel/vmx_msr.h
/freebsd-10-stable/sys/amd64/vmm/intel/vtd.c
/freebsd-10-stable/sys/amd64/vmm/io/vatpic.c
/freebsd-10-stable/sys/amd64/vmm/vmm.c
/freebsd-10-stable/sys/amd64/vmm/vmm_dev.c
/freebsd-10-stable/sys/amd64/vmm/vmm_instruction_emul.c
/freebsd-10-stable/sys/x86/include/specialreg.h
/freebsd-10-stable/usr.sbin/bhyve/Makefile
/freebsd-10-stable/usr.sbin/bhyve/acpi.c
/freebsd-10-stable/usr.sbin/bhyve/atkbdc.c
/freebsd-10-stable/usr.sbin/bhyve/bhyve.8
/freebsd-10-stable/usr.sbin/bhyve/bhyverun.c
/freebsd-10-stable/usr.sbin/bhyve/bhyverun.h
/freebsd-10-stable/usr.sbin/bhyve/block_if.c
/freebsd-10-stable/usr.sbin/bhyve/block_if.h
/freebsd-10-stable/usr.sbin/bhyve/inout.c
/freebsd-10-stable/usr.sbin/bhyve/inout.h
/freebsd-10-stable/usr.sbin/bhyve/mem.c
/freebsd-10-stable/usr.sbin/bhyve/mem.h
/freebsd-10-stable/usr.sbin/bhyve/pci_ahci.c
/freebsd-10-stable/usr.sbin/bhyve/pci_emul.c
/freebsd-10-stable/usr.sbin/bhyve/pci_emul.h
/freebsd-10-stable/usr.sbin/bhyve/pci_irq.c
/freebsd-10-stable/usr.sbin/bhyve/pm.c
/freebsd-10-stable/usr.sbin/bhyve/smbiostbl.c
/freebsd-10-stable/usr.sbin/bhyve/task_switch.c
/freebsd-10-stable/usr.sbin/bhyve/virtio.c
/freebsd-10-stable/usr.sbin/bhyve/virtio.h
bhyvectl.c
/freebsd-10-stable/usr.sbin/bhyveload/bhyveload.8
/freebsd-10-stable/usr.sbin/bhyveload/bhyveload.c
270070 17-Aug-2014 grehan

MFC r266933
Activate vcpus from bhyve(8) using the ioctl VM_ACTIVATE_CPU instead of doing
it implicitly in vmm.ko.

268951 21-Jul-2014 jhb

MFC 264275:
Explicitly initialize 'vmname' to NULL.

268935 21-Jul-2014 jhb

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'.

266339 17-May-2014 jhb

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

264619 17-Apr-2014 jhb

MFC 258860,260167,260238,260397:
- Restructure the VMX code to enter and exit the guest. In large part this
change hides the setjmp/longjmp semantics of VM enter/exit.
vmx_enter_guest() is used to enter guest context and vmx_exit_guest() is
used to transition back into host context.

Fix a longstanding race where a vcpu interrupt notification might be
ignored if it happens after vmx_inject_interrupts() but before host
interrupts are disabled in vmx_resume/vmx_launch. We now call
vmx_inject_interrupts() with host interrupts disabled to prevent this.
- The 'protection' field in the VM exit collateral for the PAGING exit is
not used - get rid of it.

Reviewed by: grehan

262350 23-Feb-2014 jhb

MFC 258859,259081,259085,259205,259213,259275,259482,259537,259702,259779:
Several changes to the local APIC support in bhyve:
- Rename 'vm_interrupt_hostcpu()' to 'vcpu_notify_event()'.
- If a vcpu disables its local apic and then executes a 'HLT' then spin
down the vcpu and destroy its thread context. Also modify the 'HLT'
processing to ignore pending interrupts in the IRR if interrupts have
been disabled by the guest. The interrupt cannot be injected into the
guest in any case so resuming it is futile.
- Use callout(9) to drive the vlapic timer instead of clocking it on each
VM exit.
- When the guest is bringing up the APs in the x2APIC mode a write to the
ICR register will now trigger a return to userspace with an exitcode of
VM_EXITCODE_SPINUP_AP.
- Change the vlapic timer lock to be a spinlock because the vlapic can be
accessed from within a critical section (vm run loop) when guest is using
x2apic mode.
- Fix the vlapic version register.
- Add a command to bhyvectl to inject an NMI on a specific vcpu.
- Add an API to deliver message signalled interrupts to vcpus. This allows
callers to treat the MSI 'addr' and 'data' fields as opaque and also lets
bhyve implement multiple destination modes: physical, flat and clustered.
- Rename the ambiguously named 'vm_setup_msi()' and 'vm_setup_msix()' to
'vm_setup_pptdev_msi()' and 'vm_setup_pptdev_msix()' respectively.
- Consolidate the virtual apic initialization in a single function:
vlapic_reset()
- Add a generic routine to trigger an LVT interrupt that supports both
fixed and NMI delivery modes.
- Add an ioctl and bhyvectl command to trigger local interrupts inside a
guest. In particular, a global NMI similar to that raised by SERR# or
PERR# can be simulated by asserting LINT1 on all vCPUs.
- Extend the LVT table in the vCPU local APIC to support CMCI.
- Flesh out the local APIC error reporting a bit to cache errors and
report them via ESR when ESR is written to. Add support for asserting
the error LVT when an error occurs. Raise illegal vector errors when
attempting to signal an invalid vector for an interrupt or when sending
an IPI.
- Export table entries in the MADT and MP Table advertising the stock x86
config of LINT0 set to ExtInt and LINT1 wired to NMI.

259073 07-Dec-2013 peter

Hoist all the mergeinfo up to the root in preparation for enforcing merges
to the root only. All MFC's were rerecorded to the root.

Going forward, if an MFC includes mergeinfo, it will need to be made to
the root and committed from the root. Merges with --ignore-ancestry
or diff | patch can go anywhere.

The mergeinfo in HEAD is in a bad state from years of neglect and manual
tampering and this was branched into 10.x. This confuses the coalescing
code and prevents it from doing its job.

Approved by: re (gjb, implicit)


/freebsd-10-stable/MAINTAINERS
/freebsd-10-stable/Makefile.inc1
/freebsd-10-stable/ObsoleteFiles.inc
/freebsd-10-stable/UPDATING
/freebsd-10-stable/bin/df
/freebsd-10-stable/bin/freebsd-version
/freebsd-10-stable/cddl
/freebsd-10-stable/cddl/contrib/opensolaris
/freebsd-10-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-10-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-10-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-10-stable/contrib/apr
/freebsd-10-stable/contrib/apr-util
/freebsd-10-stable/contrib/atf
/freebsd-10-stable/contrib/binutils
/freebsd-10-stable/contrib/bmake
/freebsd-10-stable/contrib/byacc
/freebsd-10-stable/contrib/bzip2
/freebsd-10-stable/contrib/com_err
/freebsd-10-stable/contrib/compiler-rt
/freebsd-10-stable/contrib/dialog
/freebsd-10-stable/contrib/dtc
/freebsd-10-stable/contrib/ee
/freebsd-10-stable/contrib/expat
/freebsd-10-stable/contrib/file
/freebsd-10-stable/contrib/gcc
/freebsd-10-stable/contrib/gdb
/freebsd-10-stable/contrib/gdtoa
/freebsd-10-stable/contrib/groff
/freebsd-10-stable/contrib/ipfilter
/freebsd-10-stable/contrib/ipfilter/ml_ipl.c
/freebsd-10-stable/contrib/ipfilter/mlfk_ipl.c
/freebsd-10-stable/contrib/ipfilter/mlh_rule.c
/freebsd-10-stable/contrib/ipfilter/mli_ipl.c
/freebsd-10-stable/contrib/ipfilter/mln_ipl.c
/freebsd-10-stable/contrib/ipfilter/mls_ipl.c
/freebsd-10-stable/contrib/ldns
/freebsd-10-stable/contrib/less
/freebsd-10-stable/contrib/libarchive
/freebsd-10-stable/contrib/libarchive/cpio
/freebsd-10-stable/contrib/libarchive/libarchive
/freebsd-10-stable/contrib/libarchive/libarchive_fe
/freebsd-10-stable/contrib/libarchive/tar
/freebsd-10-stable/contrib/libc++
/freebsd-10-stable/contrib/libc-vis
/freebsd-10-stable/contrib/libcxxrt
/freebsd-10-stable/contrib/libexecinfo
/freebsd-10-stable/contrib/libpcap
/freebsd-10-stable/contrib/libstdc++
/freebsd-10-stable/contrib/llvm
/freebsd-10-stable/contrib/llvm/tools/clang
/freebsd-10-stable/contrib/mtree
/freebsd-10-stable/contrib/ncurses
/freebsd-10-stable/contrib/netcat
/freebsd-10-stable/contrib/ntp
/freebsd-10-stable/contrib/nvi
/freebsd-10-stable/contrib/one-true-awk
/freebsd-10-stable/contrib/openbsm
/freebsd-10-stable/contrib/openpam
/freebsd-10-stable/contrib/openresolv
/freebsd-10-stable/contrib/pf
/freebsd-10-stable/contrib/sendmail
/freebsd-10-stable/contrib/serf
/freebsd-10-stable/contrib/smbfs
/freebsd-10-stable/contrib/subversion
/freebsd-10-stable/contrib/tcpdump
/freebsd-10-stable/contrib/tcsh
/freebsd-10-stable/contrib/tnftp
/freebsd-10-stable/contrib/top
/freebsd-10-stable/contrib/top/install-sh
/freebsd-10-stable/contrib/tzcode/stdtime
/freebsd-10-stable/contrib/tzcode/zic
/freebsd-10-stable/contrib/tzdata
/freebsd-10-stable/contrib/unbound
/freebsd-10-stable/contrib/wpa
/freebsd-10-stable/contrib/xz
/freebsd-10-stable/crypto/heimdal
/freebsd-10-stable/crypto/openssh
/freebsd-10-stable/crypto/openssl
/freebsd-10-stable/etc
/freebsd-10-stable/etc/rc.d
/freebsd-10-stable/gnu/lib
/freebsd-10-stable/gnu/usr.bin/binutils
/freebsd-10-stable/gnu/usr.bin/cc/cc_tools
/freebsd-10-stable/gnu/usr.bin/gdb
/freebsd-10-stable/include
/freebsd-10-stable/lib
/freebsd-10-stable/lib/libc
/freebsd-10-stable/lib/libc/stdtime
/freebsd-10-stable/lib/libc_nonshared
/freebsd-10-stable/lib/libfetch
/freebsd-10-stable/lib/libiconv_modules
/freebsd-10-stable/lib/libsmb
/freebsd-10-stable/lib/libthr
/freebsd-10-stable/lib/libutil
/freebsd-10-stable/lib/libvmmapi
/freebsd-10-stable/lib/libyaml
/freebsd-10-stable/lib/libz
/freebsd-10-stable/release
/freebsd-10-stable/release/doc
/freebsd-10-stable/sbin
/freebsd-10-stable/sbin/camcontrol
/freebsd-10-stable/sbin/dumpon
/freebsd-10-stable/sbin/hastd
/freebsd-10-stable/sbin/ifconfig
/freebsd-10-stable/sbin/ipfw
/freebsd-10-stable/sbin/nvmecontrol
/freebsd-10-stable/share
/freebsd-10-stable/share/examples/bhyve
/freebsd-10-stable/share/i18n/csmapper/JIS
/freebsd-10-stable/share/i18n/esdb/EUC
/freebsd-10-stable/share/man
/freebsd-10-stable/share/man/man4
/freebsd-10-stable/share/man/man4/bhyve.4
/freebsd-10-stable/share/man/man5
/freebsd-10-stable/share/man/man7
/freebsd-10-stable/share/man/man8
/freebsd-10-stable/share/misc
/freebsd-10-stable/share/mk
/freebsd-10-stable/share/mk/bsd.arch.inc.mk
/freebsd-10-stable/share/syscons
/freebsd-10-stable/share/zoneinfo
/freebsd-10-stable/sys
/freebsd-10-stable/sys/amd64/include/vmm.h
/freebsd-10-stable/sys/amd64/include/vmm_dev.h
/freebsd-10-stable/sys/amd64/include/vmm_instruction_emul.h
/freebsd-10-stable/sys/amd64/include/xen
/freebsd-10-stable/sys/amd64/vmm
/freebsd-10-stable/sys/boot
/freebsd-10-stable/sys/boot/i386/efi
/freebsd-10-stable/sys/boot/ia64/efi
/freebsd-10-stable/sys/boot/ia64/ski
/freebsd-10-stable/sys/boot/powerpc/boot1.chrp
/freebsd-10-stable/sys/boot/powerpc/ofw
/freebsd-10-stable/sys/cddl/contrib/opensolaris
/freebsd-10-stable/sys/conf
/freebsd-10-stable/sys/contrib/dev/acpica
/freebsd-10-stable/sys/contrib/dev/acpica/changes.txt
/freebsd-10-stable/sys/contrib/dev/acpica/common
/freebsd-10-stable/sys/contrib/dev/acpica/compiler
/freebsd-10-stable/sys/contrib/dev/acpica/components/debugger
/freebsd-10-stable/sys/contrib/dev/acpica/components/disassembler
/freebsd-10-stable/sys/contrib/dev/acpica/components/dispatcher
/freebsd-10-stable/sys/contrib/dev/acpica/components/events
/freebsd-10-stable/sys/contrib/dev/acpica/components/executer
/freebsd-10-stable/sys/contrib/dev/acpica/components/hardware
/freebsd-10-stable/sys/contrib/dev/acpica/components/namespace
/freebsd-10-stable/sys/contrib/dev/acpica/components/parser
/freebsd-10-stable/sys/contrib/dev/acpica/components/resources
/freebsd-10-stable/sys/contrib/dev/acpica/components/tables
/freebsd-10-stable/sys/contrib/dev/acpica/components/utilities
/freebsd-10-stable/sys/contrib/dev/acpica/include
/freebsd-10-stable/sys/contrib/dev/acpica/os_specific
/freebsd-10-stable/sys/contrib/ipfilter
/freebsd-10-stable/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
/freebsd-10-stable/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c
/freebsd-10-stable/sys/contrib/libfdt
/freebsd-10-stable/sys/contrib/octeon-sdk
/freebsd-10-stable/sys/contrib/x86emu
/freebsd-10-stable/sys/dev/bvm
/freebsd-10-stable/sys/dev/fdt/fdt_ic_if.m
/freebsd-10-stable/sys/dev/hyperv
/freebsd-10-stable/sys/modules/hyperv
/freebsd-10-stable/sys/modules/vmm
/freebsd-10-stable/sys/x86/include/acpica_machdep.h
/freebsd-10-stable/tools
/freebsd-10-stable/tools/build
/freebsd-10-stable/tools/build/options
/freebsd-10-stable/tools/tools/atsectl
/freebsd-10-stable/usr.bin/calendar
/freebsd-10-stable/usr.bin/csup
/freebsd-10-stable/usr.bin/iscsictl
/freebsd-10-stable/usr.bin/procstat
/freebsd-10-stable/usr.sbin
/freebsd-10-stable/usr.sbin/bhyve
/freebsd-10-stable/usr.sbin/bhyvectl
/freebsd-10-stable/usr.sbin/bhyveload
/freebsd-10-stable/usr.sbin/bsdconfig
/freebsd-10-stable/usr.sbin/bsdinstall
/freebsd-10-stable/usr.sbin/ctladm
/freebsd-10-stable/usr.sbin/ctld
/freebsd-10-stable/usr.sbin/freebsd-update
/freebsd-10-stable/usr.sbin/jail
/freebsd-10-stable/usr.sbin/mergemaster
/freebsd-10-stable/usr.sbin/mount_smbfs
/freebsd-10-stable/usr.sbin/ndiscvt
/freebsd-10-stable/usr.sbin/pkg
/freebsd-10-stable/usr.sbin/rtadvctl
/freebsd-10-stable/usr.sbin/rtadvd
/freebsd-10-stable/usr.sbin/rtsold
/freebsd-10-stable/usr.sbin/zic
256869 22-Oct-2013 neel

MFC r256645.

Add a new capability, VM_CAP_ENABLE_INVPCID, that can be enabled to expose
'invpcid' instruction to the guest. Currently bhyve will try to enable this
capability unconditionally if it is available.

Consolidate code in bhyve to set the capabilities so it is no longer
duplicated in BSP and AP bringup.

Add a sysctl 'vm.pmap.invpcid_works' to display whether the 'invpcid'
instruction is available.

Approved by: re (hrs)

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


256176 09-Oct-2013 neel

Parse the memory size parameter using expand_number() to allow specifying
the memory size more intuitively (e.g. 512M, 4G etc).

Submitted by: rodrigc
Reviewed by: grehan
Approved by: re (blanket)


256072 05-Oct-2013 neel

Merge projects/bhyve_npt_pmap into head.

Make the amd64/pmap code aware of nested page table mappings used by bhyve
guests. This allows bhyve to associate each guest with its own vmspace and
deal with nested page faults in the context of that vmspace. This also
enables features like accessed/dirty bit tracking, swapping to disk and
transparent superpage promotions of guest memory.

Guest vmspace:
Each bhyve guest has a unique vmspace to represent the physical memory
allocated to the guest. Each memory segment allocated by the guest is
mapped into the guest's address space via the 'vmspace->vm_map' and is
backed by an object of type OBJT_DEFAULT.

pmap types:
The amd64/pmap now understands two types of pmaps: PT_X86 and PT_EPT.

The PT_X86 pmap type is used by the vmspace associated with the host kernel
as well as user processes executing on the host. The PT_EPT pmap is used by
the vmspace associated with a bhyve guest.

Page Table Entries:
The EPT page table entries as mostly similar in functionality to regular
page table entries although there are some differences in terms of what
bits are used to express that functionality. For e.g. the dirty bit is
represented by bit 9 in the nested PTE as opposed to bit 6 in the regular
x86 PTE. Therefore the bitmask representing the dirty bit is now computed
at runtime based on the type of the pmap. Thus PG_M that was previously a
macro now becomes a local variable that is initialized at runtime using
'pmap_modified_bit(pmap)'.

An additional wrinkle associated with EPT mappings is that older Intel
processors don't have hardware support for tracking accessed/dirty bits in
the PTE. This means that the amd64/pmap code needs to emulate these bits to
provide proper accounting to the VM subsystem. This is achieved by using
the following mapping for EPT entries that need emulation of A/D bits:
Bit Position Interpreted By
PG_V 52 software (accessed bit emulation handler)
PG_RW 53 software (dirty bit emulation handler)
PG_A 0 hardware (aka EPT_PG_RD)
PG_M 1 hardware (aka EPT_PG_WR)

The idea to use the mapping listed above for A/D bit emulation came from
Alan Cox (alc@).

The final difference with respect to x86 PTEs is that some EPT implementations
do not support superpage mappings. This is recorded in the 'pm_flags' field
of the pmap.

TLB invalidation:
The amd64/pmap code has a number of ways to do invalidation of mappings
that may be cached in the TLB: single page, multiple pages in a range or the
entire TLB. All of these funnel into a single EPT invalidation routine called
'pmap_invalidate_ept()'. This routine bumps up the EPT generation number and
sends an IPI to the host cpus that are executing the guest's vcpus. On a
subsequent entry into the guest it will detect that the EPT has changed and
invalidate the mappings from the TLB.

Guest memory access:
Since the guest memory is no longer wired we need to hold the host physical
page that backs the guest physical page before we can access it. The helper
functions 'vm_gpa_hold()/vm_gpa_release()' are available for this purpose.

PCI passthru:
Guest's with PCI passthru devices will wire the entire guest physical address
space. The MMIO BAR associated with the passthru device is backed by a
vm_object of type OBJT_SG. An IOMMU domain is created only for guest's that
have one or more PCI passthru devices attached to them.

Limitations:
There isn't a way to map a guest physical page without execute permissions.
This is because the amd64/pmap code interprets the guest physical mappings as
user mappings since they are numerically below VM_MAXUSER_ADDRESS. Since PG_U
shares the same bit position as EPT_PG_EXECUTE all guest mappings become
automatically executable.

Thanks to Alan Cox and Konstantin Belousov for their rigorous code reviews
as well as their support and encouragement.

Thanks for John Baldwin for reviewing the use of OBJT_SG as the backing
object for pci passthru mmio regions.

Special thanks to Peter Holm for testing the patch on short notice.

Approved by: re
Discussed with: grehan
Reviewed by: alc, kib
Tested by: pho


248935 30-Mar-2013 neel

Add some more stats to keep track of all the reasons that a vcpu is exiting.


248477 18-Mar-2013 neel

Simplify the assignment of memory to virtual machines by requiring a single
command line option "-m <memsize in MB>" to specify the memory size.

Prior to this change the user needed to explicitly specify the amount of
memory allocated below 4G (-m <lowmem>) and the amount above 4G (-M <highmem>).

The "-M" option is no longer supported by 'bhyveload' and 'bhyve'.

The start of the PCI hole is fixed at 3GB and cannot be directly changed
using command line options. However it is still possible to change this in
special circumstances via the 'vm_set_lowmem_limit()' API provided by
libvmmapi.

Submitted by: Dinakar Medavaram (initial version)
Reviewed by: grehan
Obtained from: NetApp


246800 14-Feb-2013 neel

Add option "--unassign-pptdev=<bus/slot/func>" to allow 'bhyvectl' to detach
passthru devices from the guest.

Obtained from: NetApp


246686 11-Feb-2013 neel

Implement guest vcpu pinning using 'pthread_setaffinity_np(3)'.

Prior to this change pinning was implemented via an ioctl (VM_SET_PINNING)
that called 'sched_bind()' on behalf of the user thread.

The ULE implementation of 'sched_bind()' bumps up 'td_pinned' which in turn
runs afoul of the assertion '(td_pinned == 0)' in userret().

Using the cpuset affinity to implement pinning of the vcpu threads works with
both 4BSD and ULE schedulers and has the happy side-effect of getting rid
of a bunch of code in vmm.ko.

Discussed with: grehan


245685 20-Jan-2013 joel

Fix minor nit in usage output.

Reviewed by: neel


245679 20-Jan-2013 neel

Use <vmname> in a consistent manner in usage messages output by 'bhyve',
'bhyveload' and 'bhyvectl'.

Pointed out by: joel@


245678 20-Jan-2013 neel

Add svn properties to the recently merged bhyve source files.

The pre-commit hook will not allow any commits without the svn:keywords
property in head.


245652 19-Jan-2013 neel

Merge projects/bhyve to head.

'bhyve' was developed by grehan@ and myself at NetApp (thanks!).

Special thanks to Peter Snyder, Joe Caradonna and Michael Dexter for their
support and encouragement.

Obtained from: NetApp


245213 09-Jan-2013 neel

Get rid of 'sample.sh' from here - it belongs in the /usr/share/examples
directory.

Obtained from: NetApp


242169 27-Oct-2012 grehan

Rename vmmctl to bhyvectl. 'vmmctl' came from a pre-bhyve
internal codebase at NetApp. No need for it to have an
unrelated name to the other userspace utils.

Reviewed by: neel
Obtained from: NetApp


242059 25-Oct-2012 neel

Fix typo: host_rip -> host_rsp

Obtained from: NetApp


241487 12-Oct-2012 neel

Output the value of all capabilities when the "--getcap" option is used without
a "--capname=<capname>". Do the same for the "--get-all" option.


241179 04-Oct-2012 neel

The ioctl VM_GET_MEMORY_SEG is no longer able to return the host physical
address associated with the guest memory segment. This is because there is
no longer a 1:1 mapping between GPA and HPA.

As a result 'vmmctl' can only display the guest physical address and the
length of the lowmem and highmem segments.


240922 25-Sep-2012 neel

Add ioctls to control the X2APIC capability exposed by the virtual machine to
the guest.

At the moment this simply sets the state in the 'vcpu' instance but there is
no code that acts upon these settings.


238386 12-Jul-2012 grehan

Add --get-all option to dump all readable parameters.

Submitted by: Takuya Asada syuu at dokukino dot com
Reviewed by: grehan, neel
Obtained from: GSoC 12 bhyve project


221942 15-May-2011 jhb

First cut to port bhyve, vmmctl, and libvmmapi to HEAD.


221828 13-May-2011 grehan

Import of bhyve hypervisor and utilities, part 1.
vmm.ko - kernel module for VT-x, VT-d and hypervisor control
bhyve - user-space sequencer and i/o emulation
vmmctl - dump of hypervisor register state
libvmm - front-end to vmm.ko chardev interface

bhyve was designed and implemented by Neel Natu.

Thanks to the following folk from NetApp who helped to make this available:
Joe CaraDonna
Peter Snyder
Jeff Heller
Sandeep Mann
Steve Miller
Brian Pawlowski