Re: [PATCH v11 15/26] KVM: s390: Clear Crypto Control Block when using vSIE

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

 



On 26/09/2018 01:16, Tony Krowiak wrote:
> From: Pierre Morel <pmorel@xxxxxxxxxxxxx>
> 
> When we clear the Crypto Control Block (CRYCB) used by a guest
> level 2, the vSIE shadow CRYCB for guest level 3 must be updated
> before the guest uses it.
> 
> We achieve this by using the KVM_REQ_VSIE_RESTART synchronous
> request for each vCPU belonging to the guest to force the reload
> of the shadow CRYCB before rerunning the guest level 3.
> 
> Signed-off-by: Pierre Morel <pmorel@xxxxxxxxxxxxx>
> Signed-off-by: Tony Krowiak <akrowiak@xxxxxxxxxxxxx>
> ---
>  arch/s390/kvm/kvm-s390.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 75aa5aa4a926..c94ef2d0dbe4 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -2043,6 +2043,8 @@ void kvm_arch_crypto_clear_masks(struct kvm *kvm)
>  	memset(&kvm->arch.crypto.crycb->apcb1, 0,
>  	       sizeof(kvm->arch.crypto.crycb->apcb1));
>  
> +	/* recreate the shadow crycb for each vcpu */
> +	kvm_s390_sync_request_broadcast(kvm, KVM_REQ_VSIE_RESTART);
>  	kvm_s390_vcpu_unblock_all(kvm);
>  	mutex_unlock(&kvm->lock);
>  }
> 

This should have been squashed into #10, but only if you have to resend.

-- 

Thanks,

David / dhildenb



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux