Patchwork [38/49] x86: mcg_cap is never 0

login
register
mail settings
Submitter Juan Quintela
Date Sept. 29, 2009, 8:48 p.m.
Message ID <c49b21fde900aa1d694866c49e67f02e0b522464.1254255997.git.quintela@redhat.com>
Download mbox | patch
Permalink /patch/34491/
State Superseded
Headers show

Comments

Juan Quintela - Sept. 29, 2009, 8:48 p.m.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 target-i386/machine.c |   20 ++++++++------------
 1 files changed, 8 insertions(+), 12 deletions(-)

Patch

diff --git a/target-i386/machine.c b/target-i386/machine.c
index 77c7bcc..3c0ffc2 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -154,12 +154,10 @@  void cpu_save(QEMUFile *f, void *opaque)

     /* MCE */
     qemu_put_be64s(f, &env->mcg_cap);
-    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 * 4; i++) {
-            qemu_put_be64s(f, &env->mce_banks[i]);
-        }
+    qemu_put_be64s(f, &env->mcg_status);
+    qemu_put_be64s(f, &env->mcg_ctl);
+    for (i = 0; i < MCE_BANKS_DEF * 4; i++) {
+        qemu_put_be64s(f, &env->mce_banks[i]);
     }
  }

@@ -348,12 +346,10 @@  int cpu_load(QEMUFile *f, void *opaque, int version_id)

     if (version_id >= 10) {
         qemu_get_be64s(f, &env->mcg_cap);
-        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 * 4; i++) {
-                qemu_get_be64s(f, &env->mce_banks[i]);
-            }
+        qemu_get_be64s(f, &env->mcg_status);
+        qemu_get_be64s(f, &env->mcg_ctl);
+        for (i = 0; i < MCE_BANKS_DEF * 4; i++) {
+            qemu_get_be64s(f, &env->mce_banks[i]);
         }
     }