mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
Merge remote-tracking branch 'agraf/s390-for-upstream' into staging
# By Andreas Färber # Via Alexander Graf * agraf/s390-for-upstream: target-s390x: Pass S390CPU to s390_{add, del}_running_cpu() target-s390x: Clean up cpu_inject_*() signatures target-s390x: Fix debug output target-s390x: Fix debug output (continued)
This commit is contained in:
commit
e205842bd9
8 changed files with 42 additions and 33 deletions
|
@ -58,10 +58,12 @@ typedef struct S390IPLState {
|
|||
|
||||
static void s390_ipl_cpu(uint64_t pswaddr)
|
||||
{
|
||||
CPUS390XState *env = &S390_CPU(qemu_get_cpu(0))->env;
|
||||
S390CPU *cpu = S390_CPU(qemu_get_cpu(0));
|
||||
CPUS390XState *env = &cpu->env;
|
||||
|
||||
env->psw.addr = pswaddr;
|
||||
env->psw.mask = IPL_PSW_MASK;
|
||||
s390_add_running_cpu(env);
|
||||
s390_add_running_cpu(cpu);
|
||||
}
|
||||
|
||||
static int s390_ipl_init(SysBusDevice *dev)
|
||||
|
|
|
@ -113,12 +113,10 @@ VirtIOS390Bus *s390_virtio_bus_init(ram_addr_t *ram_size)
|
|||
|
||||
static void s390_virtio_irq(S390CPU *cpu, int config_change, uint64_t token)
|
||||
{
|
||||
CPUS390XState *env = &cpu->env;
|
||||
|
||||
if (kvm_enabled()) {
|
||||
kvm_s390_virtio_irq(cpu, config_change, token);
|
||||
} else {
|
||||
cpu_inject_ext(env, VIRTIO_EXT_CODE, config_change, token);
|
||||
cpu_inject_ext(cpu, VIRTIO_EXT_CODE, config_change, token);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -130,8 +130,10 @@ static void s390_virtio_register_hcalls(void)
|
|||
*/
|
||||
static unsigned s390_running_cpus;
|
||||
|
||||
void s390_add_running_cpu(CPUS390XState *env)
|
||||
void s390_add_running_cpu(S390CPU *cpu)
|
||||
{
|
||||
CPUS390XState *env = &cpu->env;
|
||||
|
||||
if (env->halted) {
|
||||
s390_running_cpus++;
|
||||
env->halted = 0;
|
||||
|
@ -139,8 +141,10 @@ void s390_add_running_cpu(CPUS390XState *env)
|
|||
}
|
||||
}
|
||||
|
||||
unsigned s390_del_running_cpu(CPUS390XState *env)
|
||||
unsigned s390_del_running_cpu(S390CPU *cpu)
|
||||
{
|
||||
CPUS390XState *env = &cpu->env;
|
||||
|
||||
if (env->halted == 0) {
|
||||
assert(s390_running_cpus >= 1);
|
||||
s390_running_cpus--;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue