[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] s390: Fix cpu shutdown for KVM
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] s390: Fix cpu shutdown for KVM |
Date: |
Tue, 4 Oct 2011 14:56:36 +0100 |
On 4 October 2011 14:47, Christian Borntraeger <address@hidden> wrote:
> + * We can only deliver interrupts to (interrupt) enabled CPUs.
> + * We dont call kvm_s390_add_running_cpu here, since CPUs in enabled wait
> + * will wait inside the kernel (no exit). Therefore, the targeted
> + * CPUs was neither disabled waiting or stopped for qemu.
Grammar nits, since I'm commenting anyway:
"don't"
"neither disabled waiting nor stopped"
> @@ -425,16 +432,24 @@ static int handle_intercept(CPUState *en
> r = handle_instruction(env, run);
> break;
> case ICPT_WAITPSW:
> - /* XXX What to do on system shutdown? */
> + if (kvm_s390_del_running_cpu(env) == 0) {
> + qemu_system_shutdown_request();
> + }
> env->halted = 1;
> env->exception_index = EXCP_HLT;
> + r = EXCP_HALTED;
> break;
> case ICPT_SOFT_INTERCEPT:
> fprintf(stderr, "KVM unimplemented icpt SOFT\n");
> exit(1);
> break;
> case ICPT_CPU_STOP:
> - qemu_system_shutdown_request();
> + if (kvm_s390_del_running_cpu(env) == 0) {
> + qemu_system_shutdown_request();
> + }
> + env->halted = 1;
> + env->exception_index = EXCP_HLT;
> + r = EXCP_HALTED;
> break;
> case ICPT_IO:
> fprintf(stderr, "KVM unimplemented icpt IO\n");
This makes the ICPT_CPU_STOP and ICPT_WAITPSW cases identical,
right? You should just fold them together.
-- PMM
- [Qemu-devel] s390: Fix cpu shutdown for KVM, Christian Borntraeger, 2011/10/04
- Re: [Qemu-devel] s390: Fix cpu shutdown for KVM, Alexander Graf, 2011/10/04
- Re: [Qemu-devel] s390: Fix cpu shutdown for KVM, Christian Borntraeger, 2011/10/04
- Re: [Qemu-devel] s390: Fix cpu shutdown for KVM, Alexander Graf, 2011/10/04
- [Qemu-devel] [PATCHv3] s390: Fix cpu shutdown for KVM, Christian Borntraeger, 2011/10/04
- Re: [Qemu-devel] [PATCHv3] s390: Fix cpu shutdown for KVM, Alexander Graf, 2011/10/04
- Re: [Qemu-devel] [PATCHv3] s390: Fix cpu shutdown for KVM, Christian Borntraeger, 2011/10/04
- Re: [Qemu-devel] [PATCHv3] s390: Fix cpu shutdown for KVM, Alexander Graf, 2011/10/07