diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2013-06-28 11:48:09 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-06-28 11:48:09 -0500 |
commit | 8a9c98aedc1a3fb4dfbebeccc926e273df54f2ba (patch) | |
tree | b800dd8b6131717bf397103ec4d7199f67ea0c5c /hw | |
parent | 36125631e79d53ffb9365740f43f386e2171d116 (diff) | |
parent | c658b94f6e8c206c59d02aa6fbac285b86b53d2c (diff) |
Merge remote-tracking branch 'afaerber/qom-cpu' into staging
# By Andreas Färber
# Via Andreas Färber
* afaerber/qom-cpu: (24 commits)
cpu: Turn cpu_unassigned_access() into a CPUState hook
hwaddr: Make hwaddr type usable beyond softmmu
cpu: Change qemu_init_vcpu() argument to CPUState
cpus: Change qemu_dummy_start_vcpu() argument to CPUState
cpus: Change qemu_kvm_start_vcpu() argument to CPUState
cpus: Change cpu_handle_guest_debug() argument to CPUState
gdbstub: Set gdb_set_stop_cpu() argument to CPUState
kvm: Change kvm_cpu_exec() argument to CPUState
kvm: Change kvm_handle_internal_error() argument to CPUState
cpu: Turn cpu_dump_{state,statistics}() into CPUState hooks
cpus: Change qemu_kvm_init_cpu_signals() argument to CPUState
kvm: Change kvm_set_signal_mask() argument to CPUState
cpus: Change qemu_kvm_wait_io_event() argument to CPUState
cpus: Change cpu_thread_is_idle() argument to CPUState
cpu: Change cpu_exit() argument to CPUState
kvm: Change cpu_synchronize_state() argument to CPUState
kvm: Change kvm_cpu_synchronize_state() argument to CPUState
gdbstub: Simplify find_cpu()
cpu: Guard cpu_{save,load}() definitions
target-openrisc: Register VMStateDescription for OpenRISCCPU
...
Diffstat (limited to 'hw')
-rw-r--r-- | hw/alpha/typhoon.c | 14 | ||||
-rw-r--r-- | hw/i386/kvm/apic.c | 2 | ||||
-rw-r--r-- | hw/i386/kvmvapic.c | 4 | ||||
-rw-r--r-- | hw/i386/pc.c | 2 | ||||
-rw-r--r-- | hw/mips/mips_fulong2e.c | 2 | ||||
-rw-r--r-- | hw/mips/mips_jazz.c | 2 | ||||
-rw-r--r-- | hw/mips/mips_malta.c | 2 | ||||
-rw-r--r-- | hw/misc/vmport.c | 2 | ||||
-rw-r--r-- | hw/ppc/ppce500_spin.c | 2 | ||||
-rw-r--r-- | hw/ppc/prep.c | 2 | ||||
-rw-r--r-- | hw/ppc/spapr_rtas.c | 2 |
11 files changed, 21 insertions, 15 deletions
diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c index 1ead1877c7..207dcad2a3 100644 --- a/hw/alpha/typhoon.c +++ b/hw/alpha/typhoon.c @@ -197,7 +197,8 @@ static uint64_t cchip_read(void *opaque, hwaddr addr, unsigned size) break; default: - cpu_unassigned_access(cpu_single_env, addr, 0, 0, 0, size); + cpu = CPU(alpha_env_get_cpu(cpu_single_env)); + cpu_unassigned_access(cpu, addr, false, false, 0, size); return -1; } @@ -214,6 +215,7 @@ static uint64_t dchip_read(void *opaque, hwaddr addr, unsigned size) static uint64_t pchip_read(void *opaque, hwaddr addr, unsigned size) { TyphoonState *s = opaque; + CPUState *cs; uint64_t ret = 0; if (addr & 4) { @@ -300,7 +302,8 @@ static uint64_t pchip_read(void *opaque, hwaddr addr, unsigned size) break; default: - cpu_unassigned_access(cpu_single_env, addr, 0, 0, 0, size); + cs = CPU(alpha_env_get_cpu(cpu_single_env)); + cpu_unassigned_access(cs, addr, false, false, 0, size); return -1; } @@ -312,6 +315,7 @@ static void cchip_write(void *opaque, hwaddr addr, uint64_t v32, unsigned size) { TyphoonState *s = opaque; + CPUState *cpu_single_cpu = CPU(alpha_env_get_cpu(cpu_single_env)); uint64_t val, oldval, newval; if (addr & 4) { @@ -461,7 +465,7 @@ static void cchip_write(void *opaque, hwaddr addr, break; default: - cpu_unassigned_access(cpu_single_env, addr, 1, 0, 0, size); + cpu_unassigned_access(cpu_single_cpu, addr, true, false, 0, size); return; } } @@ -476,6 +480,7 @@ static void pchip_write(void *opaque, hwaddr addr, uint64_t v32, unsigned size) { TyphoonState *s = opaque; + CPUState *cs; uint64_t val, oldval; if (addr & 4) { @@ -577,7 +582,8 @@ static void pchip_write(void *opaque, hwaddr addr, break; default: - cpu_unassigned_access(cpu_single_env, addr, 1, 0, 0, size); + cs = CPU(alpha_env_get_cpu(cpu_single_env)); + cpu_unassigned_access(cs, addr, true, false, 0, size); return; } } diff --git a/hw/i386/kvm/apic.c b/hw/i386/kvm/apic.c index 8f80425ccc..bd0bdd8590 100644 --- a/hw/i386/kvm/apic.c +++ b/hw/i386/kvm/apic.c @@ -129,7 +129,7 @@ static void do_inject_external_nmi(void *data) uint32_t lvt; int ret; - cpu_synchronize_state(&s->cpu->env); + cpu_synchronize_state(cpu); lvt = s->lvt[APIC_LVT_LINT1]; if (!(lvt & APIC_LVT_MASKED) && ((lvt >> 8) & 7) == APIC_DM_NMI) { diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c index 655483bd1d..f93629f9d4 100644 --- a/hw/i386/kvmvapic.c +++ b/hw/i386/kvmvapic.c @@ -456,7 +456,7 @@ void vapic_report_tpr_access(DeviceState *dev, CPUState *cs, target_ulong ip, X86CPU *cpu = X86_CPU(cs); CPUX86State *env = &cpu->env; - cpu_synchronize_state(env); + cpu_synchronize_state(cs); if (evaluate_tpr_instruction(s, env, &ip, access) < 0) { if (s->state == VAPIC_ACTIVE) { @@ -627,7 +627,7 @@ static void vapic_write(void *opaque, hwaddr addr, uint64_t data, hwaddr rom_paddr; VAPICROMState *s = opaque; - cpu_synchronize_state(env); + cpu_synchronize_state(CPU(x86_env_get_cpu(env))); /* * The VAPIC supports two PIO-based hypercalls, both via port 0x7E. diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 5e8f143bc2..78f92e29a7 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1109,7 +1109,7 @@ static void cpu_request_exit(void *opaque, int irq, int level) CPUX86State *env = cpu_single_env; if (env && level) { - cpu_exit(env); + cpu_exit(CPU(x86_env_get_cpu(env))); } } diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index 1aac93a414..00c9071af1 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/mips_fulong2e.c @@ -253,7 +253,7 @@ static void cpu_request_exit(void *opaque, int irq, int level) CPUMIPSState *env = cpu_single_env; if (env && level) { - cpu_exit(env); + cpu_exit(CPU(mips_env_get_cpu(env))); } } diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c index 94d95702a4..2ad0c0b414 100644 --- a/hw/mips/mips_jazz.c +++ b/hw/mips/mips_jazz.c @@ -102,7 +102,7 @@ static void cpu_request_exit(void *opaque, int irq, int level) CPUMIPSState *env = cpu_single_env; if (env && level) { - cpu_exit(env); + cpu_exit(CPU(mips_env_get_cpu(env))); } } diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index 5033d51224..8a4459d0b2 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -773,7 +773,7 @@ static void cpu_request_exit(void *opaque, int irq, int level) CPUMIPSState *env = cpu_single_env; if (env && level) { - cpu_exit(env); + cpu_exit(CPU(mips_env_get_cpu(env))); } } diff --git a/hw/misc/vmport.c b/hw/misc/vmport.c index 57b71f5248..8363dfdf92 100644 --- a/hw/misc/vmport.c +++ b/hw/misc/vmport.c @@ -66,7 +66,7 @@ static uint64_t vmport_ioport_read(void *opaque, hwaddr addr, unsigned char command; uint32_t eax; - cpu_synchronize_state(env); + cpu_synchronize_state(CPU(x86_env_get_cpu(env))); eax = env->regs[R_EAX]; if (eax != VMPORT_MAGIC) diff --git a/hw/ppc/ppce500_spin.c b/hw/ppc/ppce500_spin.c index 1290d37bb9..ea6541413f 100644 --- a/hw/ppc/ppce500_spin.c +++ b/hw/ppc/ppce500_spin.c @@ -98,7 +98,7 @@ static void spin_kick(void *data) hwaddr map_size = 64 * 1024 * 1024; hwaddr map_start; - cpu_synchronize_state(env); + cpu_synchronize_state(cpu); stl_p(&curspin->pir, env->spr[SPR_PIR]); env->nip = ldq_p(&curspin->addr) & (map_size - 1); env->gpr[3] = ldq_p(&curspin->r3); diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 4fdc1649fd..90828f2635 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -420,7 +420,7 @@ static void cpu_request_exit(void *opaque, int irq, int level) CPUPPCState *env = cpu_single_env; if (env && level) { - cpu_exit(env); + cpu_exit(CPU(ppc_env_get_cpu(env))); } } diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index f4bd3c9d86..42ed7dc093 100644 --- a/hw/ppc/spapr_rtas.c +++ b/hw/ppc/spapr_rtas.c @@ -184,7 +184,7 @@ static void rtas_start_cpu(sPAPREnvironment *spapr, /* This will make sure qemu state is up to date with kvm, and * mark it dirty so our changes get flushed back before the * new cpu enters */ - kvm_cpu_synchronize_state(env); + kvm_cpu_synchronize_state(cs); env->msr = (1ULL << MSR_SF) | (1ULL << MSR_ME); env->nip = start; |