mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 05:17:59 +03:00
Revert "domain_conf.c: auto-align pSeries NVDIMM in virDomainMemoryDefPostParse()"
The code to align ppc64 NVDIMMs on post parse was introduced in commitd3f3c2c97f
. That commit failed to realize that we can't align memory unconditionally. As of commitc7d7ba85a6
("qemu: command: Align memory sizes only on fresh starts"), all memory alignment should be executed only when we're not migrating or in a snapshot. This revert does not break any guests in the wild, given that ppc64 NVDIMMs are still being aligned in qemuDomainAlignMemorySizes(). Next patch will introduce a mechanism where we can have post parse NVDIMM alignment for pSeries without breaking the intended design, as defined byc7d7ba85a6
. This reverts commitd3f3c2c97f
. Reviewed-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
a1310c9644
commit
e556b2c616
@ -5359,24 +5359,6 @@ virDomainVsockDefPostParse(virDomainVsockDefPtr vsock)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
virDomainMemoryDefPostParse(virDomainMemoryDefPtr mem,
|
||||
const virDomainDef *def)
|
||||
{
|
||||
/* Although only the QEMU driver implements PPC64 support, this
|
||||
* code is related to the platform specification (PAPR), i.e. it
|
||||
* is hypervisor agnostic, and any future PPC64 hypervisor driver
|
||||
* will have the same restriction.
|
||||
*/
|
||||
if (ARCH_IS_PPC64(def->os.arch) &&
|
||||
mem->model == VIR_DOMAIN_MEMORY_MODEL_NVDIMM &&
|
||||
virDomainNVDimmAlignSizePseries(mem) < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
virDomainDeviceDefPostParseCommon(virDomainDeviceDefPtr dev,
|
||||
const virDomainDef *def,
|
||||
@ -5422,10 +5404,6 @@ virDomainDeviceDefPostParseCommon(virDomainDeviceDefPtr dev,
|
||||
ret = 0;
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_DEVICE_MEMORY:
|
||||
ret = virDomainMemoryDefPostParse(dev->data.memory, def);
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_DEVICE_LEASE:
|
||||
case VIR_DOMAIN_DEVICE_FS:
|
||||
case VIR_DOMAIN_DEVICE_INPUT:
|
||||
@ -5440,6 +5418,7 @@ virDomainDeviceDefPostParseCommon(virDomainDeviceDefPtr dev,
|
||||
case VIR_DOMAIN_DEVICE_SHMEM:
|
||||
case VIR_DOMAIN_DEVICE_TPM:
|
||||
case VIR_DOMAIN_DEVICE_PANIC:
|
||||
case VIR_DOMAIN_DEVICE_MEMORY:
|
||||
case VIR_DOMAIN_DEVICE_IOMMU:
|
||||
case VIR_DOMAIN_DEVICE_AUDIO:
|
||||
ret = 0;
|
||||
|
@ -34,7 +34,7 @@
|
||||
<path>/tmp/nvdimm</path>
|
||||
</source>
|
||||
<target>
|
||||
<size unit='KiB'>524416</size>
|
||||
<size unit='KiB'>550000</size>
|
||||
<node>0</node>
|
||||
<label>
|
||||
<size unit='KiB'>128</size>
|
||||
|
Loading…
Reference in New Issue
Block a user