Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 PR/47677 Aktado: x86_errata() should be avo...



details:   https://anonhg.NetBSD.org/src/rev/c59ea2474b6e
branches:  trunk
changeset: 785579:c59ea2474b6e
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Mar 21 13:22:37 2013 +0000

description:
PR/47677 Aktado: x86_errata() should be avoided if NetBSD runs as a KVM guest.
XXX: pullup to 6

diffstat:

 sys/arch/x86/x86/errata.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (30 lines):

diff -r 349c510abae1 -r c59ea2474b6e sys/arch/x86/x86/errata.c
--- a/sys/arch/x86/x86/errata.c Thu Mar 21 12:56:03 2013 +0000
+++ b/sys/arch/x86/x86/errata.c Thu Mar 21 13:22:37 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: errata.c,v 1.20 2012/04/06 17:23:39 chs Exp $  */
+/*     $NetBSD: errata.c,v 1.21 2013/03/21 13:22:37 christos Exp $     */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: errata.c,v 1.20 2012/04/06 17:23:39 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: errata.c,v 1.21 2013/03/21 13:22:37 christos Exp $");
 
 #include <sys/types.h>
 #include <sys/systm.h>
@@ -329,6 +329,11 @@
        int i, j, upgrade;
        static int again;
 
+       /* don't run if we are under a hypervisor */
+       if (cpu_feature[1] & CPUID2_RAZ)
+               return;
+
+       /* only for AMD */
        if (cpu_vendor != CPUVENDOR_AMD)
                return;
 



Home | Main Index | Thread Index | Old Index