That is quite a large hammer. It would be preferable to find out which msr it objects to and guard it with a specific cpuid check, and/or fix the hypervisor.
On Mon, May 20, 2013 at 10:34:43AM +0300, Roman Kravchuk wrote: > patch_amd64errata.diff > > Index: amd64/amd64/amd64errata.c > =================================================================== > RCS file: /cvs/src/sys/arch/amd64/amd64/amd64errata.c,v > retrieving revision 1.3 > diff -u -p -u -p -r1.3 amd64errata.c > --- amd64/amd64/amd64errata.c 27 Mar 2012 05:59:46 -0000 1.3 > +++ amd64/amd64/amd64errata.c 19 May 2013 23:48:11 -0000 > @@ -293,6 +293,9 @@ amd64_errata(struct cpu_info *ci) > int found = 0; > int corrected = 0; > > + if (ci->ci_feature_eflags & CPUIDECX_RAZ) > + return; > + > CPUID(0x80000001, code, dummy, dummy, dummy); > > for (i = 0; ; i += 2) { > Index: amd64/amd64/identcpu.c > =================================================================== > RCS file: /cvs/src/sys/arch/amd64/amd64/identcpu.c,v > retrieving revision 1.47 > diff -u -p -u -p -r1.47 identcpu.c > --- amd64/amd64/identcpu.c 6 May 2013 04:32:12 -0000 1.47 > +++ amd64/amd64/identcpu.c 19 May 2013 23:48:11 -0000 > @@ -129,6 +129,7 @@ const struct { > { CPUIDECX_AVX, "AVX" }, > { CPUIDECX_F16C, "F16C" }, > { CPUIDECX_RDRAND, "RDRAND" }, > + { CPUIDECX_RAZ, "RAZ" } > }, cpu_ecpuid_ecxfeatures[] = { > { CPUIDECX_LAHF, "LAHF" }, > { CPUIDECX_CMPLEG, "CMPLEG" }, > Index: amd64/include/specialreg.h > =================================================================== > RCS file: /cvs/src/sys/arch/amd64/include/specialreg.h,v > retrieving revision 1.25 > diff -u -p -u -p -r1.25 specialreg.h > --- amd64/include/specialreg.h 6 May 2013 04:32:12 -0000 1.25 > +++ amd64/include/specialreg.h 19 May 2013 23:48:11 -0000 > @@ -158,6 +158,7 @@ > #define CPUIDECX_AVX 0x10000000 /* Advanced Vector Extensions */ > #define CPUIDECX_F16C 0x20000000 /* 16bit fp conversion */ > #define CPUIDECX_RDRAND 0x40000000 /* RDRAND instruction */ > +#define CPUIDECX_RAZ 0x80000000 /* RAZ. Indicates guest state. */ > > /* > * "Structured Extended Feature Flags Parameters" (CPUID function 0x7, > leaf 0)