aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/bhyve/amd64/vmexit.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bhyve/amd64/vmexit.c')
-rw-r--r--usr.sbin/bhyve/amd64/vmexit.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/usr.sbin/bhyve/amd64/vmexit.c b/usr.sbin/bhyve/amd64/vmexit.c
index e0b9aec2d17a..944f5de34645 100644
--- a/usr.sbin/bhyve/amd64/vmexit.c
+++ b/usr.sbin/bhyve/amd64/vmexit.c
@@ -107,8 +107,11 @@ vmexit_rdmsr(struct vmctx *ctx __unused, struct vcpu *vcpu,
val = 0;
error = emulate_rdmsr(vcpu, vme->u.msr.code, &val);
if (error != 0) {
- EPRINTLN("rdmsr to register %#x on vcpu %d",
- vme->u.msr.code, vcpu_id(vcpu));
+ if (get_config_bool("x86.strictmsr") ||
+ get_config_bool("x86.verbosemsr")) {
+ EPRINTLN("rdmsr to register %#x on vcpu %d",
+ vme->u.msr.code, vcpu_id(vcpu));
+ }
if (get_config_bool("x86.strictmsr")) {
vm_inject_gp(vcpu);
return (VMEXIT_CONTINUE);
@@ -137,8 +140,11 @@ vmexit_wrmsr(struct vmctx *ctx __unused, struct vcpu *vcpu,
error = emulate_wrmsr(vcpu, vme->u.msr.code, vme->u.msr.wval);
if (error != 0) {
- EPRINTLN("wrmsr to register %#x(%#lx) on vcpu %d",
- vme->u.msr.code, vme->u.msr.wval, vcpu_id(vcpu));
+ if (get_config_bool("x86.strictmsr") ||
+ get_config_bool("x86.verbosemsr")) {
+ EPRINTLN("wrmsr to register %#x(%#lx) on vcpu %d",
+ vme->u.msr.code, vme->u.msr.wval, vcpu_id(vcpu));
+ }
if (get_config_bool("x86.strictmsr")) {
vm_inject_gp(vcpu);
return (VMEXIT_CONTINUE);