"non-anonymous"
On 09/07/2018 07:32 AM, marcandre.lureau(a)redhat.com wrote:
From: Marc-André Lureau <marcandre.lureau(a)redhat.com>
memfd is able to allocate hugepage anonymous memory.
Signed-off-by: Marc-André Lureau <marcandre.lureau(a)redhat.com>
---
src/conf/domain_conf.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 86199623cc..696cf6ef18 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -6186,13 +6186,6 @@ virDomainDefMemtuneValidate(const virDomainDef *def)
return -1;
}
- if (mem->source == VIR_DOMAIN_MEMORY_SOURCE_ANONYMOUS) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("hugepages are not allowed with anonymous "
- "memory source"));
- return -1;
- }
-
I believe we need to move this check into qemu specific code that would
then be able to test for QEMU_CAPS_OBJECT_MEMORY_MEMFD_HUGETLB
See qemuDomainDefValidateMemory and go from there. I think this may
require 2 patches though... One to move the two checks that I don't
think are "mem" specific and the next to add the "filter" that if the
capability exists, then we can support; otherwise, still fail.
"Theoretically speaking" those are qemu specific checks - the nodemask
checks done after this would appear to be more generic.
John
for (i = 0; i < mem->nhugepages; i++) {
size_t j;
ssize_t nextBit;