From 5cd5188ef8ae90624eeca023e9dc8ef18eb747b1 Mon Sep 17 00:00:00 2001 From: Xiaoyao Li Date: Tue, 12 May 2026 16:44:58 +0800 Subject: [PATCH] machine: Deprecate memory-encryption MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We've had 'confidential-guest-support' for long enough that no one should be using 'memory-encryption' anymore. Deprecate 'memory-encryption' by adding notes in docs/about/deprecated.rst and print a warning when 'memory-encryptio' is used. Suggested-by: Daniel P. Berrangé Signed-off-by: Xiaoyao Li Link: https://lore.kernel.org/qemu-devel/aMPYkUsytGxLPIM7@redhat.com/ Link: https://lore.kernel.org/r/20260512084458.622465-6-xiaoyao.li@intel.com Signed-off-by: Paolo Bonzini --- docs/about/deprecated.rst | 7 +++++++ hw/core/machine.c | 2 ++ 2 files changed, 9 insertions(+) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 97750f5edc..cf3e1a007c 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -249,6 +249,13 @@ The RISC-V ``shakti_c`` machine hasn't had meaningful contributions since 2021 and is currently unmaintained. The machine is scheduled to be removed as it appears to have no users. +``memory-encryption`` machine property (since 11.1) +''''''''''''''''''''''''''''''''''''''''''''''''''' + +Use ``confidential-guest-support`` instead. The ``memory-encryption`` object +was an early implementation of memory encryption support in QEMU, but it has +been superseded by the more comprehensive ``confidential-guest-support`` +object. Backend options --------------- diff --git a/hw/core/machine.c b/hw/core/machine.c index 9a10e45aab..5b97df6db9 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -497,6 +497,8 @@ static void machine_set_memory_encryption(Object *obj, const char *value, Object *cgs = object_resolve_path_component(object_get_objects_root(), value); + warn_report("memory-encryption is deprecated, use confidential-guest-support instead"); + if (!cgs) { error_setg(errp, "No such memory encryption object '%s'", value); return;