提交 d5900813 编写于 作者: A Alexander Graf 提交者: Aurelien Jarno

target-s390: enable SIGP Initial Reset

For SMP to work with KVM, we need to properly emulate the SIGP Initial Reset
Command. Recent (2.6.32) kernels issue that before the SIGP Reset command that
actually wakes up the vcpu.

This patch makes -smp work on S390x.
Signed-off-by: NAlexander Graf <agraf@suse.de>
Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
上级 3d78499a
......@@ -344,9 +344,20 @@ static int s390_store_status(CPUState *env, uint32_t parameter)
static int s390_cpu_initial_reset(CPUState *env)
{
/* XXX */
fprintf(stderr, "XXX SIGP init\n");
return -1;
int i;
if (kvm_vcpu_ioctl(env, KVM_S390_INITIAL_RESET, NULL) < 0) {
perror("cannot init reset vcpu");
}
/* Manually zero out all registers */
cpu_synchronize_state(env);
for (i = 0; i < 16; i++) {
env->regs[i] = 0;
}
dprintf("DONE: SIGP initial reset: %p\n", env);
return 0;
}
static int handle_sigp(CPUState *env, struct kvm_run *run, uint8_t ipa1)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册