svn commit: r347964 - head/sys/amd64/vmm

John Baldwin jhb at FreeBSD.org
Sat May 18 21:20:40 UTC 2019


Author: jhb
Date: Sat May 18 21:20:38 2019
New Revision: 347964
URL: https://svnweb.freebsd.org/changeset/base/347964

Log:
  Expose the MD_CLEAR capability used by Intel MDS mitigations to guests.
  
  Submitted by:	Patrick Mooney <pmooney at pfmooney.com>
  Reviewed by:	kib
  Tested by:	Patrick on SmartOS with Linux and Windows guests
  Obtained from:	Joyent
  MFC after:	3 days
  Differential Revision:	https://reviews.freebsd.org/D20296

Modified:
  head/sys/amd64/vmm/x86.c

Modified: head/sys/amd64/vmm/x86.c
==============================================================================
--- head/sys/amd64/vmm/x86.c	Sat May 18 21:01:36 2019	(r347963)
+++ head/sys/amd64/vmm/x86.c	Sat May 18 21:20:38 2019	(r347964)
@@ -437,7 +437,7 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id,
 				    CPUID_STDEXT_AVX512ER |
 				    CPUID_STDEXT_AVX512CD | CPUID_STDEXT_SHA);
 				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