summaryrefslogtreecommitdiff
path: root/arch/s390/tools
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2018-02-09 19:26:29 +0300
committerChristian Borntraeger <borntraeger@de.ibm.com>2018-03-09 12:44:17 +0300
commitc3b9e3e1ea1c1d1524b56b6734711db2a6fc2163 (patch)
tree42cc07d5944c40ba229de7270008ed4483e2cd1d /arch/s390/tools
parentf07afa0462b76a5b9c4f3a43d5ac24fdb86a90c2 (diff)
downloadlinux-c3b9e3e1ea1c1d1524b56b6734711db2a6fc2163.tar.xz
KVM: s390: implement CPU model only facilities
Some facilities should only be provided to the guest, if they are enabled by a CPU model. This allows us to avoid capabilities and to simply fall back to the cpumodel for deciding about a facility without enabling it for older QEMUs or QEMUs without a CPU model. Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/tools')
-rw-r--r--arch/s390/tools/gen_facilities.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/s390/tools/gen_facilities.c b/arch/s390/tools/gen_facilities.c
index 424a1ba4f874..90a8c9e84ca6 100644
--- a/arch/s390/tools/gen_facilities.c
+++ b/arch/s390/tools/gen_facilities.c
@@ -62,6 +62,13 @@ static struct facility_def facility_defs[] = {
}
},
{
+ /*
+ * FACILITIES_KVM contains the list of facilities that are part
+ * of the default facility mask and list that are passed to the
+ * initial CPU model. If no CPU model is used, this, together
+ * with the non-hypervisor managed bits, is the maximum list of
+ * guest facilities supported by KVM.
+ */
.name = "FACILITIES_KVM",
.bits = (int[]){
0, /* N3 instructions */
@@ -89,6 +96,19 @@ static struct facility_def facility_defs[] = {
-1 /* END */
}
},
+ {
+ /*
+ * FACILITIES_KVM_CPUMODEL contains the list of facilities
+ * that can be enabled by CPU model code if the host supports
+ * it. These facilities are not passed to the guest without
+ * CPU model support.
+ */
+
+ .name = "FACILITIES_KVM_CPUMODEL",
+ .bits = (int[]){
+ -1 /* END */
+ }
+ },
};
static void print_facility_list(struct facility_def *def)