Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jun 2021 14:04:24 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 85a55e0c5eb0 - stable/13 - vmm: Let guests enable SMEP/SMAP if the host supports it
Message-ID:  <202106161404.15GE4Oa2022056@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=85a55e0c5eb0c3ad6b3ce27c3f4b5e47bf446320

commit 85a55e0c5eb0c3ad6b3ce27c3f4b5e47bf446320
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2021-05-26 13:34:52 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-06-16 14:03:12 +0000

    vmm: Let guests enable SMEP/SMAP if the host supports it
    
    Reviewed by:    kib, grehan, jhb
    Tested by:      grehan (AMD)
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit 4c599db71af56c28bb0388e73bd0570a3873c0ec)
---
 sys/amd64/vmm/x86.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sys/amd64/vmm/x86.c b/sys/amd64/vmm/x86.c
index a4a9c8203fc5..c43a3c870211 100644
--- a/sys/amd64/vmm/x86.c
+++ b/sys/amd64/vmm/x86.c
@@ -441,10 +441,12 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, uint64_t *rax, uint64_t *rbx,
 				 */
 				regs[1] &= (CPUID_STDEXT_FSGSBASE |
 				    CPUID_STDEXT_BMI1 | CPUID_STDEXT_HLE |
-				    CPUID_STDEXT_AVX2 | CPUID_STDEXT_BMI2 |
+				    CPUID_STDEXT_AVX2 | CPUID_STDEXT_SMEP |
+				    CPUID_STDEXT_BMI2 |
 				    CPUID_STDEXT_ERMS | CPUID_STDEXT_RTM |
 				    CPUID_STDEXT_AVX512F |
 				    CPUID_STDEXT_RDSEED |
+				    CPUID_STDEXT_SMAP |
 				    CPUID_STDEXT_AVX512PF |
 				    CPUID_STDEXT_AVX512ER |
 				    CPUID_STDEXT_AVX512CD | CPUID_STDEXT_SHA);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106161404.15GE4Oa2022056>