summaryrefslogtreecommitdiff
path: root/target-i386/helper.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-09-29 22:48:55 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-05 09:32:41 -0500
commitac74d0f1fc1cc7d57b3bb4aea2d0b0f08e755476 (patch)
treed834379a7d33eeae14372fe783dd013355f44908 /target-i386/helper.c
parent60a902f1c329757705dea416abd741c1f11d3186 (diff)
downloadqemu-ac74d0f1fc1cc7d57b3bb4aea2d0b0f08e755476.tar.gz
x86: mce_banks always have the same size
mce_banks is always MCE_BANKS_DEF * 4 in size, value never change CC: Huang Ying <ying.huang@intel.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'target-i386/helper.c')
-rw-r--r--target-i386/helper.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c
index 999c1bfb14..c9615444e3 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -1597,8 +1597,7 @@ static void mce_init(CPUX86State *cenv)
&& (cenv->cpuid_features&(CPUID_MCE|CPUID_MCA)) == (CPUID_MCE|CPUID_MCA)) {
cenv->mcg_cap = MCE_CAP_DEF | MCE_BANKS_DEF;
cenv->mcg_ctl = ~(uint64_t)0;
- bank_num = cenv->mcg_cap & 0xff;
- cenv->mce_banks = qemu_mallocz(bank_num * sizeof(uint64_t) * 4);
+ bank_num = MCE_BANKS_DEF;
for (bank = 0; bank < bank_num; bank++)
cenv->mce_banks[bank*4] = ~(uint64_t)0;
}