@@ -241,9 +241,15 @@ static uint32_t max_thread_ids_for_cache(X86CPUTopoInfo *topo_info,
uint32_t num_ids = 0;
switch (share_level) {
+ case CPU_TOPO_LEVEL_THREAD:
+ num_ids = 1;
+ break;
case CPU_TOPO_LEVEL_CORE:
num_ids = 1 << apicid_core_offset(topo_info);
break;
+ case CPU_TOPO_LEVEL_MODULE:
+ num_ids = 1 << apicid_module_offset(topo_info);
+ break;
case CPU_TOPO_LEVEL_DIE:
num_ids = 1 << apicid_die_offset(topo_info);
break;
@@ -251,10 +257,6 @@ static uint32_t max_thread_ids_for_cache(X86CPUTopoInfo *topo_info,
num_ids = 1 << apicid_pkg_offset(topo_info);
break;
default:
- /*
- * Currently there is no use case for SMT and MODULE, so use
- * assert directly to facilitate debugging.
- */
g_assert_not_reached();
}