Skip to content
  • Greg Kurz's avatar
    f29b959d
    spapr: Convert hpt_prepare_thread() to use qemu_try_memalign() · f29b959d
    Greg Kurz authored
    
    
    HPT resizing is asynchronous: the guest first kicks off the creation of a
    new HPT, then it waits for that new HPT to be actually created and finally
    it asks the current HPT to be replaced by the new one.
    
    In the case of a userland allocated HPT, this currently relies on calling
    qemu_memalign() which aborts on OOM and never returns NULL. Since we seem
    to have path to report the failure to the guest with an H_NO_MEM return
    value, use qemu_try_memalign() instead of qemu_memalign().
    
    Signed-off-by: default avatarGreg Kurz <groug@kaod.org>
    Message-Id: <160398563636.32380.1747166034877173994.stgit@bahia.lan>
    Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
    f29b959d
    spapr: Convert hpt_prepare_thread() to use qemu_try_memalign()
    Greg Kurz authored
    
    
    HPT resizing is asynchronous: the guest first kicks off the creation of a
    new HPT, then it waits for that new HPT to be actually created and finally
    it asks the current HPT to be replaced by the new one.
    
    In the case of a userland allocated HPT, this currently relies on calling
    qemu_memalign() which aborts on OOM and never returns NULL. Since we seem
    to have path to report the failure to the guest with an H_NO_MEM return
    value, use qemu_try_memalign() instead of qemu_memalign().
    
    Signed-off-by: default avatarGreg Kurz <groug@kaod.org>
    Message-Id: <160398563636.32380.1747166034877173994.stgit@bahia.lan>
    Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
Loading