From 2b9481465d6ee67ac62c160dbf79c3ec3348c611 Mon Sep 17 00:00:00 2001 From: Andy Fiddaman Date: Fri, 26 Mar 2021 14:06:33 +0000 Subject: 13674 bhyve upstream sync 2021 March Reviewed by: Patrick Mooney Reviewed by: Jorge Schrauwen Reviewed by: Mike Zeller Reviewed by: C Fraire Approved by: Dan McDonald --- usr/src/cmd/bhyve/inout.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'usr/src/cmd/bhyve/inout.c') diff --git a/usr/src/cmd/bhyve/inout.c b/usr/src/cmd/bhyve/inout.c index 27068023d3..0548807730 100644 --- a/usr/src/cmd/bhyve/inout.c +++ b/usr/src/cmd/bhyve/inout.c @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include "bhyverun.h" +#include "config.h" #include "inout.h" SET_DECLARE(inout_port_set, struct inout_port); @@ -116,7 +117,7 @@ register_default_iohandler(int start, int size) } int -emulate_inout(struct vmctx *ctx, int vcpu, struct vm_inout *inout, bool strict) +emulate_inout(struct vmctx *ctx, int vcpu, struct vm_inout *inout) { struct inout_handler handler; inout_func_t hfunc; @@ -134,7 +135,8 @@ emulate_inout(struct vmctx *ctx, int vcpu, struct vm_inout *inout, bool strict) hfunc = handler.handler; harg = handler.arg; - if (strict && hfunc == default_inout) + if (hfunc == default_inout && + get_config_bool_default("x86.strictio", false)) return (-1); if (in) { -- cgit v1.2.3