qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: peterx@redhat.com
To: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Cc: peterx@redhat.com, "Fabiano Rosas" <farosas@suse.de>,
	"Cédric Le Goater" <clg@redhat.com>
Subject: [PULL 14/20] docs/migration: Split "Debugging" and "Firmware"
Date: Tue, 16 Jan 2024 11:19:41 +0800	[thread overview]
Message-ID: <20240116031947.69017-15-peterx@redhat.com> (raw)
In-Reply-To: <20240116031947.69017-1-peterx@redhat.com>

From: Peter Xu <peterx@redhat.com>

Move the two sections into a separate file called "best-practices.rst".
Add the entry into index.

Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/r/20240109064628.595453-6-peterx@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
---
 docs/devel/migration/best-practices.rst | 48 +++++++++++++++++++++++++
 docs/devel/migration/index.rst          |  1 +
 docs/devel/migration/main.rst           | 44 -----------------------
 3 files changed, 49 insertions(+), 44 deletions(-)
 create mode 100644 docs/devel/migration/best-practices.rst

diff --git a/docs/devel/migration/best-practices.rst b/docs/devel/migration/best-practices.rst
new file mode 100644
index 0000000000..d7c34a3014
--- /dev/null
+++ b/docs/devel/migration/best-practices.rst
@@ -0,0 +1,48 @@
+==============
+Best practices
+==============
+
+Debugging
+=========
+
+The migration stream can be analyzed thanks to ``scripts/analyze-migration.py``.
+
+Example usage:
+
+.. code-block:: shell
+
+  $ qemu-system-x86_64 -display none -monitor stdio
+  (qemu) migrate "exec:cat > mig"
+  (qemu) q
+  $ ./scripts/analyze-migration.py -f mig
+  {
+    "ram (3)": {
+        "section sizes": {
+            "pc.ram": "0x0000000008000000",
+  ...
+
+See also ``analyze-migration.py -h`` help for more options.
+
+Firmware
+========
+
+Migration migrates the copies of RAM and ROM, and thus when running
+on the destination it includes the firmware from the source. Even after
+resetting a VM, the old firmware is used.  Only once QEMU has been restarted
+is the new firmware in use.
+
+- Changes in firmware size can cause changes in the required RAMBlock size
+  to hold the firmware and thus migration can fail.  In practice it's best
+  to pad firmware images to convenient powers of 2 with plenty of space
+  for growth.
+
+- Care should be taken with device emulation code so that newer
+  emulation code can work with older firmware to allow forward migration.
+
+- Care should be taken with newer firmware so that backward migration
+  to older systems with older device emulation code will work.
+
+In some cases it may be best to tie specific firmware versions to specific
+versioned machine types to cut down on the combinations that will need
+support.  This is also useful when newer versions of firmware outgrow
+the padding.
diff --git a/docs/devel/migration/index.rst b/docs/devel/migration/index.rst
index 7fc02b9520..9a8fd1ead7 100644
--- a/docs/devel/migration/index.rst
+++ b/docs/devel/migration/index.rst
@@ -11,3 +11,4 @@ QEMU live migration works.
    compatibility
    vfio
    virtio
+   best-practices
diff --git a/docs/devel/migration/main.rst b/docs/devel/migration/main.rst
index b3e31bb52f..97811ce371 100644
--- a/docs/devel/migration/main.rst
+++ b/docs/devel/migration/main.rst
@@ -52,27 +52,6 @@ All these migration protocols use the same infrastructure to
 save/restore state devices.  This infrastructure is shared with the
 savevm/loadvm functionality.
 
-Debugging
-=========
-
-The migration stream can be analyzed thanks to ``scripts/analyze-migration.py``.
-
-Example usage:
-
-.. code-block:: shell
-
-  $ qemu-system-x86_64 -display none -monitor stdio
-  (qemu) migrate "exec:cat > mig"
-  (qemu) q
-  $ ./scripts/analyze-migration.py -f mig
-  {
-    "ram (3)": {
-        "section sizes": {
-            "pc.ram": "0x0000000008000000",
-  ...
-
-See also ``analyze-migration.py -h`` help for more options.
-
 Common infrastructure
 =====================
 
@@ -970,26 +949,3 @@ the background migration channel.  Anyone who cares about latencies of page
 faults during a postcopy migration should enable this feature.  By default,
 it's not enabled.
 
-Firmware
-========
-
-Migration migrates the copies of RAM and ROM, and thus when running
-on the destination it includes the firmware from the source. Even after
-resetting a VM, the old firmware is used.  Only once QEMU has been restarted
-is the new firmware in use.
-
-- Changes in firmware size can cause changes in the required RAMBlock size
-  to hold the firmware and thus migration can fail.  In practice it's best
-  to pad firmware images to convenient powers of 2 with plenty of space
-  for growth.
-
-- Care should be taken with device emulation code so that newer
-  emulation code can work with older firmware to allow forward migration.
-
-- Care should be taken with newer firmware so that backward migration
-  to older systems with older device emulation code will work.
-
-In some cases it may be best to tie specific firmware versions to specific
-versioned machine types to cut down on the combinations that will need
-support.  This is also useful when newer versions of firmware outgrow
-the padding.
-- 
2.43.0



  parent reply	other threads:[~2024-01-16  3:22 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-16  3:19 [PULL 00/20] Migration 20240116 patches peterx
2024-01-16  3:19 ` [PULL 01/20] migration: Simplify initial conditionals in migration for better readability peterx
2024-01-16  3:19 ` [PULL 02/20] migration/multifd: Remove MultiFDPages_t::packet_num peterx
2024-01-16  3:19 ` [PULL 03/20] migration/multifd: Remove QEMUFile from where it is not needed peterx
2024-01-16  3:19 ` [PULL 04/20] migration/multifd: Change multifd_pages_init argument peterx
2024-01-16  3:19 ` [PULL 05/20] migration: Report error in incoming migration peterx
2024-01-16  3:19 ` [PULL 06/20] tests/qtest/migration: Print migration incoming errors peterx
2024-01-16  3:19 ` [PULL 07/20] tests/qtest/migration: Add a wrapper to print test names peterx
2024-01-16  3:19 ` [PULL 08/20] tests/qtest/migration: Use the new migration_test_add peterx
2024-01-16  3:19 ` [PULL 09/20] tests/qtest: Re-enable multifd cancel test peterx
2024-01-16  3:19 ` [PULL 10/20] docs/migration: Create migration/ directory peterx
2024-01-16  3:19 ` [PULL 11/20] docs/migration: Create index page peterx
2024-01-16  3:19 ` [PULL 12/20] docs/migration: Convert virtio.txt into rST peterx
2024-01-16  3:19 ` [PULL 13/20] docs/migration: Split "Backwards compatibility" separately peterx
2024-01-16  3:19 ` peterx [this message]
2024-01-16  3:19 ` [PULL 15/20] docs/migration: Split "Postcopy" peterx
2024-01-16  3:19 ` [PULL 16/20] docs/migration: Split "dirty limit" peterx
2024-01-16  3:19 ` [PULL 17/20] docs/migration: Organize "Postcopy" page peterx
2024-01-16  3:19 ` [PULL 18/20] docs/migration: Further move vfio to be feature of migration peterx
2024-01-16  3:19 ` [PULL 19/20] docs/migration: Further move virtio " peterx
2024-01-16  3:19 ` [PULL 20/20] migration/rdma: define htonll/ntohll only if not predefined peterx
2024-01-16 16:33 ` [PULL 00/20] Migration 20240116 patches Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240116031947.69017-15-peterx@redhat.com \
    --to=peterx@redhat.com \
    --cc=clg@redhat.com \
    --cc=farosas@suse.de \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).