[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v8 12/12] s390x/cpu_topology: activating CPU topology
From: |
Pierre Morel |
Subject: |
[PATCH v8 12/12] s390x/cpu_topology: activating CPU topology |
Date: |
Mon, 20 Jun 2022 16:03:52 +0200 |
The KVM capability, KVM_CAP_S390_CPU_TOPOLOGY is used to
activate the S390_FEAT_CONFIGURATION_TOPOLOGY feature.
Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
---
target/s390x/kvm/kvm.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c
index e9aa689da7..50920bdbca 100644
--- a/target/s390x/kvm/kvm.c
+++ b/target/s390x/kvm/kvm.c
@@ -370,6 +370,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;
@@ -2467,6 +2468,14 @@ void kvm_s390_get_host_cpu_model(S390CPUModel *model,
Error **errp)
set_bit(S390_FEAT_UNPACK, model->features);
}
+ /*
+ * If we have the CPU Topology implemented in KVM activate
+ * the CPU TOPOLOGY feature.
+ */
+ 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);
--
2.31.1
- [PATCH v8 01/12] Update Linux Headers, (continued)
- [PATCH v8 01/12] Update Linux Headers, Pierre Morel, 2022/06/20
- [PATCH v8 08/12] s390x/cpu_topology: implementing numa for the s390x topology, Pierre Morel, 2022/06/20
- [PATCH v8 03/12] s390x/cpu_topology: implementating Store Topology System Information, Pierre Morel, 2022/06/20
- [PATCH v8 07/12] s390x/cpu_topology: Adding drawers to STSI, Pierre Morel, 2022/06/20
- [PATCH v8 05/12] s390x/cpu_topology: Adding books to STSI, Pierre Morel, 2022/06/20
- [PATCH v8 02/12] s390x/cpu_topology: CPU topology objects and structures, Pierre Morel, 2022/06/20
- [PATCH v8 11/12] s390x/cpu_topology: CPU topology migration, Pierre Morel, 2022/06/20
- [PATCH v8 10/12] s390x/cpu_topology: resetting the Topology-Change-Report, Pierre Morel, 2022/06/20
- [PATCH v8 06/12] s390x/cpu_topology: Adding drawers to CPU topology, Pierre Morel, 2022/06/20
- [PATCH v8 09/12] target/s390x: interception of PTF instruction, Pierre Morel, 2022/06/20
- [PATCH v8 12/12] s390x/cpu_topology: activating CPU topology,
Pierre Morel <=