On 1/25/19 12:54 PM, Roman Bogorodskiy wrote:
Roman Bogorodskiy (3):
conf: introduce 'msrs' feature
bhyve: implement MSRs ignore unknown writes feature
news: document bhyve msrs feature
docs/drvbhyve.html.in | 16 +++++++++
docs/formatdomain.html.in | 1 +
docs/news.xml | 11 ++++++
docs/schemas/domaincommon.rng | 14 ++++++++
src/bhyve/bhyve_command.c | 4 +++
src/conf/domain_conf.c | 33 +++++++++++++++++
src/conf/domain_conf.h | 8 +++++
src/qemu/qemu_domain.c | 1 +
.../bhyvexml2argvdata/bhyvexml2argv-msrs.args | 10 ++++++
.../bhyvexml2argv-msrs.ldargs | 3 ++
.../bhyvexml2argvdata/bhyvexml2argv-msrs.xml | 26 ++++++++++++++
tests/bhyvexml2argvtest.c | 1 +
.../bhyvexml2xmlout-msrs.xml | 36 +++++++++++++++++++
tests/bhyvexml2xmltest.c | 1 +
14 files changed, 165 insertions(+)
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-msrs.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-msrs.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-msrs.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-msrs.xml
The code looks fine to me but this needs a bit more context.
Particularly 'ignore' is a bit ambiguous here so I had to dig
kvm+linux has arguably always ignored unknown MSRs but historically it
would print an error in host dmesg which often confused users quite a
bit. In the bhyve case it seems that unknown MSRs cause the VM to
essentially crash which is a pretty intense reaction. This option
disables that crashing behavior. So for this feature to be really
descriptive it would be <msrs crashOnUnknown='yes|no' /> or something
like that
The bhyve man page says:
https://www.freebsd.org/cgi/man.cgi?query=bhyve&sektion=8
-w Ignore accesses to unimplemented Model Specific Registers
(MSRs). This is intended for debug purposes.
Calling it 'intended for debug purposes' also makes me question whether
this should be encoded in the libvirt XML or just worked around with
commandline passthrough
(IMO To be friendly to users this option should be enabled by default
but obviously that's against the intention of bhyve devs...)
ccing danpb to see if he has any thoughs about exposing this in the XML
- Cole