qemu: Make virFileFindHugeTLBFS fault tolerant
Since commit be0782e1 we are parsing /proc/meminfo to find out the default huge page size. However, if the host we are running at does not support any huge pages (e.g. CONFIG_HUGETLB_PAGE is turned off), we will not successfully parse the meminfo file and hence the whole qemu driver init process fails. Moreover, the default huge page size is needed if and only if there's at least one hugetlbfs mount point. So the fix consists of moving the virFileGetDefaultHugepageSize function call after the first hugetlbfs mount point is found. With this fix, we fail to start with one or more hugetlbfs mounts and malformed meminfo file, but that's expected (how can one mount hugetlbfs without kernel supporting huge pages?). Workaround in that case is to umount all the hugetlbfs mounts. Reported-by: NJim Fehlig <jfehlig@suse.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Showing
想要评论请 注册 或 登录