diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 7882c54bc1..b848e535e6 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -2010,6 +2010,7 @@ <tlbflush state='on'/> <ipi state='on'/> <evmcs state='on'/> + <msrs unknown='ignore'/> </hyperv> <kvm> <hidden state='on'/> @@ -2307,6 +2308,15 @@ defined, the hypervisor default will be used. Since 4.10.0 (QEMU/KVM only) +
msrs
+
Some guests might require ignoring unknown + Model Specific Registers (MSRs) reads and writes. It's possible + to switch this by setting unknown attribute + of msrs to ignore. If the attribute is + not defined, or set to fault, unknown reads and writes + will not be ignored. + Since 5.1.0 (bhyve only) +

Time keeping

diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c index 1f215dac08..52ad3e3714 100644 --- a/src/bhyve/bhyve_command.c +++ b/src/bhyve/bhyve_command.c @@ -506,6 +506,10 @@ virBhyveProcessBuildBhyveCmd(virConnectPtr conn, virCommandAddArg(cmd, "-A"); /* Create an ACPI table */ if (def->features[VIR_DOMAIN_FEATURE_APIC] == VIR_TRISTATE_SWITCH_ON) virCommandAddArg(cmd, "-I"); /* Present ioapic to the guest */ + if (def->features[VIR_DOMAIN_FEATURE_MSRS] == VIR_TRISTATE_SWITCH_ON) { + if (def->msrs_features[VIR_DOMAIN_MSRS_UNKNOWN] == VIR_DOMAIN_MSRS_UNKNOWN_IGNORE) + virCommandAddArg(cmd, "-w"); + } switch (def->clock.offset) { case VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME: diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.args b/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.args new file mode 100644 index 0000000000..dbe377421b --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.args @@ -0,0 +1,10 @@ +/usr/sbin/bhyve \ +-c 1 \ +-m 214 \ +-w \ +-u \ +-H \ +-P \ +-s 0:0,hostbridge \ +-s 2:0,ahci,hd:/tmp/freebsd.img \ +-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.ldargs new file mode 100644 index 0000000000..32538b558e --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.ldargs @@ -0,0 +1,3 @@ +/usr/sbin/bhyveload \ +-m 214 \ +-d /tmp/freebsd.img bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.xml b/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.xml new file mode 100644 index 0000000000..dc9de93abc --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-msrs.xml @@ -0,0 +1,26 @@ + + bhyve + df3be7e7-a104-11e3-aeb0-50e5492bd3dc + 219136 + 1 + + hvm + + + + + + + + + +
+ + + + + +
+ + + diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c index 4a7f65a8e2..c84925c57b 100644 --- a/tests/bhyvexml2argvtest.c +++ b/tests/bhyvexml2argvtest.c @@ -211,6 +211,7 @@ mymain(void) DO_TEST("cputopology"); DO_TEST_FAILURE("cputopology-nvcpu-mismatch"); DO_TEST("commandline"); + DO_TEST("msrs"); /* Address allocation tests */ DO_TEST("addr-single-sata-disk"); diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-msrs.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-msrs.xml new file mode 100644 index 0000000000..7c8594fed8 --- /dev/null +++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-msrs.xml @@ -0,0 +1,36 @@ + + bhyve + df3be7e7-a104-11e3-aeb0-50e5492bd3dc + 219136 + 219136 + 1 + + hvm + + + + + + + destroy + restart + destroy + + + + + +
+ + + +
+ + + + + +
+ + + diff --git a/tests/bhyvexml2xmltest.c b/tests/bhyvexml2xmltest.c index ed421b8839..e8a6867fcd 100644 --- a/tests/bhyvexml2xmltest.c +++ b/tests/bhyvexml2xmltest.c @@ -111,6 +111,7 @@ mymain(void) DO_TEST_DIFFERENT("vnc-vgaconf-io"); DO_TEST_DIFFERENT("vnc-autoport"); DO_TEST_DIFFERENT("commandline"); + DO_TEST_DIFFERENT("msrs"); /* Address allocation tests */ DO_TEST_DIFFERENT("addr-single-sata-disk");