diff options
author | rab <none@none> | 2006-09-21 12:13:52 -0700 |
---|---|---|
committer | rab <none@none> | 2006-09-21 12:13:52 -0700 |
commit | 8d7f0877f4c9a1ee53f944a797f11020116baeb5 (patch) | |
tree | b95ee5c54a91ac55d5be48edbac28a0217ff12dd /usr/src | |
parent | a0e56b0eb1fdc159ff8348ca0e77d884bb7d126b (diff) | |
download | illumos-gate-8d7f0877f4c9a1ee53f944a797f11020116baeb5.tar.gz |
6397255 VMWare fails to emulate Opteron MSRs properly, causing ASSERT failure
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/uts/i86pc/cpu/amd_opteron/ao_main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/usr/src/uts/i86pc/cpu/amd_opteron/ao_main.c b/usr/src/uts/i86pc/cpu/amd_opteron/ao_main.c index ef16828383..f07a18c063 100644 --- a/usr/src/uts/i86pc/cpu/amd_opteron/ao_main.c +++ b/usr/src/uts/i86pc/cpu/amd_opteron/ao_main.c @@ -39,6 +39,7 @@ #include <sys/kmem.h> #include <sys/modctl.h> #include <sys/mc.h> +#include <sys/mca_x86.h> #include "ao.h" @@ -54,10 +55,18 @@ static int ao_init(cpu_t *cp, void **datap) { ao_data_t *ao; + uint64_t cap; if (cpuid_getmodel(cp) >= ao_model_limit) return (ENOTSUP); + if (!(x86_feature & X86_MCA)) + return (ENOTSUP); + + cap = rdmsr(IA32_MSR_MCG_CAP); + if (!(cap & MCG_CAP_CTL_P)) + return (ENOTSUP); + ao = *datap = kmem_zalloc(sizeof (ao_data_t), KM_SLEEP); ao->ao_cpu = cp; |