Commit b1d28ec6 authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20141010' into staging



various s390x updates:
- cpu state handling in qemu and migration
- vhost-scsi-ccw bugfix

# gpg: Signature made Fri 10 Oct 2014 14:01:34 BST using RSA key ID C6F02FAF
# gpg: Can't check signature: public key not found

* remotes/cohuck/tags/s390x-20141010:
  s390x/virtio-ccw: fix vhost-scsi intialization
  s390x/migration: migrate CPU state
  s390x/kvm: synchronize the cpu state after SIGP (INITIAL) CPU RESET
  s390x/kvm: reuse kvm_s390_reset_vcpu() to get rid of ifdefs
  s390x/kvm: propagate s390 cpu state to kvm
  s390x/kvm: proper use of the cpu states OPERATING and STOPPED
  s390x/kvm: introduce proper states for s390 cpus
  linux-headers: update to 3.17-rc7

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 9d1c35df 4b7757ba
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -176,7 +176,7 @@ static void s390_ipl_reset(DeviceState *dev)
        }
    }

    s390_add_running_cpu(cpu);
    s390_cpu_set_state(CPU_STATE_OPERATING, cpu);
}

static void s390_ipl_class_init(ObjectClass *klass, void *data)
+0 −32
Original line number Diff line number Diff line
@@ -125,38 +125,6 @@ static void s390_virtio_register_hcalls(void)
                                   s390_virtio_hcall_set_status);
}

/*
 * The number of running CPUs. On s390 a shutdown is the state of all CPUs
 * being either stopped or disabled (for interrupts) waiting. We have to
 * track this number to call the shutdown sequence accordingly. This
 * number is modified either on startup or while holding the big qemu lock.
 */
static unsigned s390_running_cpus;

void s390_add_running_cpu(S390CPU *cpu)
{
    CPUState *cs = CPU(cpu);

    if (cs->halted) {
        s390_running_cpus++;
        cs->halted = 0;
        cs->exception_index = -1;
    }
}

unsigned s390_del_running_cpu(S390CPU *cpu)
{
    CPUState *cs = CPU(cpu);

    if (cs->halted == 0) {
        assert(s390_running_cpus >= 1);
        s390_running_cpus--;
        cs->halted = 1;
        cs->exception_index = EXCP_HLT;
    }
    return s390_running_cpus;
}

void s390_init_ipl_dev(const char *kernel_filename,
                       const char *kernel_cmdline,
                       const char *initrd_filename,
+1 −1
Original line number Diff line number Diff line
@@ -1528,7 +1528,7 @@ static void vhost_ccw_scsi_class_init(ObjectClass *klass, void *data)
static const TypeInfo vhost_ccw_scsi = {
    .name          = TYPE_VHOST_SCSI_CCW,
    .parent        = TYPE_VIRTIO_CCW_DEVICE,
    .instance_size = sizeof(VirtIOSCSICcw),
    .instance_size = sizeof(VHostSCSICcw),
    .instance_init = vhost_ccw_scsi_instance_init,
    .class_init    = vhost_ccw_scsi_class_init,
};
+5 −1
Original line number Diff line number Diff line
#include <asm-generic/kvm_para.h>
#ifndef _ASM_MIPS_KVM_PARA_H
#define _ASM_MIPS_KVM_PARA_H


#endif /* _ASM_MIPS_KVM_PARA_H */
+2 −0
Original line number Diff line number Diff line
@@ -548,6 +548,7 @@ struct kvm_get_htab_header {

#define KVM_REG_PPC_VRSAVE	(KVM_REG_PPC | KVM_REG_SIZE_U32 | 0xb4)
#define KVM_REG_PPC_LPCR	(KVM_REG_PPC | KVM_REG_SIZE_U32 | 0xb5)
#define KVM_REG_PPC_LPCR_64	(KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xb5)
#define KVM_REG_PPC_PPR		(KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xb6)

/* Architecture compatibility level */
@@ -555,6 +556,7 @@ struct kvm_get_htab_header {

#define KVM_REG_PPC_DABRX	(KVM_REG_PPC | KVM_REG_SIZE_U32 | 0xb8)
#define KVM_REG_PPC_WORT	(KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xb9)
#define KVM_REG_PPC_SPRG9	(KVM_REG_PPC | KVM_REG_SIZE_U64 | 0xba)

/* Transactional Memory checkpointed state:
 * This is all GPRs, all VSX regs and a subset of SPRs
Loading