mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
qemu: Get default hugepage size only if needed
Fixes: 6864d8f740e2502dc7625bdf18ffde4465b14f69 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: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
3f4d0341e4
commit
c46bdad576
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user