From: Dean Nelson <[email protected]> The number of mce_banks needs to be multiplied by 4 in order to actually reference all of the entries.
Signed-off-by: Dean Nelson <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]> diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index e35c234..bb09fd8 100644 --- a/qemu-kvm-x86.c +++ b/qemu-kvm-x86.c @@ -975,7 +975,7 @@ void kvm_arch_load_regs(CPUState *env, int level) } else if (level == KVM_PUT_FULL_STATE) { kvm_msr_entry_set(&msrs[n++], MSR_MCG_STATUS, env->mcg_status); kvm_msr_entry_set(&msrs[n++], MSR_MCG_CTL, env->mcg_ctl); - for (i = 0; i < (env->mcg_cap & 0xff); i++) { + for (i = 0; i < (env->mcg_cap & 0xff) * 4; i++) { kvm_msr_entry_set(&msrs[n++], MSR_MC0_CTL + i, env->mce_banks[i]); } } -- To unsubscribe from this list: send the line "unsubscribe kvm-commits" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
