Re: [PATCH v2] qemuBuildMemoryBackendStr: Don't crash if no hugetlbfs is mounted

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 19, 2016 at 11:03:30 +0200, Michal Privoznik wrote:
> When trying to migrate a huge page enabled guest, I've noticed
> the following crash. Apparently, if no specific hugepages are
> requested:
> 
>   <memoryBacking>
>     <hugepages/>
>   </memoryBacking>

[...]

> ---
> 
> diff to v1:
> 
> - added a comment to qemuGetDefaultHugepath() as requested in the review
> 
>  src/qemu/qemu_command.c |  6 ++++++
>  src/qemu/qemu_conf.c    | 10 ++++++++++
>  2 files changed, 16 insertions(+)

[...]

> diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
> index dad8334..901ad23 100644
> --- a/src/qemu/qemu_conf.c
> +++ b/src/qemu/qemu_conf.c
> @@ -1450,6 +1450,16 @@ qemuGetHugepagePath(virHugeTLBFSPtr hugepage)
>      return ret;
>  }
>  
> +
> +/**
> + * qemuGetDefaultHugepath:
> + *
> + * Get default hugepages path for memory backend. Does not work
> + * well with @nhugetlbfs == 0 or @hugetlbfs == NULL.

'Callers must ensure that @hugetlbfs contains at least one entry.'
instead of the second sentence which doesn't really tell much.

Also add a description of the arguments since you are referring to them
in the comment.

> + *
> + * Returns 0 on success,
> + *        -1 otherwise.

These will fit on a signe line.

> + * */

ACK with the above issues resolved.

Peter

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]