diff options
author | grehan <grehan@FreeBSD.org> | 2016-02-01 14:56:11 +0000 |
---|---|---|
committer | grehan <grehan@FreeBSD.org> | 2016-02-01 14:56:11 +0000 |
commit | 83c1d10f0ce6085d288212702d5b72432e3a184b (patch) | |
tree | 221f5a6c07cf26f275b8166b1d46c75f5afdaa8b /share/examples | |
parent | 9c4de571a758cb693a9c36eefd957350944f11b2 (diff) | |
download | FreeBSD-src-83c1d10f0ce6085d288212702d5b72432e3a184b.zip FreeBSD-src-83c1d10f0ce6085d288212702d5b72432e3a184b.tar.gz |
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)
Diffstat (limited to 'share/examples')
-rwxr-xr-x | share/examples/bhyve/vmrun.sh | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/share/examples/bhyve/vmrun.sh b/share/examples/bhyve/vmrun.sh index eeaf281..72193de 100755 --- a/share/examples/bhyve/vmrun.sh +++ b/share/examples/bhyve/vmrun.sh @@ -48,8 +48,8 @@ usage() { echo "Usage: vmrun.sh [-ahi] [-c <CPUs>] [-C <console>] [-d <disk file>]" echo " [-e <name=value>] [-g <gdbport> ] [-H <directory>]" - echo " [-I <location of installation iso>] [-m <memsize>]" - echo " [-t <tapdev>] <vmname>" + echo " [-I <location of installation iso>] [-l <loader>]" + echo " [-m <memsize>] [-t <tapdev>] <vmname>" echo "" echo " -h: display this help message" echo " -a: force memory mapped local APIC access" @@ -61,6 +61,7 @@ usage() { echo " -H: host filesystem to export to the loader" echo " -i: force boot of the Installation CDROM image" echo " -I: Installation CDROM image location (default is ${DEFAULT_ISOFILE})" + echo " -l: the OS loader to use (default is /boot/userboot.so)" echo " -m: memory size (default is ${DEFAULT_MEMSIZE})" echo " -p: pass-through a host PCI device at bus/slot/func (e.g. 10/0/0)" echo " -t: tap device for virtio-net (default is $DEFAULT_TAPDEV)" @@ -87,15 +88,15 @@ console=${DEFAULT_CONSOLE} cpus=${DEFAULT_CPUS} tap_total=0 disk_total=0 -apic_opt="" gdbport=0 loader_opt="" +bhyverun_opt="-H -A -P" pass_total=0 -while getopts ac:C:d:e:g:hH:iI:m:p:t: c ; do +while getopts ac:C:d:e:g:hH:iI:l:m:p:t: c ; do case $c in a) - apic_opt="-a" + bhyverun_opt="${bhyverun_opt} -a" ;; c) cpus=${OPTARG} @@ -125,6 +126,9 @@ while getopts ac:C:d:e:g:hH:iI:m:p:t: c ; do I) isofile=${OPTARG} ;; + l) + loader_opt="${loader_opt} -l ${OPTARG}" + ;; m) memsize=${OPTARG} ;; @@ -163,6 +167,12 @@ if [ -n "${host_base}" ]; then loader_opt="${loader_opt} -h ${host_base}" fi +# If PCI passthru devices are configured then guest memory must be wired +if [ ${pass_total} -gt 0 ]; then + loader_opt="${loader_opt} -S" + bhyverun_opt="${bhyverun_opt} -S" +fi + make_and_check_diskdev() { local virtio_diskdev="$1" @@ -263,7 +273,7 @@ while [ 1 ]; do i=$(($i + 1)) done - ${FBSDRUN} -c ${cpus} -m ${memsize} ${apic_opt} -A -H -P \ + ${FBSDRUN} -c ${cpus} -m ${memsize} ${bhyverun_opt} \ -g ${gdbport} \ -s 0:0,hostbridge \ -s 1:0,lpc \ |