summaryrefslogtreecommitdiff
path: root/hw/i386/pc.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-05-27 05:17:50 +0200
committerAndreas Färber <afaerber@suse.de>2013-07-09 21:20:28 +0200
commit4917cf44326a1bda2fd7f27303aff7a25ad86518 (patch)
treed9c153504b0806990d0c5646c886e16150835d1a /hw/i386/pc.c
parent80b7cd735417b0883a026d79a513629a2817cdb4 (diff)
downloadqemu-4917cf44326a1bda2fd7f27303aff7a25ad86518.tar.gz
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/pc.c')
-rw-r--r--hw/i386/pc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index e00f9dca29..52242568f6 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -886,8 +886,9 @@ void pc_init_ne2k_isa(ISABus *bus, NICInfo *nd)
DeviceState *cpu_get_current_apic(void)
{
- if (cpu_single_env) {
- return cpu_single_env->apic_state;
+ if (current_cpu) {
+ X86CPU *cpu = X86_CPU(current_cpu);
+ return cpu->env.apic_state;
} else {
return NULL;
}
@@ -1176,10 +1177,10 @@ DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus *pci_bus)
static void cpu_request_exit(void *opaque, int irq, int level)
{
- CPUX86State *env = cpu_single_env;
+ CPUState *cpu = current_cpu;
- if (env && level) {
- cpu_exit(CPU(x86_env_get_cpu(env)));
+ if (cpu && level) {
+ cpu_exit(cpu);
}
}