s390/kvm: remove diag318 reset code
PATCH 1/1 s390/kvm: remove diag318 reset code
The diag318 data must be set to 0 by VM-wide reset events triggered by diag308. As such, KVM should not handle resetting this data via the VCPU ioctls.
--- arch/s390/kvm/kvm-s390.c | 2 -- 1 file changed, 2 deletions(-)
arch/s390/kvm/kvm-s390.c +0 -2
@@ -3564,7 +3564,6 @@ static void kvm_arch_vcpu_ioctl_initial_reset(struct kvm_vcpu *vcpu) vcpu->arch.sie_block->pp =0 ; vcpu->arch.sie_block->fpf &= ~FPF_BPBC ; vcpu->arch.sie_block->todpr =0 ; - vcpu->arch.sie_block->cpnc =0 ; } }
@@ -3582,7 +3581,6 @@ static void kvm_arch_vcpu_ioctl_clear_reset(struct kvm_vcpu *vcpu) regs->etoken =0 ; regs->etoken_extension =0 ; - regs->diag318 =0 ; }int kvm_arch_vcpu_ioctl_set_regs (struct kvm_vcpu *vcpu,struct kvm_regs *regs)
Signature · 1 line
2.26.2
Quoted 6 lines · Collin Walling
The diag318 data must be set to 0 by VM-wide reset events triggered by diag308. As such, KVM should not handle resetting this data via the VCPU ioctls.
Fixes 23a60f834406 (s390/kvm: diagnose 0x318 sync and reset)Signed-off-by Collin Walling <[email protected]>
Quoted 25 lines
--- arch/s390/kvm/kvm-s390.c | 2 -- 1 file changed, 2 deletions(-)arch/s390/kvm/kvm-s390.c +0
-2@@ -3564,7 +3564,6 @@ static void kvm_arch_vcpu_ioctl_initial_reset(struct kvm_vcpu *vcpu) vcpu->arch.sie_block->pp =0 ; vcpu->arch.sie_block->fpf &= ~FPF_BPBC ; vcpu->arch.sie_block->todpr =0 ; - vcpu->arch.sie_block->cpnc =0 ; } }@@ -3582,7 +3581,6 @@ static void kvm_arch_vcpu_ioctl_clear_reset(struct kvm_vcpu *vcpu) regs->etoken =0 ; regs->etoken_extension =0 ; - regs->diag318 =0 ; }int kvm_arch_vcpu_ioctl_set_regs (struct kvm_vcpu *vcpu,struct kvm_regs *regs)
Quoted 3 lines · Collin Walling
The diag318 data must be set to 0 by VM-wide reset events triggered by diag308. As such, KVM should not handle resetting this data via the VCPU ioctls.
Quoted 28 lines
Fixes 23a60f834406 (s390/kvm: diagnose 0x318 sync and reset)Signed-off-by Collin Walling <[email protected]>--- arch/s390/kvm/kvm-s390.c | 2 -- 1 file changed, 2 deletions(-)arch/s390/kvm/kvm-s390.c +0
-2@@ -3564,7 +3564,6 @@ static void kvm_arch_vcpu_ioctl_initial_reset(struct kvm_vcpu *vcpu) vcpu->arch.sie_block->pp =0 ; vcpu->arch.sie_block->fpf &= ~FPF_BPBC ; vcpu->arch.sie_block->todpr =0 ; - vcpu->arch.sie_block->cpnc =0 ; } }@@ -3582,7 +3581,6 @@ static void kvm_arch_vcpu_ioctl_clear_reset(struct kvm_vcpu *vcpu) regs->etoken =0 ; regs->etoken_extension =0 ; - regs->diag318 =0 ; }int kvm_arch_vcpu_ioctl_set_regs (struct kvm_vcpu *vcpu,struct kvm_regs *regs)
Quoted 5 lines · On Wed, 4 Nov 2020 13:10:32 -0500 Collin Walling <[email protected]> wrote:
The diag318 data must be set to 0 by VM-wide reset events triggered by diag308. As such, KVM should not handle resetting this data via the VCPU ioctls.
Fixes 23a60f834406 (s390/kvm: diagnose 0x318 sync and reset)
Should be
Quoted 18 lines
Signed-off-by Collin Walling <[email protected]>--- arch/s390/kvm/kvm-s390.c | 2 -- 1 file changed, 2 deletions(-)arch/s390/kvm/kvm-s390.c +0
-1@@ -3564,7 +3564,6 @@ static void kvm_arch_vcpu_ioctl_initial_reset(struct kvm_vcpu *vcpu) vcpu->arch.sie_block->pp =0 ; vcpu->arch.sie_block->fpf &= ~FPF_BPBC ; vcpu->arch.sie_block->todpr =0 ; - vcpu->arch.sie_block->cpnc =0 ; } }
arch/s390/kvm/kvm-s390.c static void kvm_arch_vcpu_ioctl_clear_reset(struct kvm_vcpu *vcpu) · line 3586
Quoted 7 lines
arch/s390/kvm/kvm-s390.c +0
-1@@ -3582,7 +3581,6 @@ static void kvm_arch_vcpu_ioctl_clear_reset(struct kvm_vcpu *vcpu) regs->etoken =0 ; regs->etoken_extension =0 ; - regs->diag318 =0 ; }int kvm_arch_vcpu_ioctl_set_regs (struct kvm_vcpu *vcpu,struct kvm_regs *regs)
I assume that we rely on the QEMU patch to get a completely working setup?
Quoted 7 lines · Cornelia Huck
Quoted 4 lines · On Wed, 4 Nov 2020 13:10:32 -0500 Collin Walling <[email protected]> wrote:
The diag318 data must be set to 0 by VM-wide reset events triggered by diag308. As such, KVM should not handle resetting this data via the VCPU ioctls.
Quoted 5 lines
Quoted 1 line
Fixes 23a60f834406 (s390/kvm: diagnose 0x318 sync and reset)Should be
Fixes 23a60f834406 ("s390/kvm: diagnose 0x318 sync and reset")
yes.
Quoted 25 lines
Quoted 25 lines
Signed-off-by Collin Walling <[email protected]>--- arch/s390/kvm/kvm-s390.c | 2 -- 1 file changed, 2 deletions(-)arch/s390/kvm/kvm-s390.c +0
-2@@ -3564,7 +3564,6 @@ static void kvm_arch_vcpu_ioctl_initial_reset(struct kvm_vcpu *vcpu) vcpu->arch.sie_block->pp =0 ; vcpu->arch.sie_block->fpf &= ~FPF_BPBC ; vcpu->arch.sie_block->todpr =0 ; - vcpu->arch.sie_block->cpnc =0 ; } }@@ -3582,7 +3581,6 @@ static void kvm_arch_vcpu_ioctl_clear_reset(struct kvm_vcpu *vcpu) regs->etoken =0 ; regs->etoken_extension =0 ; - regs->diag318 =0 ; }
Quoted 4 lines
arch/s390/kvm/kvm-s390.c static void kvm_arch_vcpu_ioctl_clear_reset(struct kvm_vcpu *vcpu) · line 3586
Quoted 1 line
arch/s390/kvm/kvm-s390.c +0
-0int kvm_arch_vcpu_ioctl_set_regs (struct kvm_vcpu *vcpu,struct kvm_regs *regs)I assume that we rely on the QEMU patch to get a completely working setup?
Yes, but this fix is correct in itself and needed anyway.
Cornelia Huck
Acked-byQuoted 41 lines · On Tue, 10 Nov 2020 13:41:17 +0100 Christian Borntraeger…
Quoted 7 lines · Cornelia Huck
Quoted 4 lines · On Wed, 4 Nov 2020 13:10:32 -0500 Collin Walling <[email protected]> wrote:
The diag318 data must be set to 0 by VM-wide reset events triggered by diag308. As such, KVM should not handle resetting this data via the VCPU ioctls.
Quoted 5 lines
Quoted 1 line
Fixes 23a60f834406 (s390/kvm: diagnose 0x318 sync and reset)Should be
Fixes 23a60f834406 ("s390/kvm: diagnose 0x318 sync and reset")yes.
Quoted 25 lines
Quoted 25 lines
Signed-off-by Collin Walling <[email protected]>--- arch/s390/kvm/kvm-s390.c | 2 -- 1 file changed, 2 deletions(-)arch/s390/kvm/kvm-s390.c +0
-2@@ -3564,7 +3564,6 @@ static void kvm_arch_vcpu_ioctl_initial_reset(struct kvm_vcpu *vcpu) vcpu->arch.sie_block->pp =0 ; vcpu->arch.sie_block->fpf &= ~FPF_BPBC ; vcpu->arch.sie_block->todpr =0 ; - vcpu->arch.sie_block->cpnc =0 ; } }@@ -3582,7 +3581,6 @@ static void kvm_arch_vcpu_ioctl_clear_reset(struct kvm_vcpu *vcpu) regs->etoken =0 ; regs->etoken_extension =0 ; - regs->diag318 =0 ; }
Quoted 7 lines
Quoted 4 lines
arch/s390/kvm/kvm-s390.c static void kvm_arch_vcpu_ioctl_clear_reset(struct kvm_vcpu *vcpu) · line 3586
Quoted 1 line
arch/s390/kvm/kvm-s390.c +0
-0int kvm_arch_vcpu_ioctl_set_regs (struct kvm_vcpu *vcpu,struct kvm_regs *regs)I assume that we rely on the QEMU patch to get a completely working setup?
Yes, but this fix is correct in itself and needed anyway.
Oh, apparently forgot
Quoted 6 lines · Collin Walling
The diag318 data must be set to 0 by VM-wide reset events triggered by diag308. As such, KVM should not handle resetting this data via the VCPU ioctls.
Fixes 23a60f834406 (s390/kvm: diagnose 0x318 sync and reset)Signed-off-by Collin Walling <[email protected]>
thanks. Applied.
Quoted 25 lines
--- arch/s390/kvm/kvm-s390.c | 2 -- 1 file changed, 2 deletions(-)arch/s390/kvm/kvm-s390.c +0
-2@@ -3564,7 +3564,6 @@ static void kvm_arch_vcpu_ioctl_initial_reset(struct kvm_vcpu *vcpu) vcpu->arch.sie_block->pp =0 ; vcpu->arch.sie_block->fpf &= ~FPF_BPBC ; vcpu->arch.sie_block->todpr =0 ; - vcpu->arch.sie_block->cpnc =0 ; } }@@ -3582,7 +3581,6 @@ static void kvm_arch_vcpu_ioctl_clear_reset(struct kvm_vcpu *vcpu) regs->etoken =0 ; regs->etoken_extension =0 ; - regs->diag318 =0 ; }int kvm_arch_vcpu_ioctl_set_regs (struct kvm_vcpu *vcpu,struct kvm_regs *regs)