提交 c85d21c7 编写于 作者: D David Hildenbrand 提交者: Cornelia Huck

s390x/kvm: don't enable key wrapping if msa3 is disabled

As the CPU model now controls msa3, trying to set wrapping keys without
msa3 being around/enable in the kernel will produce misleading errors.

So let's simply not configure key wrapping if msa3 is not enabled and
make compat machines with disabled CPU model work correctly.
Signed-off-by: NDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Message-Id: <20160905085244.99980-25-dahi@linux.vnet.ibm.com>
Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
上级 07059eff
......@@ -155,6 +155,9 @@ bool s390_has_feat(S390Feat feat)
if (feat == S390_FEAT_RUNTIME_INSTRUMENTATION) {
return kvm_s390_get_ri();
}
if (feat == S390_FEAT_MSA_EXT_3) {
return true;
}
}
#endif
return 0;
......
......@@ -260,8 +260,10 @@ static void kvm_s390_init_dea_kw(void)
void kvm_s390_crypto_reset(void)
{
kvm_s390_init_aes_kw();
kvm_s390_init_dea_kw();
if (s390_has_feat(S390_FEAT_MSA_EXT_3)) {
kvm_s390_init_aes_kw();
kvm_s390_init_dea_kw();
}
}
int kvm_arch_init(MachineState *ms, KVMState *s)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册