svn commit: r279227 - head/usr.sbin/bhyve

Neel Natu neel at FreeBSD.org
Tue Feb 24 05:15:42 UTC 2015


Author: neel
Date: Tue Feb 24 05:15:40 2015
New Revision: 279227
URL: https://svnweb.freebsd.org/changeset/base/279227

Log:
  Emulate MSR 0xC0011024 when running on AMD processors.
  
  OpenBSD guests test bit 0 of this MSR to detect whether the workaround for
  erratum 721 has been applied.
  
  Reported by:	Jason Tubnor (jason at tubnor.net)
  MFC after:	1 week

Modified:
  head/usr.sbin/bhyve/xmsr.c

Modified: head/usr.sbin/bhyve/xmsr.c
==============================================================================
--- head/usr.sbin/bhyve/xmsr.c	Tue Feb 24 04:05:32 2015	(r279226)
+++ head/usr.sbin/bhyve/xmsr.c	Tue Feb 24 05:15:40 2015	(r279227)
@@ -185,6 +185,15 @@ emulate_rdmsr(struct vmctx *ctx, int vcp
 			*val = 0;
 			break;
 
+		/*
+		 * OpenBSD guests test bit 0 of this MSR to detect if the
+		 * workaround for erratum 721 is already applied.
+		 * http://support.amd.com/TechDocs/41322_10h_Rev_Gd.pdf
+		 */
+		case 0xC0011029:
+			*val = 1;
+			break;
+
 		default:
 			error = -1;
 			break;


More information about the svn-src-head mailing list