Am 04.02.2015 um 14:00 schrieb Paolo Bonzini:
>
>
> On 04/02/2015 10:44, Christian Borntraeger wrote:
>> +static void kvm_s390_set_crycb_format(struct kvm *kvm)
>> +{
>> + kvm->arch.crypto.crycbd = (__u32)(unsigned long) kvm->arch.crypto.crycb;
>> +
>> + if (kvm_s390_apxa_installed())
>> + kvm->arch.crypto.crycbd |= CRYCB_FORMAT2;
>> + else
>> + kvm->arch.crypto.crycbd |= CRYCB_FORMAT1;
>> +}
>> +
>> static int kvm_s390_crypto_init(struct kvm *kvm)
>> {
>> if (!test_vfacility(76))
>> @@ -663,8 +709,7 @@ static int kvm_s390_crypto_init(struct kvm *kvm)
>> if (!kvm->arch.crypto.crycb)
>> return -ENOMEM;
>>
>> - kvm->arch.crypto.crycbd = (__u32) (unsigned long)
>> kvm->arch.crypto.crycb |
>> - CRYCB_FORMAT1;
>> + kvm_s390_set_crycb_format(kvm);
>
> Could this also be part of the "things" that KVM can choose to enable,
> even though it's not a facility?
Can you re-ask that question? Not sure what you want to know.
This is mostly a fixup for z13, which wants to have a bigger control block. but
this block is not guest visible.
Talking about key wrapping, this is actually masked via a facility bit (for
MSA-3
and MSA-4), therefore we have the test_vfacility thing in that function.
Christian
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html