svn commit: r348436 - stable/12/sys/amd64/vmm

John Baldwin jhb at FreeBSD.org
Thu May 30 16:40:23 UTC 2019


Author: jhb
Date: Thu May 30 16:40:21 2019
New Revision: 348436
URL: https://svnweb.freebsd.org/changeset/base/348436

Log:
  MFC 347964:
  Expose the MD_CLEAR capability used by Intel MDS mitigations to guests.

Modified:
  stable/12/sys/amd64/vmm/x86.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/amd64/vmm/x86.c
==============================================================================
--- stable/12/sys/amd64/vmm/x86.c	Thu May 30 16:32:18 2019	(r348435)
+++ stable/12/sys/amd64/vmm/x86.c	Thu May 30 16:40:21 2019	(r348436)
@@ -361,7 +361,7 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id,
 				    CPUID_STDEXT_AVX512ER |
 				    CPUID_STDEXT_AVX512CD);
 				regs[2] = 0;
-				regs[3] = 0;
+				regs[3] &= CPUID_STDEXT3_MD_CLEAR;
 
 				/* Advertise INVPCID if it is enabled. */
 				error = vm_get_capability(vm, vcpu_id,


More information about the svn-src-all mailing list