Skip to content
Snippets Groups Projects
  • David Hildenbrand's avatar
    81ce6aa5
    numa: we don't implement NUMA for s390x · 81ce6aa5
    David Hildenbrand authored
    
    Right now it is possible to crash QEMU for s390x by providing e.g.
        -numa node,nodeid=0,cpus=0-1
    
    Problem is, that numa.c uses mc->cpu_index_to_instance_props as an
    indicator whether NUMA is supported by a machine type. We don't
    implement NUMA for s390x ("topology") yet. However we need
    mc->cpu_index_to_instance_props for query-cpus.
    
    So let's fix this case by also checking for mc->get_default_cpu_node_id,
    which will be needed by machine_set_cpu_numa_node().
    
    qemu-system-s390x: -numa node,nodeid=0,cpus=0-1: NUMA is not supported by
                       this machine-type
    
    While at it, make s390_cpu_index_to_props() look like on other
    architectures.
    
    Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
    Message-Id: <20180227110255.20999-1-david@redhat.com>
    Reviewed-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
    Signed-off-by: default avatarCornelia Huck <cohuck@redhat.com>
    81ce6aa5
    History
    numa: we don't implement NUMA for s390x
    David Hildenbrand authored
    
    Right now it is possible to crash QEMU for s390x by providing e.g.
        -numa node,nodeid=0,cpus=0-1
    
    Problem is, that numa.c uses mc->cpu_index_to_instance_props as an
    indicator whether NUMA is supported by a machine type. We don't
    implement NUMA for s390x ("topology") yet. However we need
    mc->cpu_index_to_instance_props for query-cpus.
    
    So let's fix this case by also checking for mc->get_default_cpu_node_id,
    which will be needed by machine_set_cpu_numa_node().
    
    qemu-system-s390x: -numa node,nodeid=0,cpus=0-1: NUMA is not supported by
                       this machine-type
    
    While at it, make s390_cpu_index_to_props() look like on other
    architectures.
    
    Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
    Message-Id: <20180227110255.20999-1-david@redhat.com>
    Reviewed-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
    Signed-off-by: default avatarCornelia Huck <cohuck@redhat.com>