[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/46] machine: add missing doc for memory-backend option
From: |
Paolo Bonzini |
Subject: |
[PULL 09/46] machine: add missing doc for memory-backend option |
Date: |
Mon, 8 Feb 2021 19:22:54 +0100 |
From: Igor Mammedov <imammedo@redhat.com>
Add documentation for '-machine memory-backend' CLI option and
how to use it.
And document that x-use-canonical-path-for-ramblock-id,
is considered to be stable to make sure it won't go away by accident.
x- was intended for unstable/iternal properties, and not supposed to
be stable option. However it's too late to rename (drop x-)
it as it would mean that users will have to mantain both
x-use-canonical-path-for-ramblock-id (for QEMU 5.0-5.2) versions
and prefix-less for later versions.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20210121161504.1007247-1-imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
backends/hostmem.c | 10 ++++++++++
qemu-options.hx | 26 +++++++++++++++++++++++++-
2 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/backends/hostmem.c b/backends/hostmem.c
index be0c3b079f..c6c1ff5b99 100644
--- a/backends/hostmem.c
+++ b/backends/hostmem.c
@@ -494,6 +494,16 @@ host_memory_backend_class_init(ObjectClass *oc, void *data)
host_memory_backend_get_share, host_memory_backend_set_share);
object_class_property_set_description(oc, "share",
"Mark the memory as private to QEMU or shared");
+ /*
+ * 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);
diff --git a/qemu-options.hx b/qemu-options.hx
index c09c4646e2..6c34c7050f 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -35,7 +35,8 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \
" suppress-vmdesc=on|off disables self-describing migration
(default=off)\n"
" nvdimm=on|off controls NVDIMM support (default=off)\n"
" memory-encryption=@var{} memory encryption object to use
(default=none)\n"
- " hmat=on|off controls ACPI HMAT support (default=off)\n",
+ " hmat=on|off controls ACPI HMAT support (default=off)\n"
+ " memory-backend='backend-id' specifies explicitly provided
backend for main RAM (default=none)\n",
QEMU_ARCH_ALL)
SRST
``-machine [type=]name[,prop=value[,...]]``
@@ -96,6 +97,29 @@ SRST
``hmat=on|off``
Enables or disables ACPI Heterogeneous Memory Attribute Table
(HMAT) support. The default is off.
+
+ ``memory-backend='id'``
+ An alternative to legacy ``-mem-path`` and ``mem-prealloc`` options.
+ Allows to use a memory backend as main RAM.
+
+ For example:
+ ::
+ -object
memory-backend-file,id=pc.ram,size=512M,mem-path=/hugetlbfs,prealloc=on,share=on
+ -machine memory-backend=pc.ram
+ -m 512M
+
+ Migration compatibility note:
+ a) 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.
+ b) 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
ERST
HXCOMM Deprecated by -machine
--
2.29.2
- [PULL 00/46] Misc patches for 2021-02-08, Paolo Bonzini, 2021/02/08
- [PULL 03/46] docs/fuzz: fix pre-meson path, Paolo Bonzini, 2021/02/08
- [PULL 06/46] docs/fuzz: add some information about OSS-Fuzz, Paolo Bonzini, 2021/02/08
- [PULL 04/46] fuzz: log the arguments used to initialize QEMU, Paolo Bonzini, 2021/02/08
- [PULL 05/46] fuzz: enable dynamic args for generic-fuzz configs, Paolo Bonzini, 2021/02/08
- [PULL 02/46] fuzz: refine the ide/ahci fuzzer configs, Paolo Bonzini, 2021/02/08
- [PULL 08/46] target/i386: do not set LM for 32-bit emulation "-cpu host/max", Paolo Bonzini, 2021/02/08
- [PULL 07/46] fuzz: add virtio-9p configurations for fuzzing, Paolo Bonzini, 2021/02/08
- [PULL 01/46] fuzz: ignore address_space_map is_write flag, Paolo Bonzini, 2021/02/08
- [PULL 13/46] fuzz: fix wrong index in clear_bits, Paolo Bonzini, 2021/02/08
- [PULL 09/46] machine: add missing doc for memory-backend option,
Paolo Bonzini <=
- [PULL 14/46] docs: don't install corresponding man page if guest agent is disabled, Paolo Bonzini, 2021/02/08
- [PULL 11/46] meson: honor --enable-rbd if cc.links test fails, Paolo Bonzini, 2021/02/08
- [PULL 16/46] event_notifier: handle initialization failure better, Paolo Bonzini, 2021/02/08
- [PULL 10/46] meson: accept either shared or static libraries if --disable-static, Paolo Bonzini, 2021/02/08
- [PULL 12/46] x86/cpu: Populate SVM CPUID feature bits, Paolo Bonzini, 2021/02/08
- [PULL 15/46] virtio-scsi: don't uninitialize queues that we didn't initialize, Paolo Bonzini, 2021/02/08
- [PULL 17/46] target/i386: Fix decoding of certain BMI instructions, Paolo Bonzini, 2021/02/08
- [PULL 20/46] meson: Explicit TCG backend used, Paolo Bonzini, 2021/02/08
- [PULL 18/46] target/i86: implement PKS, Paolo Bonzini, 2021/02/08
- [PULL 19/46] configure: Improve TCI feature description, Paolo Bonzini, 2021/02/08