Re: [PATCH 4.4 12/50] KVM: s390: wire up bpb feature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 04/27/2018 03:58 PM, Greg Kroah-Hartman wrote:
> 4.4-stable review patch.  If anyone has any objections, please let me know.
> 
> ------------------
> 
> From: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
> 
> 
> From: Christian Borntraeger <borntraeger@xxxxxxxxxx>
> 
> [ Upstream commit 35b3fde6203b932b2b1a5b53b3d8808abc9c4f60 ]
> 
> The new firmware interfaces for branch prediction behaviour changes
> are transparently available for the guest. Nevertheless, there is
> new state attached that should be migrated and properly resetted.
> Provide a mechanism for handling reset, migration and VSIE.
> 
> Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx>
> Reviewed-by: David Hildenbrand <david@xxxxxxxxxx>
> Reviewed-by: Cornelia Huck <cohuck@xxxxxxxxxx>
> [Changed capability number to 152. - Radim]
> Signed-off-by: Radim Krčmář <rkrcmar@xxxxxxxxxx>
> Signed-off-by: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>


Something went wrong during the backport of this to 4.4

[...]
> ---
>  arch/s390/include/asm/kvm_host.h |    3 ++-
>  arch/s390/include/uapi/asm/kvm.h |    3 +++
>  arch/s390/kvm/kvm-s390.c         |   13 ++++++++++++-
>  include/uapi/linux/kvm.h         |    1 +
>  4 files changed, 18 insertions(+), 2 deletions(-)
> 
> --- a/arch/s390/include/asm/kvm_host.h
> +++ b/arch/s390/include/asm/kvm_host.h
> @@ -1286,7 +1291,6 @@ void kvm_arch_vcpu_load(struct kvm_vcpu
>  	if (test_fp_ctl(current->thread.fpu.fpc))
>  		/* User space provided an invalid FPC, let's clear it */
>  		current->thread.fpu.fpc = 0;
> -

unrelated whitespace change

>  	save_access_regs(vcpu->arch.host_acrs);
>  	restore_access_regs(vcpu->run->s.regs.acrs);
>  	gmap_enable(vcpu->arch.gmap);
> @@ -1327,6 +1331,7 @@ static void kvm_s390_vcpu_initial_reset(
>  	current->thread.fpu.fpc = 0;
>  	vcpu->arch.sie_block->gbea = 1;
>  	vcpu->arch.sie_block->pp = 0;
> +	vcpu->arch.sie_block->fpf &= ~FPF_BPBC;
>  	vcpu->arch.pfault_token = KVM_S390_PFAULT_TOKEN_INVALID;
>  	kvm_clear_async_pf_completion_queue(vcpu);
>  	if (!kvm_s390_user_cpu_state_ctrl(vcpu->kvm))
> @@ -2162,6 +2167,7 @@ static void store_regs(struct kvm_vcpu *
>  	kvm_run->s.regs.pft = vcpu->arch.pfault_token;
>  	kvm_run->s.regs.pfs = vcpu->arch.pfault_select;
>  	kvm_run->s.regs.pfc = vcpu->arch.pfault_compare;
> +	kvm_run->s.regs.bpbc = (vcpu->arch.sie_block->fpf & FPF_BPBC) == FPF_BPBC;
>  }
>  
>  int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
> @@ -2194,6 +2200,11 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_v
>  		kvm_run->exit_reason = KVM_EXIT_INTR;
>  		rc = -EINTR;
>  	}
> +	if ((kvm_run->kvm_dirty_regs & KVM_SYNC_BPBC) &&
> +	    test_kvm_facility(vcpu->kvm, 82)) {
> +		vcpu->arch.sie_block->fpf &= ~FPF_BPBC;
> +		vcpu->arch.sie_block->fpf |= kvm_run->s.regs.bpbc ? FPF_BPBC : 0;
> +	}
>  


This looks misplaced and should go into the sync_regs function.




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]