Skip to content

Commit

Permalink
KVM: s390: Set CPU in stopped state on initial cpu reset
Browse files Browse the repository at this point in the history
The initial cpu reset sets the cpu in the stopped state.
Several places check for the cpu state (e.g. sigp set prefix) and
not setting the STOPPED state triggered errors with newer guest
kernels after reboot.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
  • Loading branch information
Christian Borntraeger authored and Marcelo Tosatti committed Jun 13, 2012
1 parent 00763e4 commit 61bde82
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/s390/kvm/kvm-s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ static void kvm_s390_vcpu_initial_reset(struct kvm_vcpu *vcpu)
vcpu->arch.guest_fpregs.fpc = 0;
asm volatile("lfpc %0" : : "Q" (vcpu->arch.guest_fpregs.fpc));
vcpu->arch.sie_block->gbea = 1;
atomic_set_mask(CPUSTAT_STOPPED, &vcpu->arch.sie_block->cpuflags);
}

int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
Expand Down

0 comments on commit 61bde82

Please sign in to comment.