mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
target/s390x/cpu topology: activate CPU topology
The KVM capability KVM_CAP_S390_CPU_TOPOLOGY is used to activate the S390_FEAT_CONFIGURATION_TOPOLOGY feature and the topology facility in the host CPU model for the guest in the case the topology is available in QEMU and in KVM. The feature is disabled by default and fenced for SE (secure execution). Signed-off-by: Pierre Morel <pmorel@linux.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20231016183925.2384704-9-nsg@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
af37bad52e
commit
f530b9e7da
3 changed files with 11 additions and 1 deletions
|
@ -366,6 +366,7 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
|
|||
kvm_vm_enable_cap(s, KVM_CAP_S390_USER_SIGP, 0);
|
||||
kvm_vm_enable_cap(s, KVM_CAP_S390_VECTOR_REGISTERS, 0);
|
||||
kvm_vm_enable_cap(s, KVM_CAP_S390_USER_STSI, 0);
|
||||
kvm_vm_enable_cap(s, KVM_CAP_S390_CPU_TOPOLOGY, 0);
|
||||
if (ri_allowed()) {
|
||||
if (kvm_vm_enable_cap(s, KVM_CAP_S390_RI, 0) == 0) {
|
||||
cap_ri = 1;
|
||||
|
@ -2509,6 +2510,14 @@ void kvm_s390_get_host_cpu_model(S390CPUModel *model, Error **errp)
|
|||
set_bit(S390_FEAT_UNPACK, model->features);
|
||||
}
|
||||
|
||||
/*
|
||||
* If we have kernel support for CPU Topology indicate the
|
||||
* configuration-topology facility.
|
||||
*/
|
||||
if (kvm_check_extension(kvm_state, KVM_CAP_S390_CPU_TOPOLOGY)) {
|
||||
set_bit(S390_FEAT_CONFIGURATION_TOPOLOGY, model->features);
|
||||
}
|
||||
|
||||
/* We emulate a zPCI bus and AEN, therefore we don't need HW support */
|
||||
set_bit(S390_FEAT_ZPCI, model->features);
|
||||
set_bit(S390_FEAT_ADAPTER_EVENT_NOTIFICATION, model->features);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue