mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 11:31:16 +00:00
conf: numa: Add accessor to NUMA node's memory access mode
This commit is contained in:
parent
d9a779a36e
commit
7800d473f5
@ -769,7 +769,7 @@ virDomainNumaDefCPUFormat(virBufferPtr buf,
|
|||||||
virBufferAddLit(buf, "<numa>\n");
|
virBufferAddLit(buf, "<numa>\n");
|
||||||
virBufferAdjustIndent(buf, 2);
|
virBufferAdjustIndent(buf, 2);
|
||||||
for (i = 0; i < ncells; i++) {
|
for (i = 0; i < ncells; i++) {
|
||||||
memAccess = def->cells[i].memAccess;
|
memAccess = virDomainNumaGetNodeMemoryAccessMode(def, i);
|
||||||
|
|
||||||
if (!(cpustr = virBitmapFormat(virDomainNumaGetNodeCpumask(def, i))))
|
if (!(cpustr = virBitmapFormat(virDomainNumaGetNodeCpumask(def, i))))
|
||||||
return -1;
|
return -1;
|
||||||
@ -832,3 +832,11 @@ virDomainNumaGetNodeCpumask(virCPUDefPtr numa,
|
|||||||
{
|
{
|
||||||
return numa->cells[node].cpumask;
|
return numa->cells[node].cpumask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
virNumaMemAccess
|
||||||
|
virDomainNumaGetNodeMemoryAccessMode(virCPUDefPtr numa,
|
||||||
|
size_t node)
|
||||||
|
{
|
||||||
|
return numa->cells[node].memAccess;
|
||||||
|
}
|
||||||
|
@ -91,6 +91,9 @@ size_t virDomainNumaGetNodeCount(virCPUDefPtr numa)
|
|||||||
virBitmapPtr virDomainNumaGetNodeCpumask(virCPUDefPtr numa,
|
virBitmapPtr virDomainNumaGetNodeCpumask(virCPUDefPtr numa,
|
||||||
size_t node)
|
size_t node)
|
||||||
ATTRIBUTE_NONNULL(1);
|
ATTRIBUTE_NONNULL(1);
|
||||||
|
virNumaMemAccess virDomainNumaGetNodeMemoryAccessMode(virCPUDefPtr numa,
|
||||||
|
size_t node)
|
||||||
|
ATTRIBUTE_NONNULL(1);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Formatters
|
* Formatters
|
||||||
|
@ -631,6 +631,7 @@ virDomainNumaEquals;
|
|||||||
virDomainNumaFree;
|
virDomainNumaFree;
|
||||||
virDomainNumaGetNodeCount;
|
virDomainNumaGetNodeCount;
|
||||||
virDomainNumaGetNodeCpumask;
|
virDomainNumaGetNodeCpumask;
|
||||||
|
virDomainNumaGetNodeMemoryAccessMode;
|
||||||
virDomainNumaNew;
|
virDomainNumaNew;
|
||||||
virDomainNumatuneFormatNodeset;
|
virDomainNumatuneFormatNodeset;
|
||||||
virDomainNumatuneFormatXML;
|
virDomainNumatuneFormatXML;
|
||||||
|
@ -4558,7 +4558,8 @@ qemuBuildMemoryBackendStr(unsigned long long size,
|
|||||||
virDomainHugePagePtr hugepage = NULL;
|
virDomainHugePagePtr hugepage = NULL;
|
||||||
virDomainNumatuneMemMode mode;
|
virDomainNumatuneMemMode mode;
|
||||||
const long system_page_size = virGetSystemPageSizeKB();
|
const long system_page_size = virGetSystemPageSizeKB();
|
||||||
virNumaMemAccess memAccess = def->cpu->cells[guestNode].memAccess;
|
virNumaMemAccess memAccess = virDomainNumaGetNodeMemoryAccessMode(def->cpu, guestNode);
|
||||||
|
|
||||||
size_t i;
|
size_t i;
|
||||||
char *mem_path = NULL;
|
char *mem_path = NULL;
|
||||||
virBitmapPtr nodemask = NULL;
|
virBitmapPtr nodemask = NULL;
|
||||||
@ -7188,7 +7189,7 @@ qemuBuildNumaArgStr(virQEMUDriverConfigPtr cfg,
|
|||||||
if (rc == 0)
|
if (rc == 0)
|
||||||
needBackend = true;
|
needBackend = true;
|
||||||
} else {
|
} else {
|
||||||
if (def->cpu->cells[i].memAccess) {
|
if (virDomainNumaGetNodeMemoryAccessMode(def->cpu, i)) {
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
_("Shared memory mapping is not supported "
|
_("Shared memory mapping is not supported "
|
||||||
"with this QEMU"));
|
"with this QEMU"));
|
||||||
|
Loading…
Reference in New Issue
Block a user