mirror of
https://github.com/qemu/qemu.git
synced 2025-08-10 03:59:16 +00:00
machine/memory encryption: Disable mem merge
When a host is running with memory encryption, the memory isn't visible to the host kernel; attempts to merge that memory are futile because what it's really comparing is encrypted memory, usually encrypted with different keys. Automatically turn mem-merge off when memory encryption is specified. https://bugzilla.redhat.com/show_bug.cgi?id=1796356 Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20200130175046.85850-1-dgilbert@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
dcf08bc60b
commit
4ba59be1d6
@ -425,6 +425,14 @@ static void machine_set_memory_encryption(Object *obj, const char *value,
|
|||||||
|
|
||||||
g_free(ms->memory_encryption);
|
g_free(ms->memory_encryption);
|
||||||
ms->memory_encryption = g_strdup(value);
|
ms->memory_encryption = g_strdup(value);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* With memory encryption, the host can't see the real contents of RAM,
|
||||||
|
* so there's no point in it trying to merge areas.
|
||||||
|
*/
|
||||||
|
if (value) {
|
||||||
|
machine_set_mem_merge(obj, false, errp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool machine_get_nvdimm(Object *obj, Error **errp)
|
static bool machine_get_nvdimm(Object *obj, Error **errp)
|
||||||
|
Loading…
Reference in New Issue
Block a user