diff mbox series

s390/kvm: remove diag318 reset code

Message ID 20201104181032.109800-1-walling@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series s390/kvm: remove diag318 reset code | expand

Commit Message

Collin Walling Nov. 4, 2020, 6:10 p.m. UTC
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 <walling@linux.ibm.com>
---
 arch/s390/kvm/kvm-s390.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Christian Borntraeger Nov. 4, 2020, 6:29 p.m. UTC | #1
On 04.11.20 19:10, Collin Walling 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)
> Signed-off-by: Collin Walling <walling@linux.ibm.com>

Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>

> ---
>  arch/s390/kvm/kvm-s390.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 6b74b92c1a58..f9e118a0e113 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -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)
>
Janosch Frank Nov. 9, 2020, 7:50 a.m. UTC | #2
On 11/4/20 7:10 PM, Collin Walling 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.

Reviewed-by: Janosch Frank <frankja@linux.ibm.com>

> 
> Fixes: 23a60f834406 (s390/kvm: diagnose 0x318 sync and reset)
> Signed-off-by: Collin Walling <walling@linux.ibm.com>
> ---
>  arch/s390/kvm/kvm-s390.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 6b74b92c1a58..f9e118a0e113 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -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)
>
Cornelia Huck Nov. 10, 2020, 10:43 a.m. UTC | #3
On Wed,  4 Nov 2020 13:10:32 -0500
Collin Walling <walling@linux.ibm.com> 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

Fixes: 23a60f834406 ("s390/kvm: diagnose 0x318 sync and reset")

> Signed-off-by: Collin Walling <walling@linux.ibm.com>
> ---
>  arch/s390/kvm/kvm-s390.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 6b74b92c1a58..f9e118a0e113 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -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)

I assume that we rely on the QEMU patch to get a completely working
setup?
Christian Borntraeger Nov. 10, 2020, 12:41 p.m. UTC | #4
On 10.11.20 11:43, Cornelia Huck wrote:
> On Wed,  4 Nov 2020 13:10:32 -0500
> Collin Walling <walling@linux.ibm.com> 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
> 
> Fixes: 23a60f834406 ("s390/kvm: diagnose 0x318 sync and reset")

yes.

> 
>> Signed-off-by: Collin Walling <walling@linux.ibm.com>
>> ---
>>  arch/s390/kvm/kvm-s390.c | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
>> index 6b74b92c1a58..f9e118a0e113 100644
>> --- a/arch/s390/kvm/kvm-s390.c
>> +++ b/arch/s390/kvm/kvm-s390.c
>> @@ -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)
> 
> 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 Nov. 10, 2020, 12:55 p.m. UTC | #5
On Tue, 10 Nov 2020 13:41:17 +0100
Christian Borntraeger <borntraeger@de.ibm.com> wrote:

> On 10.11.20 11:43, Cornelia Huck wrote:
> > On Wed,  4 Nov 2020 13:10:32 -0500
> > Collin Walling <walling@linux.ibm.com> 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
> > 
> > Fixes: 23a60f834406 ("s390/kvm: diagnose 0x318 sync and reset")  
> 
> yes.
> 
> >   
> >> Signed-off-by: Collin Walling <walling@linux.ibm.com>
> >> ---
> >>  arch/s390/kvm/kvm-s390.c | 2 --
> >>  1 file changed, 2 deletions(-)
> >>
> >> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> >> index 6b74b92c1a58..f9e118a0e113 100644
> >> --- a/arch/s390/kvm/kvm-s390.c
> >> +++ b/arch/s390/kvm/kvm-s390.c
> >> @@ -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)  
> > 
> > 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

Acked-by: Cornelia Huck <cohuck@redhat.com>
Christian Borntraeger Nov. 10, 2020, 1:09 p.m. UTC | #6
On 04.11.20 19:10, Collin Walling 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)
> Signed-off-by: Collin Walling <walling@linux.ibm.com>

thanks. Applied. 

> ---
>  arch/s390/kvm/kvm-s390.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 6b74b92c1a58..f9e118a0e113 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -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)
>
diff mbox series

Patch

diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 6b74b92c1a58..f9e118a0e113 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -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)