Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 May 2019 21:20:39 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r347964 - head/sys/amd64/vmm
Message-ID:  <201905182120.x4ILKdwG054657@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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,



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