mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
3d78499a49
commit
d590081380
1 changed files with 14 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue