Mercurial > illumos > illumos-gate
changeset 14058:e9339ccf0537
3832 AMD E721 workaround panics on KVM
Reviewed by: Marcel Telka <marcel@telka.sk>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Dan McDonald <danmcd@nexenta.com>
author | Hans Rosenfeld <hans.rosenfeld@nexenta.com> |
---|---|
date | Wed, 19 Jun 2013 13:34:25 -0400 |
parents | b99338e2b7ed |
children | 1a63e2c4c1b9 |
files | usr/src/uts/i86pc/os/mp_startup.c |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/i86pc/os/mp_startup.c Wed Jun 19 07:56:09 2013 -0700 +++ b/usr/src/uts/i86pc/os/mp_startup.c Wed Jun 19 13:34:25 2013 -0400 @@ -28,6 +28,7 @@ */ /* * Copyright (c) 2012, Joyent, Inc. All rights reserved. + * Copyright 2013 Nexenta Systems, Inc. All rights reserved. */ #include <sys/types.h> @@ -77,6 +78,7 @@ #include <sys/hypervisor.h> #endif #include <sys/cpu_module.h> +#include <sys/ontrap.h> struct cpu cpus[1]; /* CPU data */ struct cpu *cpu[NCPU] = {&cpus[0]}; /* pointers to all CPUs */ @@ -1186,7 +1188,13 @@ if (cpuid_opteron_erratum(cpu, 721) > 0) { #if defined(OPTERON_ERRATUM_721) - wrmsr(MSR_AMD_DE_CFG, rdmsr(MSR_AMD_DE_CFG) | AMD_DE_CFG_E721); + on_trap_data_t otd; + + if (!on_trap(&otd, OT_DATA_ACCESS)) + wrmsr(MSR_AMD_DE_CFG, + rdmsr(MSR_AMD_DE_CFG) | AMD_DE_CFG_E721); + no_trap(); + opteron_erratum_721++; #else workaround_warning(cpu, 721);