[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [Patch v4 24/30] s390x/kvm: don't enable key wrapping if ms
From: |
David Hildenbrand |
Subject: |
[Qemu-devel] [Patch v4 24/30] s390x/kvm: don't enable key wrapping if msa3 is disabled |
Date: |
Mon, 5 Sep 2016 10:52:38 +0200 |
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: David Hildenbrand <address@hidden>
---
target-s390x/cpu_models.c | 3 +++
target-s390x/kvm.c | 6 ++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/target-s390x/cpu_models.c b/target-s390x/cpu_models.c
index 2cb5fd2..32431cb 100644
--- a/target-s390x/cpu_models.c
+++ b/target-s390x/cpu_models.c
@@ -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;
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
index 5de4490..8fa50f0 100644
--- a/target-s390x/kvm.c
+++ b/target-s390x/kvm.c
@@ -259,8 +259,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)
--
2.8.4
- [Qemu-devel] [Patch v4 15/30] s390x/sclp: indicate sclp features, (continued)
- [Qemu-devel] [Patch v4 15/30] s390x/sclp: indicate sclp features, David Hildenbrand, 2016/09/05
- [Qemu-devel] [Patch v4 03/30] s390x/cpumodel: expose CPU class properties, David Hildenbrand, 2016/09/05
- [Qemu-devel] [Patch v4 10/30] s390x/cpumodel: expose features and feature groups as properties, David Hildenbrand, 2016/09/05
- [Qemu-devel] [Patch v4 30/30] s390x/cpumodel: implement QMP interface "query-cpu-model-baseline", David Hildenbrand, 2016/09/05
- [Qemu-devel] [Patch v4 12/30] s390x/cpumodel: check and apply the CPU model, David Hildenbrand, 2016/09/05
- [Qemu-devel] [Patch v4 23/30] s390x/kvm: let the CPU model control CMM(A), David Hildenbrand, 2016/09/05
- [Qemu-devel] [Patch v4 22/30] s390x/kvm: disable host model for problematic compat machines, David Hildenbrand, 2016/09/05
- [Qemu-devel] [Patch v4 02/30] s390x/cpumodel: "host" and "qemu" as CPU subclasses, David Hildenbrand, 2016/09/05
- [Qemu-devel] [Patch v4 11/30] s390x/cpumodel: let the CPU model handle feature checks, David Hildenbrand, 2016/09/05
- [Qemu-devel] [Patch v4 17/30] s390x/sclp: propagate the mha via sclp, David Hildenbrand, 2016/09/05
- [Qemu-devel] [Patch v4 24/30] s390x/kvm: don't enable key wrapping if msa3 is disabled,
David Hildenbrand <=
- [Qemu-devel] [Patch v4 08/30] s390x/cpumodel: register defined CPU models as subclasses, David Hildenbrand, 2016/09/05
- [Qemu-devel] [Patch v4 18/30] s390x/sclp: propagate hmfai, David Hildenbrand, 2016/09/05
- [Qemu-devel] [Patch v4 26/30] qmp: add QMP interface "query-cpu-model-comparison", David Hildenbrand, 2016/09/05
- Re: [Qemu-devel] [Patch v4 00/30] s390x CPU models: exposing features, Cornelia Huck, 2016/09/05
- Re: [Qemu-devel] [Patch v4 00/30] s390x CPU models: exposing features, no-reply, 2016/09/05
- Re: [Qemu-devel] [Patch v4 00/30] s390x CPU models: exposing features, Cornelia Huck, 2016/09/05