From e5f0b1f271889e8ef3158d3bd3d887b706305ad3 Mon Sep 17 00:00:00 2001 From: Diego Ongaro Date: Fri, 24 Apr 2009 23:58:56 -0500 Subject: [PATCH] Ignore machine-check MSRs --- sys/amd64/include/specialreg.h | 4 ++++ sys/kern/kern_fkvm.c | 40 ++++++++++------------------------------ 2 files changed, 14 insertions(+), 30 deletions(-) diff --git a/sys/amd64/include/specialreg.h b/sys/amd64/include/specialreg.h index 57f45fd9835..67ea3d09dea 100644 --- a/sys/amd64/include/specialreg.h +++ b/sys/amd64/include/specialreg.h @@ -245,6 +245,10 @@ #define MSR_MC4_STATUS 0x411 #define MSR_MC4_ADDR 0x412 #define MSR_MC4_MISC 0x413 +#define MSR_MC5_CTL 0x414 +#define MSR_MC5_STATUS 0x415 +#define MSR_MC5_ADDR 0x416 +#define MSR_MC5_MISC 0x417 /* * Constants related to MSR's. diff --git a/sys/kern/kern_fkvm.c b/sys/kern/kern_fkvm.c index 41eea2d2da3..dcc2412749d 100644 --- a/sys/kern/kern_fkvm.c +++ b/sys/kern/kern_fkvm.c @@ -1513,21 +1513,11 @@ fkvm_get_reg_msr(struct vcpu *vcpu, uint32_t index, uint64_t *data) { break; } - case MSR_MC0_STATUS: { - printf("unimplemented at %d\n", __LINE__); - return ENOSYS; - break; - } - - case MSR_MCG_STATUS: { - printf("unimplemented at %d\n", __LINE__); - return ENOSYS; - break; - } - - case MSR_MCG_CTL: { - printf("unimplemented at %d\n", __LINE__); - return ENOSYS; + case MSR_MCG_CAP: + case MSR_MCG_STATUS: + case MSR_MCG_CTL: + case MSR_MC0_CTL ... MSR_MC5_MISC : { + *data = 0; break; } @@ -1668,21 +1658,11 @@ fkvm_set_reg_msr(struct vcpu *vcpu, uint32_t index, uint64_t data) { break; } - case MSR_MC0_STATUS: { - printf("unimplemented at %d\n", __LINE__); - return ENOSYS; - break; - } - - case MSR_MCG_STATUS: { - printf("unimplemented at %d\n", __LINE__); - return ENOSYS; - break; - } - - case MSR_MCG_CTL: { - printf("unimplemented at %d\n", __LINE__); - return ENOSYS; + case MSR_MCG_CAP: + case MSR_MCG_STATUS: + case MSR_MCG_CTL: + case MSR_MC0_CTL ... MSR_MC5_MISC : { + /* ignore */ break; } -- 2.11.4.GIT