Re: [PATCH v11 24/26] KVM: s390: device attrs to enable/disable AP interpretation

David Hildenbrand
2018-09-26T07:14:35Z

> ret = -ENXIO;
> break;
> @@ -2062,6 +2085,7 @@ static u64 kvm_s390_get_initial_cpuid(void)
> static void kvm_s390_crypto_init(struct kvm *kvm)
> {

Only two NITs,

> kvm->arch.crypto.crycb = &kvm->arch.sie_page2->crycb;
> + kvm->arch.crypto.apie = 0;

This is not necessary (default is 0)

> kvm_s390_set_crycb_format(kvm);
>
> if (!test_kvm_facility(kvm, 76))
> @@ -2601,6 +2625,7 @@ static void kvm_s390_vcpu_crypto_setup(struct kvm_vcpu *vcpu)
>
> vcpu->arch.sie_block->crycbd = vcpu->kvm->arch.crypto.crycbd;
> vcpu->arch.sie_block->ecb3 &= ~(ECB3_AES | ECB3_DEA);
> + vcpu->arch.sie_block->eca &= ~ECA_APIE;
>

This probably should have been moved to patch 3.

Nothing to stop this from finding its way upstream.

--

Thanks,

David / dhildenb