The HostMemoryBackend::use_canonical_path boolean
was only set in the hw_compat_3_1[] array, via the
'x-use-canonical-path-for-ramblock-id=true' property.
We removed all machines using that array, but the
comment added in commit 8db0b20415c ("machine: add
missing doc for memory-backend option") requested to
not remove this property "as long as 4.0 and older
machine types exists". Previous commit removed the
last machines in this range, we can now remove that
property and all the code around it.Signed-off-by: Philippe Mathieu-Daudé <[email protected]> --- qapi/qom.json | 8 +------- include/system/hostmem.h | 2 +- backends/hostmem.c | 34 ---------------------------------- qemu-options.hx | 10 ---------- 4 files changed, 2 insertions(+), 52 deletions(-) diff --git a/qapi/qom.json b/qapi/qom.json index c653248f85d..3e13e3fd25c 100644 --- a/qapi/qom.json +++ b/qapi/qom.json @@ -660,11 +660,6 @@ # # @size: size of the memory region in bytes # -# @x-use-canonical-path-for-ramblock-id: if true, the canonical path -# is used for ramblock-id. Disable this for 4.0 machine types or -# older to allow migration with newer QEMU versions. -# (default: false generally, but true for machine types <= 4.0) -# # .. note:: prealloc=true and reserve=false cannot be set at the same # time. With reserve=true, the behavior depends on the operating # system: for example, Linux will not reserve swap space for shared @@ -683,8 +678,7 @@ '*prealloc-context': 'str', '*share': 'bool', '*reserve': 'bool', - 'size': 'size', - '*x-use-canonical-path-for-ramblock-id': 'bool' } } + 'size': 'size' } } ## # @MemoryBackendFileProperties: diff --git a/include/system/hostmem.h b/include/system/hostmem.h index 88fa791ac78..cafcf9c9c74 100644 --- a/include/system/hostmem.h +++ b/include/system/hostmem.h @@ -74,7 +74,7 @@ struct HostMemoryBackend { /* protected */ uint64_t size; - bool merge, dump, use_canonical_path; + bool merge, dump; bool prealloc, is_mapped, share, reserve; bool guest_memfd, aligned; uint32_t prealloc_threads; diff --git a/backends/hostmem.c b/backends/hostmem.c index 15d4365b697..7da7cd54e05 100644 --- a/backends/hostmem.c +++ b/backends/hostmem.c @@ -40,10 +40,6 @@ QEMU_BUILD_BUG_ON(HOST_MEM_POLICY_INTERLEAVE != MPOL_INTERLEAVE); char * host_memory_backend_get_name(HostMemoryBackend *backend) { - if (!backend->use_canonical_path) { - return g_strdup(object_get_canonical_path_component(OBJECT(backend))); - } - return object_get_canonical_path(OBJECT(backend)); } @@ -484,23 +480,6 @@ static void host_memory_backend_set_reserve(Object *o, bool value, Error **errp) } #endif /* CONFIG_LINUX */ -static bool -host_memory_backend_get_use_canonical_path(Object *obj, Error **errp) -{ - HostMemoryBackend *backend = MEMORY_BACKEND(obj); - - return backend->use_canonical_path; -} - -static void -host_memory_backend_set_use_canonical_path(Object *obj, bool value, - Error **errp) -{ - HostMemoryBackend *backend = MEMORY_BACKEND(obj); - - backend->use_canonical_path = value; -} - static void host_memory_backend_class_init(ObjectClass *oc, const void *data) { @@ -563,19 +542,6 @@ host_memory_backend_class_init(ObjectClass *oc, const void *data) object_class_property_set_description(oc, "reserve", "Reserve swap space (or huge pages) if applicable"); #endif /* CONFIG_LINUX */ - /* - * Do not delete/rename option. This option must be considered stable - * (as if it didn't have the 'x-' prefix including deprecation period) as - * long as 4.0 and older machine types exists. - * Option will be used by upper layers to override (disable) canonical path - * for ramblock-id set by compat properties on old machine types ( <= 4.0), - * to keep migration working when backend is used for main RAM with - * -machine memory-backend= option (main RAM historically used prefix-less - * ramblock-id). - */ - object_class_property_add_bool(oc, "x-use-canonical-path-for-ramblock-id", - host_memory_backend_get_use_canonical_path, - host_memory_backend_set_use_canonical_path); } static const TypeInfo host_memory_backend_info = { diff --git a/qemu-options.hx b/qemu-options.hx index 890c4f1d230..dce5d8cd5d2 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -137,16 +137,6 @@ SRST * as backend id one shall use value of 'default-ram-id', advertised by machine type (available via ``query-machines`` QMP command), if migration to/from old QEMU (<5.0) is expected. - * for machine types 4.0 and older, user shall - use ``x-use-canonical-path-for-ramblock-id=off`` backend option - if migration to/from old QEMU (<5.0) is expected. - - For example: - :: - - -object memory-backend-ram,id=pc.ram,size=512M,x-use-canonical-path-for-ramblock-id=off - -machine memory-backend=pc.ram - -m 512M ``cxl-fmw.0.targets.0=firsttarget,cxl-fmw.0.targets.1=secondtarget,cxl-fmw.0.size=size[,cxl-fmw.0.interleave-granularity=granularity]`` Define a CXL Fixed Memory Window (CFMW). -- 2.52.0
