aboutsummaryrefslogtreecommitdiff
path: root/kvm-all.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-12-01 06:18:14 +0100
committerAndreas Färber <afaerber@suse.de>2012-12-19 14:09:32 +0100
commitf7575c96c6058763fe3bd8dd26f3d09473f2df36 (patch)
tree9f9c620c6d38d0440d7517946088123412aa1c31 /kvm-all.c
parenta60f24b56b07f46453424263b276b0879c25c4e6 (diff)
cpu: Move kvm_run into CPUState
Pass CPUState / {X86,S390}CPU to helper functions. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kvm-all.c b/kvm-all.c
index ba139ab13c..f687229da8 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -240,9 +240,9 @@ int kvm_init_vcpu(CPUArchState *env)
goto err;
}
- env->kvm_run = mmap(NULL, mmap_size, PROT_READ | PROT_WRITE, MAP_SHARED,
+ cpu->kvm_run = mmap(NULL, mmap_size, PROT_READ | PROT_WRITE, MAP_SHARED,
cpu->kvm_fd, 0);
- if (env->kvm_run == MAP_FAILED) {
+ if (cpu->kvm_run == MAP_FAILED) {
ret = -errno;
DPRINTF("mmap'ing vcpu state failed\n");
goto err;
@@ -250,7 +250,7 @@ int kvm_init_vcpu(CPUArchState *env)
if (s->coalesced_mmio && !s->coalesced_mmio_ring) {
s->coalesced_mmio_ring =
- (void *)env->kvm_run + s->coalesced_mmio * PAGE_SIZE;
+ (void *)cpu->kvm_run + s->coalesced_mmio * PAGE_SIZE;
}
ret = kvm_arch_init_vcpu(cpu);
@@ -1529,7 +1529,7 @@ void kvm_cpu_synchronize_post_init(CPUArchState *env)
int kvm_cpu_exec(CPUArchState *env)
{
CPUState *cpu = ENV_GET_CPU(env);
- struct kvm_run *run = env->kvm_run;
+ struct kvm_run *run = cpu->kvm_run;
int ret, run_ret;
DPRINTF("kvm_cpu_exec()\n");