From: Dean Nelson <dnelson@redhat.com>
To: kvm@vger.kernel.org
Subject: [PATCH] Fix calculation of number of entries based on number of mce_banks
Date: Wed, 6 Oct 2010 10:08:19 -0400 [thread overview]
Message-ID: <20101006140819.7471.6077.send-patch@localhost6.localdomain6> (raw)
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]);
}
}
next reply other threads:[~2010-10-06 14:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-06 14:08 Dean Nelson [this message]
2010-10-06 16:50 ` [PATCH] Fix calculation of number of entries based on number of mce_banks Marcelo Tosatti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101006140819.7471.6077.send-patch@localhost6.localdomain6 \
--to=dnelson@redhat.com \
--cc=kvm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.