aboutsummaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-05-03 16:56:46 +0200
committerAndreas Färber <afaerber@suse.de>2012-10-31 04:12:23 +0100
commit23d02d9b4bbe362a5b9cfc3ce1e5cc106eff5664 (patch)
treeff0dba8f2802ff97102fc6b1dc3ec81eadba79ef /target-i386
parent9f09e18a6df39ab11cd80e203c5736af1823f3b3 (diff)
target-i386: Pass X86CPU to kvm_get_mp_state()
Needed for moving halted field to CPUState. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-i386')
-rw-r--r--target-i386/kvm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 64b837b570..7da816f484 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -1367,8 +1367,9 @@ static int kvm_put_mp_state(CPUX86State *env)
return kvm_vcpu_ioctl(env, KVM_SET_MP_STATE, &mp_state);
}
-static int kvm_get_mp_state(CPUX86State *env)
+static int kvm_get_mp_state(X86CPU *cpu)
{
+ CPUX86State *env = &cpu->env;
struct kvm_mp_state mp_state;
int ret;
@@ -1612,10 +1613,10 @@ int kvm_arch_put_registers(CPUX86State *env, int level)
int kvm_arch_get_registers(CPUX86State *env)
{
- CPUState *cpu = ENV_GET_CPU(env);
+ X86CPU *cpu = x86_env_get_cpu(env);
int ret;
- assert(cpu_is_stopped(cpu) || qemu_cpu_is_self(cpu));
+ assert(cpu_is_stopped(CPU(cpu)) || qemu_cpu_is_self(CPU(cpu)));
ret = kvm_getput_regs(env, 0);
if (ret < 0) {
@@ -1637,7 +1638,7 @@ int kvm_arch_get_registers(CPUX86State *env)
if (ret < 0) {
return ret;
}
- ret = kvm_get_mp_state(env);
+ ret = kvm_get_mp_state(cpu);
if (ret < 0) {
return ret;
}