-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suppress unimplemented MSR related warnings #1611
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,7 @@ bhyve_init_config(void) | |
set_config_bool("acpi_tables_in_memory", true); | ||
set_config_value("memory.size", "256M"); | ||
set_config_bool("x86.strictmsr", true); | ||
set_config_bool("x86.verbosemsr", true); | ||
set_config_value("lpc.fwcfg", "bhyve"); | ||
} | ||
|
||
|
@@ -74,7 +75,7 @@ bhyve_usage(int code) | |
progname = getprogname(); | ||
|
||
fprintf(stderr, | ||
"Usage: %s [-aCDeHhPSuWwxY]\n" | ||
"Usage: %s [-aCDeHhPqSuWwxY]\n" | ||
" %*s [-c [[cpus=]numcpus][,sockets=n][,cores=n][,threads=n]]\n" | ||
" %*s [-G port] [-k config_file] [-l lpc] [-m mem] [-o var=value]\n" | ||
" %*s [-p vcpu:hostcpu] [-r file] [-s pci] [-U uuid] vmname\n" | ||
|
@@ -96,6 +97,7 @@ bhyve_usage(int code) | |
#ifdef BHYVE_SNAPSHOT | ||
" -r: path to checkpoint file\n" | ||
#endif | ||
" -q: disable verbose MSR print out\n" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would probably not add a new top-level option as there are already several, and -q is pretty generic. I think having it just settable via '-o' is fine. |
||
" -S: guest memory cannot be swapped\n" | ||
" -s: <slot,driver,configinfo> PCI slot config\n" | ||
" -U: UUID\n" | ||
|
@@ -116,9 +118,9 @@ bhyve_optparse(int argc, char **argv) | |
int c; | ||
|
||
#ifdef BHYVE_SNAPSHOT | ||
optstr = "aehuwxACDHIPSWYk:f:o:p:G:c:s:m:l:K:U:r:"; | ||
optstr = "aehuwxACDHIPqSWYk:f:o:p:G:c:s:m:l:K:U:r:"; | ||
#else | ||
optstr = "aehuwxACDHIPSWYk:f:o:p:G:c:s:m:l:K:U:"; | ||
optstr = "aehuwxACDHIPqSWYk:f:o:p:G:c:s:m:l:K:U:"; | ||
#endif | ||
while ((c = getopt(argc, argv, optstr)) != -1) { | ||
switch (c) { | ||
|
@@ -224,6 +226,9 @@ bhyve_optparse(int argc, char **argv) | |
case 'U': | ||
set_config_value("uuid", optarg); | ||
break; | ||
case 'q': | ||
set_config_value("x86.verbosemsr", false); | ||
break; | ||
case 'w': | ||
set_config_bool("x86.strictmsr", false); | ||
break; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ | |
.Nd "run a guest operating system inside a virtual machine" | ||
.Sh SYNOPSIS | ||
.Nm | ||
.Op Fl aCDeHhPSuWwxY | ||
.Op Fl aCDeHhPqSuWwxY | ||
.Oo | ||
.Sm off | ||
.Fl c\~ | ||
|
@@ -295,6 +295,13 @@ To map a 4 vCPU guest to host CPUs 12-15: | |
.Bd -literal | ||
-p 0:12 -p 1:13 -p 2:14 -p 3:15 | ||
.Ed | ||
.It Fl q | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we don't do -q, we should still document this in bhyve_config.5 which describes all the config nodes. |
||
Disable verbose MSR (Model-Specific Register) print out. | ||
When this option is enabled, bhyve will suppress messages related to reading | ||
from (rdmsr) and writing to (wrmsr) MSRs on virtual CPUs. | ||
This can be useful for reducing log verbosity and preventing the VM console | ||
from being spammed with informational messages, particularly in environments | ||
where such messages are not needed for diagnostic purposes. | ||
.It Fl r Ar file | ||
Resume a guest from a snapshot. | ||
The guest memory contents are restored from | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can actually default it to false, only developers probably care and for users it is just annoying spam.