mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-12 02:40:53 +00:00
KVM: s390: Fully do the CPU resets as intended
With7de3f1423f
("KVM: s390: Add new reset vcpu API") we clarified the meaning of the reset ioctl to fully reset the CPU and not only the parts that can not be handled by userspace. Turns out that we missed some parts. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJeakS4AAoJEBF7vIC1phx8CrUP/R2tybl1+fUG7Jm6VRvu6idU CxU34zV+goFbeznyln9WdQtW4D+IkbIH1wvHNMDFqZvktA8St3wzNkZ6W5uCebJg cmAQiOoz4VADh0EM1sSC4/45PfjADh3xHZxA+5X76bh7ji9kp7lkqUwXiclysge5 rurB2r1PFZoaMv1sQbAUIlyb8BTfe4zK8w0+zEjIeN1Mh+mjs1wAhyo1qOmvS24J lrv3vrAdJDp1OVebCfrKF6NzgLrQBSK8ETRFAoRPSZPCkSMF7dCUfgvRWUw7zs5A wyDHqtMUU5MQ0AKjd4cXH6Un4vzfYSQtoGQJAe3UdnnWNOpxP5/wOLt1xQFb6nun K2wDLx9hxu6f4vT9zntMBZ2zCsBGfWTtwa+DRN58HI4cSFowo8PB7jMuauHBeJ7B teNwAnDsjhOLH2fRFuh7eM0f5tOJNACvVxS6fXAChu4fXM1rtG1WDnn5V3y5tYbw UBe7NV657vEKFzp63C3vB7EK/hkCo8cc/c9JKi1kMoR9q3bUfMSN+kRh2WLkxni6 Ux4AuAuXGMw/PBrqtt43C4GFrUkyaTIEtl8KHDHWfRcxV0rKlIp2ebJKRLG8QlVY hTJPCv8DDY1FoyTnOPZWYNdDUY3EWdo/R0LQ2L9ywDxbtR30Z6mcqH7FhlKvPKRj C4/RRmpBco4vnizfD62r =bmtm -----END PGP SIGNATURE----- Merge tag 'kvm-s390-master-5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into kvm-master KVM: s390: Fully do the CPU resets as intended With7de3f1423f
("KVM: s390: Add new reset vcpu API") we clarified the meaning of the reset ioctl to fully reset the CPU and not only the parts that can not be handled by userspace. Turns out that we missed some parts.
This commit is contained in:
commit
997224fe66
@ -3268,7 +3268,10 @@ 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 */
|
||||
/*
|
||||
* This equals initial cpu reset in pop, but we don't switch to ESA.
|
||||
* We do not only reset the internal data, but also ...
|
||||
*/
|
||||
vcpu->arch.sie_block->gpsw.mask = 0;
|
||||
vcpu->arch.sie_block->gpsw.addr = 0;
|
||||
kvm_s390_set_prefix(vcpu, 0);
|
||||
@ -3278,6 +3281,19 @@ static void kvm_arch_vcpu_ioctl_initial_reset(struct kvm_vcpu *vcpu)
|
||||
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;
|
||||
|
||||
/* ... the data in sync regs */
|
||||
memset(vcpu->run->s.regs.crs, 0, sizeof(vcpu->run->s.regs.crs));
|
||||
vcpu->run->s.regs.ckc = 0;
|
||||
vcpu->run->s.regs.crs[0] = CR0_INITIAL_MASK;
|
||||
vcpu->run->s.regs.crs[14] = CR14_INITIAL_MASK;
|
||||
vcpu->run->psw_addr = 0;
|
||||
vcpu->run->psw_mask = 0;
|
||||
vcpu->run->s.regs.todpr = 0;
|
||||
vcpu->run->s.regs.cputm = 0;
|
||||
vcpu->run->s.regs.ckc = 0;
|
||||
vcpu->run->s.regs.pp = 0;
|
||||
vcpu->run->s.regs.gbea = 1;
|
||||
vcpu->run->s.regs.fpc = 0;
|
||||
vcpu->arch.sie_block->gbea = 1;
|
||||
vcpu->arch.sie_block->pp = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user