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>
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user