s390x/kvm: let the CPU model control CMM(A)
commit07059effd14e1cb6497f711e905c55affa525677
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Mon, 5 Sep 2016 08:52:37 +0000 (5 10:52 +0200)
committerCornelia Huck <cornelia.huck@de.ibm.com>
Tue, 6 Sep 2016 15:06:51 +0000 (6 17:06 +0200)
tree88c62661b4bcdb09f648e7bea6ccb466741a2466
parent34821036cd10e8ae9061338bcb6c8777781d07e9
s390x/kvm: let the CPU model control CMM(A)

Starting with recent kernels, if the cmma attributes are available, we
actually have hardware support. Enabling CMMA then means providing the
guest VCPU with CMM, therefore enabling its CMM facility.

Let's not blindly enable CMM anymore but let's control it using CPU models.
For disabled CPU models, CMMA will continue to always get enabled.

Also enable it in the applicable default models.

Please note that CMM doesn't work with hugetlbfs, therefore we will
warn the user and keep it disabled. Migrating from/to a hugetlbfs
configuration works, as it will be disabled on both sides.

Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Message-Id: <20160905085244.99980-24-dahi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
target-s390x/gen-features.c
target-s390x/kvm.c