提交 c46bdad5 编写于 作者: M Michal Privoznik

qemu: Get default hugepage size only if needed

Fixes: 6864d8f7

Hugepages don't work in session mode but when building memory
part of command line we query for the default size anyway. This
breaks creating domains under session daemon. Query the page size
only if it's clear we need hugepages.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NErik Skultety <eskultet@redhat.com>
上级 3f4d0341
......@@ -3573,7 +3573,7 @@ qemuBuildMemoryBackendProps(virJSONValuePtr *backendProps,
pagesize = 0;
needHugepage = false;
useHugepage = false;
} else if (pagesize == 0) {
} else if (useHugepage && pagesize == 0) {
if (qemuBuildMemoryGetDefaultPagesize(cfg, &pagesize) < 0)
goto cleanup;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册