aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/tools
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2018-02-09 16:26:29 +0000
committerChristian Borntraeger <borntraeger@de.ibm.com>2018-03-09 09:44:17 +0000
commitc3b9e3e1ea1c1d1524b56b6734711db2a6fc2163 (patch)
tree42cc07d5944c40ba229de7270008ed4483e2cd1d /arch/s390/tools
parentKVM: s390: fix memory overwrites when not using SCA entries (diff)
downloadlinux-dev-c3b9e3e1ea1c1d1524b56b6734711db2a6fc2163.tar.xz
linux-dev-c3b9e3e1ea1c1d1524b56b6734711db2a6fc2163.zip
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)