qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v5 4/4] target-i386: abort migration if LMCE config


From: Haozhong Zhang
Subject: [Qemu-devel] [PATCH v5 4/4] target-i386: abort migration if LMCE config mismatch
Date: Wed, 22 Jun 2016 14:56:24 +0800

... to avoid guest errors due to LMCE configurations changes when
migrating from LMCE-enabled QEMU to LMCE-disabled QEMU.

Signed-off-by: Haozhong Zhang <address@hidden>
---
 target-i386/machine.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/target-i386/machine.c b/target-i386/machine.c
index 71c0e4d..00375a3 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -347,6 +347,12 @@ static int cpu_post_load(void *opaque, int version_id)
         return -EINVAL;
     }
 
+    if (!cpu->enable_lmce && (env->mcg_cap & MCG_LMCE_P)) {
+        error_report("Config mismatch: VCPU has LMCE enabled, "
+                     "but \"lmce\" option is disabled");
+        return -EINVAL;
+    }
+
     /*
      * Real mode guest segments register DPL should be zero.
      * Older KVM version were setting it wrongly.
-- 
2.9.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]