Re: [PATCH v9] KVM: s390: Add new reset vcpu API

Christian Borntraeger
2020-01-30T13:00:06Z

On 30.01.20 13:55, Janosch Frank wrote:

> +static void kvm_arch_vcpu_ioctl_initial_reset(struct kvm_vcpu *vcpu)
> +{
> + /* Initial reset is a superset of the normal reset */
> + kvm_arch_vcpu_ioctl_normal_reset(vcpu);
> +
> + /* this equals initial cpu reset in pop, but we don't switch to ESA */
> + vcpu->arch.sie_block->gpsw.mask = 0;
> + vcpu->arch.sie_block->gpsw.addr = 0;
> + kvm_s390_set_prefix(vcpu, 0);
> + kvm_s390_set_cpu_timer(vcpu, 0);
> + vcpu->arch.sie_block->ckc = 0;
> + vcpu->arch.sie_block->todpr = 0;
> + memset(vcpu->arch.sie_block->gcr, 0, sizeof(vcpu->arch.sie_block->gcr));
> + vcpu->arch.sie_block->gcr[0] = CR0_INITIAL_MASK;
> + vcpu->arch.sie_block->gcr[14] = CR14_INITIAL_MASK;
> + vcpu->run->s.regs.fpc = 0;

> + current->thread.fpu.fpc = 0;

This is still wrong.