* [PATCH] Fix calculation of number of entries based on number of mce_banks
@ 2010-10-06 14:08 Dean Nelson
2010-10-06 16:50 ` Marcelo Tosatti
0 siblings, 1 reply; 2+ messages in thread
From: Dean Nelson @ 2010-10-06 14:08 UTC (permalink / raw)
To: kvm
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 <dnelson@redhat.com>
---
qemu-kvm-x86.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index fd974b3..7fd82fb 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]);
}
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix calculation of number of entries based on number of mce_banks
2010-10-06 14:08 [PATCH] Fix calculation of number of entries based on number of mce_banks Dean Nelson
@ 2010-10-06 16:50 ` Marcelo Tosatti
0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2010-10-06 16:50 UTC (permalink / raw)
To: Dean Nelson; +Cc: kvm
On Wed, Oct 06, 2010 at 10:08:19AM -0400, Dean Nelson wrote:
> 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 <dnelson@redhat.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-06 17:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-06 14:08 [PATCH] Fix calculation of number of entries based on number of mce_banks Dean Nelson
2010-10-06 16:50 ` Marcelo Tosatti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox