summaryrefslogtreecommitdiff
path: root/target-i386/machine.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-09-29 22:48:56 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-05 09:32:41 -0500
commit353e9df7f40998e92f7e5232d700478a2c5ba2aa (patch)
treebf5906004007fe3db4ce9e9b5476d8cdaf6d6f84 /target-i386/machine.c
parent92344599b10feb54959e46a67472fba8685e4c43 (diff)
downloadqemu-353e9df7f40998e92f7e5232d700478a2c5ba2aa.tar.gz
qemu-353e9df7f40998e92f7e5232d700478a2c5ba2aa.tar.bz2
qemu-353e9df7f40998e92f7e5232d700478a2c5ba2aa.zip
x86: send mce_banks as an array
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'target-i386/machine.c')
-rw-r--r--target-i386/machine.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/target-i386/machine.c b/target-i386/machine.c
index 7dc8afc52e..27c4a408e1 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -157,11 +157,8 @@ void cpu_save(QEMUFile *f, void *opaque)
if (env->mcg_cap) {
qemu_put_be64s(f, &env->mcg_status);
qemu_put_be64s(f, &env->mcg_ctl);
- for (i = 0; i < MCE_BANKS_DEF; i++) {
- qemu_put_be64s(f, &env->mce_banks[4*i]);
- qemu_put_be64s(f, &env->mce_banks[4*i + 1]);
- qemu_put_be64s(f, &env->mce_banks[4*i + 2]);
- qemu_put_be64s(f, &env->mce_banks[4*i + 3]);
+ for (i = 0; i < MCE_BANKS_DEF * 4; i++) {
+ qemu_put_be64s(f, &env->mce_banks[i]);
}
}
qemu_put_be64s(f, &env->tsc_aux);
@@ -355,11 +352,8 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id)
if (env->mcg_cap) {
qemu_get_be64s(f, &env->mcg_status);
qemu_get_be64s(f, &env->mcg_ctl);
- for (i = 0; i < MCE_BANKS_DEF; i++) {
- qemu_get_be64s(f, &env->mce_banks[4*i]);
- qemu_get_be64s(f, &env->mce_banks[4*i + 1]);
- qemu_get_be64s(f, &env->mce_banks[4*i + 2]);
- qemu_get_be64s(f, &env->mce_banks[4*i + 3]);
+ for (i = 0; i < MCE_BANKS_DEF * 4; i++) {
+ qemu_get_be64s(f, &env->mce_banks[i]);
}
}
}