summaryrefslogtreecommitdiffstats
path: root/hw/i386/kvmvapic.c
diff options
context:
space:
mode:
authorAndreas Färber2013-05-27 05:17:50 +0200
committerAndreas Färber2013-07-09 21:20:28 +0200
commit4917cf44326a1bda2fd7f27303aff7a25ad86518 (patch)
treed9c153504b0806990d0c5646c886e16150835d1a /hw/i386/kvmvapic.c
parentkvm: Free current_cpu identifier (diff)
downloadqemu-4917cf44326a1bda2fd7f27303aff7a25ad86518.tar.gz
qemu-4917cf44326a1bda2fd7f27303aff7a25ad86518.tar.xz
qemu-4917cf44326a1bda2fd7f27303aff7a25ad86518.zip
cpu: Replace cpu_single_env with CPUState current_cpu
Move it to qom/cpu.h. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/i386/kvmvapic.c')
-rw-r--r--hw/i386/kvmvapic.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
index 9850a8511a..e13678fa59 100644
--- a/hw/i386/kvmvapic.c
+++ b/hw/i386/kvmvapic.c
@@ -624,11 +624,13 @@ static int vapic_prepare(VAPICROMState *s)
static void vapic_write(void *opaque, hwaddr addr, uint64_t data,
unsigned int size)
{
- CPUX86State *env = cpu_single_env;
+ CPUState *cs = current_cpu;
+ X86CPU *cpu = X86_CPU(cs);
+ CPUX86State *env = &cpu->env;
hwaddr rom_paddr;
VAPICROMState *s = opaque;
- cpu_synchronize_state(CPU(x86_env_get_cpu(env)));
+ cpu_synchronize_state(cs);
/*
* The VAPIC supports two PIO-based hypercalls, both via port 0x7E.