Re: [PATCH v2 4/7] KVM: s390: enable MSA9 keywrapping functions depending on cpu model

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

 



On 17.04.19 20:29, Christian Borntraeger wrote:
> Instead of adding a new machine option to disable/enable the keywrapping
> options of pckmo (like for AES and DEA) we can now use the CPU model to
> decide.
> 
> Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx>
> Reviewed-by: Collin Walling <walling@xxxxxxxxxxxxx>
> ---
> v1->v2: - enable vsie
> 	- also check if the host has the pckmo functions
>  arch/s390/include/asm/kvm_host.h | 1 +
>  arch/s390/kvm/kvm-s390.c         | 7 +++++++
>  arch/s390/kvm/vsie.c             | 5 ++++-
>  3 files changed, 12 insertions(+), 1 deletion(-)

FWIW, I tested this variant successfully with some printk debugging to 
check if the settings are good. The only question is: does anybody cares
about
	if ((vcpu->kvm->arch.model.subfuncs.pckmo[4] & kvm_s390_available_subfunc.pckmo[4] & 0xe0) ||
	    (vcpu->kvm->arch.model.subfuncs.pckmo[5] & kvm_s390_available_subfunc.pckmo[5] & 0xc0))

being too long? I find this more readable than 

	if ((vcpu->kvm->arch.model.subfuncs.pckmo[4] &
	     kvm_s390_available_subfunc.pckmo[4] & 0xe0) ||
	    (vcpu->kvm->arch.model.subfuncs.pckmo[5] &
	     kvm_s390_available_subfunc.pckmo[5] & 0xc0))

Christian




[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