Skip to content
  • Yicong Yang's avatar
    97f4effe
    hw/acpi/aml-build: Only generate cluster node in PPTT when specified · 97f4effe
    Yicong Yang authored
    
    
    Currently we'll always generate a cluster node no matter user has
    specified '-smp clusters=X' or not. Cluster is an optional level
    and will participant the building of Linux scheduling domains and
    only appears on a few platforms. It's unncessary to always build
    it when it cannot reflect the real topology on platforms having no
    cluster implementation and to avoid affecting the linux scheduling
    domains in the VM. So only generate the cluster topology in ACPI
    PPTT when the user has specified it explicitly in -smp.
    
    Tested qemu-system-aarch64 with `-smp 8` and linux 6.1-rc1, without
    this patch:
    estuary:/sys/devices/system/cpu/cpu0/topology$ cat cluster_*
    ff	# cluster_cpus
    0-7	# cluster_cpus_list
    56	# cluster_id
    
    with this patch:
    estuary:/sys/devices/system/cpu/cpu0/topology$ cat cluster_*
    ff	# cluster_cpus
    0-7	# cluster_cpus_list
    36	# cluster_id, with no cluster node kernel will make it to
    	  physical package id
    
    Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Reviewed-by: default avatarYanan Wang <wangyanan55@huawei.com>
    Tested-by: default avatarYanan Wang <wangyanan55@huawei.com>
    Signed-off-by: default avatarYicong Yang <yangyicong@hisilicon.com>
    Message-Id: <20221229065513.55652-3-yangyicong@huawei.com>
    Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    97f4effe
    hw/acpi/aml-build: Only generate cluster node in PPTT when specified
    Yicong Yang authored
    
    
    Currently we'll always generate a cluster node no matter user has
    specified '-smp clusters=X' or not. Cluster is an optional level
    and will participant the building of Linux scheduling domains and
    only appears on a few platforms. It's unncessary to always build
    it when it cannot reflect the real topology on platforms having no
    cluster implementation and to avoid affecting the linux scheduling
    domains in the VM. So only generate the cluster topology in ACPI
    PPTT when the user has specified it explicitly in -smp.
    
    Tested qemu-system-aarch64 with `-smp 8` and linux 6.1-rc1, without
    this patch:
    estuary:/sys/devices/system/cpu/cpu0/topology$ cat cluster_*
    ff	# cluster_cpus
    0-7	# cluster_cpus_list
    56	# cluster_id
    
    with this patch:
    estuary:/sys/devices/system/cpu/cpu0/topology$ cat cluster_*
    ff	# cluster_cpus
    0-7	# cluster_cpus_list
    36	# cluster_id, with no cluster node kernel will make it to
    	  physical package id
    
    Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Reviewed-by: default avatarYanan Wang <wangyanan55@huawei.com>
    Tested-by: default avatarYanan Wang <wangyanan55@huawei.com>
    Signed-off-by: default avatarYicong Yang <yangyicong@hisilicon.com>
    Message-Id: <20221229065513.55652-3-yangyicong@huawei.com>
    Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Loading