Skip to content

Commit acc4d9e

Browse files
committed
Allow user to specific the -w bhyve option (ignore_bad_msr=yes)
1 parent e4bbcc5 commit acc4d9e

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

lib/vm-run

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ vm::run(){
3939
local _guest_support _uefi _uuid _utc _debug _hostbridge _loader
4040
local _opts _devices _slot=4 _func=0 _taplist _exit _passdev
4141
local _com _comports _comstring _logpath="/dev/null" _bootrom _run=1
42+
local _ignore_msr
4243

4344
# try to load datstore details
4445
datastore::get_guest "${_name}" || exit 5
@@ -58,6 +59,7 @@ vm::run(){
5859
config::get "_uuid" "uuid"
5960
config::get "_utc" "utctime" "no"
6061
config::get "_debug" "debug" "no"
62+
config::get "_ignore_msr" "ignore_bad_msr" "no"
6163

6264
util::log_rotate "guest" "${_name}"
6365
util::log "guest" "${_name}" "initialising"
@@ -98,6 +100,9 @@ vm::run(){
98100
# default bhyve options
99101
_opts="-AHP"
100102

103+
# ignore access to unimplemented Model Specific Registers?
104+
util::checkyesno "${_ignore_msr}" && _opts="${_opts}w"
105+
101106
# if uefi, make sure we have bootrom, then update options for uefi support
102107
if util::checkyesno "${_uefi}"; then
103108
if [ ${VERSION_BSD} -lt 1002509 ]; then

vm.8

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -938,6 +938,13 @@ based on the hostname and guest name. Because this may change if guests are move
938938
between systems, the
939939
.Pa vm create
940940
command automatically assigns a UUID to all newly created guests.
941+
.It ignore_bad_msr
942+
Set to
943+
.Sy true|on|yes|1
944+
to configure
945+
.Xr bhyve 8
946+
to ignore accesses to unimplemented model specific registers. This is commonly required
947+
on AMD processors, although is enabled by default for UEFI guests.
941948
.It grub_installX
942949
This option allows you to specify grub commands needed to boot the install media for
943950
this guest.

0 commit comments

Comments
 (0)