Mercurial > illumos > git > illumos-joyent
changeset 25462:28c785eca5b1
13220 Add support for the IA32_FEATURE_CONTROL MSR in bhyve
Reviewed by: Patrick Mooney <pmooney@pfmooney.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Mike Zeller <mike.zeller@joyent.com>
Approved by: Robert Mustacchi <rm@fingolfin.org>
author | Jason King <jason.king@joyent.com> |
---|---|
date | Tue, 13 Oct 2020 16:30:33 -0500 |
parents | c13203e89212 |
children | f14f7aa15b93 5cc24028580a |
files | usr/src/uts/i86pc/io/vmm/intel/vmx_msr.c |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/i86pc/io/vmm/intel/vmx_msr.c Mon Oct 12 12:28:36 2020 +0000 +++ b/usr/src/uts/i86pc/io/vmm/intel/vmx_msr.c Tue Oct 13 16:30:33 2020 -0500 @@ -28,7 +28,7 @@ * $FreeBSD$ */ /* - * Copyright 2017 Joyent, Inc. + * Copyright 2020 Joyent, Inc. */ #include <sys/cdefs.h> @@ -418,6 +418,14 @@ case MSR_MTRR64kBase: *val = 0; break; + case MSR_IA32_FEATURE_CONTROL: + /* + * We currently don't support SGX support in guests, so + * always report those features as disabled with the MSR + * locked so the guest won't attempt to write to it. + */ + *val = IA32_FEATURE_CONTROL_LOCK; + break; case MSR_IA32_MISC_ENABLE: *val = misc_enable; break;