summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--target-i386/kvm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index f73b47b97c..c9ec72eee7 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -949,6 +949,8 @@ int kvm_arch_put_registers(CPUState *env, int level)
{
int ret;
+ assert(cpu_is_stopped(env) || qemu_cpu_self(env));
+
ret = kvm_getput_regs(env, 1);
if (ret < 0)
return ret;
@@ -991,6 +993,8 @@ int kvm_arch_get_registers(CPUState *env)
{
int ret;
+ assert(cpu_is_stopped(env) || qemu_cpu_self(env));
+
ret = kvm_getput_regs(env, 0);
if (ret < 0)
return ret;