maintainer updates for 10.1 softfreeeze (gitlab, plugins, docs) pre-PR
cover maintainer updates for 10.1 softfreeeze (gitlab, plugins, docs) pre-PR
I've collected up the last few bits that are ready for my last PR before the 10.1 softfreeze. The most consequential is enabling registers for the Alpha target in plugins. The rest is little clean-ups here and there.
I intend to send the PR on Monday.
The following patches are un-reviewed:
docs/system: clean-up formatting of virtio-net-failover
plugins: fix inclusion of user-mode APIs
gitlab: add -n option to check_units
gitlab: use argparse in check-units script
Alex
Alex Bennée (4):
gitlab: use argparse in check-units script
gitlab: add -n option to check_units
plugins: fix inclusion of user-mode APIs docs/system: clean-up formatting of virtio-net-failover
Manos Pitsidianakis (1):
docs: use :kbd: role in sphinx docs
Yodel Eldar (2):
contrib/plugins/execlog: Add tab to the separator search of insn_disas target/alpha: Add GDB XML feature file
docs/devel/testing/main.rst | 4 +- docs/system/images.rst | 2 +- docs/system/keys.rst.inc | 49 +++++----- docs/system/linuxboot.rst | 2 +- docs/system/mux-chardev.rst.inc | 38 ++++---- docs/system/virtio-net-failover.rst | 51 +++++----- configs/targets/alpha-linux-user.mak | 1 + configs/targets/alpha-softmmu.mak | 1 + contrib/plugins/execlog.c | 15 +-- linux-user/plugin-api.c | 1 + target/alpha/cpu.c | 1 + common-user/plugin-api.c.inc | 1 + .gitlab-ci.d/check-units.py | 29 +++--- gdb-xml/alpha-core.xml | 136 +++++++++++++++++++++++++++ linux-user/meson.build | 5 +- 15 files changed, 250 insertions(+), 86 deletions(-) create mode 100644 gdb-xml/alpha-core.xml
Signature · 1 line
2.47.2
PATCH 1/7 gitlab: use argparse in check-units script
Modernise the argument parsing so we can easily add to the script.
--- .gitlab-ci.d/check-units.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-)
.gitlab-ci.d/check-units.py +12 -9
@@ -8,8 +8,10 @@ # SPDX-License-Identifier: GPL-2.0-or-later from os import access, R_OK, path -from sys import argv, exit +from sys import exit import json +import argparse +from pathlib import Path from collections import Counter
@@ -51,16 +53,17 @@ def analyse_units(build_units): if __name__ == "__main__": - if len(argv) != 2: - script_name = path.basename(argv[0]) - print(f"Usage: {script_name} <path_to_compile_commands.json>") - exit(1) + parser = argparse.ArgumentParser( + description="analyse number of build units in compile_commands.json") + parser.add_argument("cc_path", type=Path, default=None, + help="Path to compile_commands.json") + + args = parser.parse_args() - cc_path = argv[1] - if path.isfile(cc_path) and access(cc_path, R_OK): - units = extract_build_units(cc_path) + if path.isfile(args.cc_path) and access(args.cc_path, R_OK): + units = extract_build_units(args.cc_path) analyse_units(units) exit(0) else: - print(f"{cc_path} doesn't exist or isn't readable") + print(f"{args.cc_path} doesn't exist or isn't readable") exit(1)
Signature · 1 line
2.47.2
Re: [PATCH 1/7] gitlab: use argparse in check-units script
Quoted 51 lines · Alex Bennée
Modernise the argument parsing so we can easily add to the script.
Signed-off-by Alex Bennée <[email protected]>--- .gitlab-ci.d/check-units.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-).gitlab-ci.d/check-units.py +12
-10@@ -8,8 +8,10 @@ # SPDX-License-Identifier: GPL-2.0-or-later from os import access, R_OK, path -from sys import argv, exit +from sys import exit import json +import argparse +from pathlib import Path from collections import Counter@@ -51,16 +53,17 @@ def analyse_units(build_units): if __name__ == "__main__": - if len(argv) != 2: - script_name = path.basename(argv[0]) - print(f"Usage: {script_name} <path_to_compile_commands.json>") - exit(1) + parser = argparse.ArgumentParser( + description="analyse number of build units in compile_commands.json") + parser.add_argument("cc_path", type=Path, default=None, + help="Path to compile_commands.json") + + args = parser.parse_args() - cc_path = argv[1] - if path.isfile(cc_path) and access(cc_path, R_OK): - units = extract_build_units(cc_path) + if path.isfile(args.cc_path) and access(args.cc_path, R_OK): + units = extract_build_units(args.cc_path) analyse_units(units) exit(0) else: - print(f"{cc_path} doesn't exist or isn't readable") + print(f"{args.cc_path} doesn't exist or isn't readable") exit(1) --
Quoted 3 lines
2.47.2
PATCH 2/7 gitlab: add -n option to check_units
In reply to Alex BennéeMostly a developer aid for those who want to look at the full backlog of multiple build units.
--- .gitlab-ci.d/check-units.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
.gitlab-ci.d/check-units.py +5 -3
@@ -30,7 +30,7 @@ def extract_build_units(cc_path): return build_units -def analyse_units(build_units): +def analyse_units(build_units, top_n): """ Analyse the build units and report stats and the top 10 rebuilds """
@@ -44,7 +44,7 @@ def analyse_units(build_units): reverse=True) print("Most rebuilt units:") - for unit, count in sorted_build_units[:20]: + for unit, count in sorted_build_units[:top_n]: print(f" {unit} built {count} times") print("Least rebuilt units:")
@@ -57,12 +57,14 @@ def analyse_units(build_units): description="analyse number of build units in compile_commands.json") parser.add_argument("cc_path", type=Path, default=None, help="Path to compile_commands.json") + parser.add_argument("-n", type=int, default=20, + help="Dump the top <n> entries") args = parser.parse_args() if path.isfile(args.cc_path) and access(args.cc_path, R_OK): units = extract_build_units(args.cc_path) - analyse_units(units) + analyse_units(units, args.n) exit(0) else: print(f"{args.cc_path} doesn't exist or isn't readable")
Signature · 1 line
2.47.2
Re: [PATCH 2/7] gitlab: add -n option to check_units
Quoted 32 lines · Alex Bennée
Mostly a developer aid for those who want to look at the full backlog of multiple build units.
Signed-off-by Alex Bennée <[email protected]>--- .gitlab-ci.d/check-units.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-).gitlab-ci.d/check-units.py +2
-2@@ -30,7 +30,7 @@ def extract_build_units(cc_path): return build_units -def analyse_units(build_units): +def analyse_units(build_units, top_n): """ Analyse the build units and report stats and the top 10 rebuilds """@@ -44,7 +44,7 @@ def analyse_units(build_units): reverse=True) print("Most rebuilt units:") - for unit, count in sorted_build_units[:20]: + for unit, count in sorted_build_units[:top_n]: print(f" {unit} built {count} times") print("Least rebuilt units:")
.gitlab-ci.d/check-units.py def analyse_units(build_units): · line 62
Quoted 6 lines
.gitlab-ci.d/check-units.py +2
-0@@ -57,12 +57,14 @@ def analyse_units(build_units): description="analyse number of build units in compile_commands.json") parser.add_argument("cc_path", type=Path, default=None, help="Path to compile_commands.json") + parser.add_argument("-n", type=int, default=20, + help="Dump the top <n> entries")
FYI this defaults to n=20 always, even if -n isn't given.
Either way LGTM:
Quoted 13 lines
.gitlab-ci.d/check-units.py +1
-2args = parser.parse_args() if path.isfile(args.cc_path) and access(args.cc_path, R_OK): units = extract_build_units(args.cc_path) - analyse_units(units) + analyse_units(units, args.n) exit(0) else: print(f"{args.cc_path} doesn't exist or isn't readable") --2.47.2
PATCH 3/7 contrib/plugins/execlog: Add tab to the separator search of insn_disas
In reply to Alex BennéeFrom: Yodel Eldar <[email protected]>
Currently, execlog searches for a space separator between the instruction mnemonic and operands, but some disassemblers, e.g. Alpha's, use a tab separator instead; this results in a null pointer being passed as the haystack in g_strstr during a subsequent register search, i.e. undefined behavior, because of a missing null check.
This patch adds tab to the separator search and a null check on the result.
Also, an affected pointer is changed to const.
Lastly, a break statement was added to immediately terminate the register search when a user-requested register is found in the current instruction as a trivial optimization, because searching for the remaining requested registers is unnecessary once one is found.
Message-ID: <[email protected]>
--- contrib/plugins/execlog.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
contrib/plugins/execlog.c +9 -6
@@ -232,12 +232,15 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb)*/ if (disas_assist && rmatches) { check_regs_next = false; -gchar *args =g_strstr_len (insn_disas,-1 ," " ); -for (int n =0 ; n < all_reg_names->len; n++) { -gchar *reg =g_ptr_array_index (all_reg_names, n); -if (g_strrstr (args, reg)) { - check_regs_next = true; - skip = false; +g_auto (GStrv) args =g_strsplit_set (insn_disas," \t" ,2 ); +if (args && args[1 ]) { +for (int n =0 ; n < all_reg_names->len; n++) { +const gchar *reg =g_ptr_array_index (all_reg_names, n); +if (g_strrstr (args[1 ], reg)) { + check_regs_next = true; + skip = false; +break ; + } } } }
Signature · 1 line
2.47.2
Re: [PATCH 3/7] contrib/plugins/execlog: Add tab to the separator search of insn_disas
Quoted 18 lines · Alex Bennée
From: Yodel Eldar <[email protected]>
Currently, execlog searches for a space separator between the instruction mnemonic and operands, but some disassemblers, e.g. Alpha's, use a tab separator instead; this results in a null pointer being passed as the haystack in
g_strstrduring a subsequent register search, i.e. undefined behavior, because of a missing null check.This patch adds tab to the separator search and a null check on the result.
Also, an affected pointer is changed to const.
Lastly, a break statement was added to immediately terminate the register search when a user-requested register is found in the current instruction as a trivial optimization, because searching for the remaining requested registers is unnecessary once one is found.
Quoted 7 lines
Suggested-by Alex Bennée <[email protected]>Signed-off-by Yodel Eldar <[email protected]>Message-ID: <[email protected]>
Signed-off-by Alex Bennée <[email protected]>--- contrib/plugins/execlog.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
PATCH 4/7 target/alpha: Add GDB XML feature file
In reply to Alex BennéeFrom: Yodel Eldar <[email protected]>
This patch adds the GDB XML feature file that describes Alpha's core registers.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2569
Message-ID: <[email protected]>
--- configs/targets/alpha-linux-user.mak | 1 + configs/targets/alpha-softmmu.mak | 1 + target/alpha/cpu.c | 1 + gdb-xml/alpha-core.xml | 136 +++++++++++++++++++++++++++ 4 files changed, 139 insertions(+) create mode 100644 gdb-xml/alpha-core.xml
configs/targets/alpha-linux-user.mak +1 -0
@@ -2,3 +2,4 @@ TARGET_ARCH=alpha TARGET_SYSTBL_ABI=common TARGET_SYSTBL=syscall.tbl TARGET_LONG_BITS=64 +TARGET_XML_FILES= gdb-xml/alpha-core.xml
configs/targets/alpha-softmmu.mak +1 -0
@@ -1,2 +1,3 @@ TARGET_ARCH=alpha TARGET_LONG_BITS=64 +TARGET_XML_FILES= gdb-xml/alpha-core.xml
target/alpha/cpu.c +1 -0
@@ -286,6 +286,7 @@ static void alpha_cpu_class_init(ObjectClass *oc, const void *data) cc->get_pc = alpha_cpu_get_pc; cc->gdb_read_register = alpha_cpu_gdb_read_register; cc->gdb_write_register = alpha_cpu_gdb_write_register; + cc->gdb_core_xml_file ="alpha-core.xml" ;#ifndef CONFIG_USER_ONLY dc->vmsd = &vmstate_alpha_cpu; cc->sysemu_ops = &alpha_sysemu_ops;
gdb-xml/alpha-core.xml new file +136 -0
136 lines not on this page · raw message
Signature · 1 line
2.47.2
PATCH 5/7 plugins: fix inclusion of user-mode APIs
In reply to Alex BennéeIn 903e870f24 (plugins/api: split out binary path/start/end/entry code) we didn't actually enable the building of the new plugin helper. However this was missed because only contrib plugins like drcov actually used the helpers.
With that fixed we discover we also need some more includes to be able to extract the relevant data from TaskState.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3014
--- linux-user/plugin-api.c | 1 + common-user/plugin-api.c.inc | 1 + linux-user/meson.build | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-)
linux-user/plugin-api.c +1 -0
@@ -12,4 +12,5 @@#include "qemu/osdep.h" #include "qemu.h" +#include "loader.h" #include "common-user/plugin-api.c.inc"
common-user/plugin-api.c.inc +1 -0
@@ -13,6 +13,7 @@ #include "qemu/osdep.h" #include "qemu/main-loop.h" #include "qemu/plugin.h" +#include "accel/tcg/vcpu-state.h" #include "qemu.h" /*
linux-user/meson.build +4 -1
@@ -27,7 +27,10 @@ linux_user_ss.add(libdw) linux_user_ss.add(when: 'TARGET_HAS_BFLT', if_true: files('flatload.c')) linux_user_ss.add(when: 'TARGET_I386', if_true: files('vm86.c')) linux_user_ss.add(when: 'CONFIG_ARM_COMPATIBLE_SEMIHOSTING', if_true: files('semihost.c')) -linux_user_ss.add(when: 'CONFIG_TCG_PLUGINS', if_true: files('plugin-api.c')) + +if get_option('plugins') + linux_user_ss.add(files('plugin-api.c')) +endif syscall_nr_generators = {}
Signature · 1 line
2.47.2
Re: [PATCH 5/7] plugins: fix inclusion of user-mode APIs
Quoted 8 lines · Alex Bennée
In
903e870f24(plugins/api: split out binary path/start/end/entry code) we didn't actually enable the building of the new plugin helper. However this was missed because only contrib plugins like drcov actually used the helpers.With that fixed we discover we also need some more includes to be able to extract the relevant data from TaskState.
Quoted 8 lines
Fixes 903e870f24 (plugins/api: split out binary path/start/end/entry code)Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3014
Signed-off-by Alex Bennée <[email protected]>--- linux-user/plugin-api.c | 1 + common-user/plugin-api.c.inc | 1 + linux-user/meson.build | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-)
PATCH 6/7 docs: use :kbd: role in sphinx docs
In reply to Alex BennéeFrom: Manos Pitsidianakis <[email protected]>
Sphinx supports the :kbd: role for notating keyboard input. They get formatted as <kbd> HTML elements in the readthedocs theme we currently use for Sphinx.
Besides the better visual formatting, it also helps with accessibility as screen readers can announce the semantics of the <kbd> element to the user.
Message-ID: <[email protected]>
--- docs/devel/testing/main.rst | 4 +-- docs/system/images.rst | 2 +- docs/system/keys.rst.inc | 49 +++++++++++++++++---------------- docs/system/linuxboot.rst | 2 +- docs/system/mux-chardev.rst.inc | 38 ++++++++++++++----------- 5 files changed, 51 insertions(+), 44 deletions(-)
docs/devel/testing/main.rst +2 -2
@@ -604,9 +604,9 @@ below steps to debug it: 2. Add "V=1" to the command line, try again, to see the verbose output. 3. Further add "DEBUG=1" to the command line. This will pause in a shell prompt in the container right before testing starts. You could either manually - build QEMU and run tests from there, or press Ctrl-D to let the Docker + build QEMU and run tests from there, or press :kbd:`Ctrl+d` to let the Docker testing continue. -4. If you press Ctrl-D, the same building and testing procedure will begin, and +4. If you press :kbd:`Ctrl+d`, the same building and testing procedure will begin, and will hopefully run into the error again. After that, you will be dropped to the prompt for debug.
docs/system/images.rst +1 -1
@@ -30,7 +30,7 @@ Snapshot mode If you use the option ``-snapshot``, all disk images are considered as read only. When sectors in written, they are written in a temporary file created in ``/tmp``. You can however force the write back to the raw -disk images by using the ``commit`` monitor command (or C-a s in the +disk images by using the ``commit`` monitor command (or :kbd:`Ctrl+a s` in the serial console). .. _vm_005fsnapshots:
docs/system/keys.rst.inc +25 -24
61 lines not on this page · raw message
docs/system/linuxboot.rst +1 -1
@@ -26,5 +26,5 @@ virtual serial port and the QEMU monitor to the console with the |qemu_system| -kernel bzImage -drive file=rootdisk.img,format=raw \ -append "root=/dev/sda console=ttyS0" -nographic -Use Ctrl-a c to switch between the serial console and the monitor (see +Use :kbd:`Ctrl+a c` to switch between the serial console and the monitor (see :ref:`GUI_keys`).
docs/system/mux-chardev.rst.inc +22 -16
@@ -1,27 +1,33 @@ During emulation, if you are using a character backend multiplexer (which is the default if you are using ``-nographic``) then several commands are available via an escape sequence. These key sequences all -start with an escape character, which is Ctrl-a by default, but can be +start with an escape character, which is :kbd:`Ctrl+a` by default, but can be changed with ``-echr``. The list below assumes you're using the default. -Ctrl-a h - Print this help +.. list-table:: Multiplexer Keys + :widths: 20 80 + :header-rows: 1 -Ctrl-a x - Exit emulator + * - Key Sequence + - Action -Ctrl-a s - Save disk data back to file (if -snapshot) + * - :kbd:`Ctrl+a h` + - Print this help -Ctrl-a t - Toggle console timestamps + * - :kbd:`Ctrl+a x` + - Exit emulator -Ctrl-a b - Send break (magic sysrq in Linux) + * - :kbd:`Ctrl+a s` + - Save disk data back to file (if -snapshot) -Ctrl-a c - Rotate between the frontends connected to the multiplexer (usually - this switches between the monitor and the console) + * - :kbd:`Ctrl+a t` + - Toggle console timestamps -Ctrl-a Ctrl-a - Send the escape character to the frontend + * - :kbd:`Ctrl+a b` + - Send break (magic sysrq in Linux) + + * - :kbd:`Ctrl+a c` + - Rotate between the frontends connected to the multiplexer (usually this switches between the monitor and the console) + + * - :kbd:`Ctrl+a Ctrl+a` + - Send the escape character to the frontend
Signature · 1 line
2.47.2
PATCH 7/7 docs/system: clean-up formatting of virtio-net-failover
In reply to Alex BennéeWe didn't clean-up the rst formatting when we moved this into the docs so lets do that now:
- un-indent the usage/hotplug/migration paragraphs
- properly wrap the command line fragments in code-block
- highlight parameters in text with ``double quotes``
No changes to the actual text.
--- docs/system/virtio-net-failover.rst | 51 ++++++++++++++++------------- 1 file changed, 28 insertions(+), 23 deletions(-)
docs/system/virtio-net-failover.rst +28 -23
@@ -26,43 +26,48 @@ and standby devices are not plugged into the same PCIe slot. Usecase ------- - Virtio-net standby allows easy migration while using a passed-through fast - networking device by falling back to a virtio-net device for the duration of - the migration. It is like a simple version of a bond, the difference is that it - requires no configuration in the guest. When a guest is live-migrated to - another host QEMU will unplug the primary device via the PCIe based hotplug - handler and traffic will go through the virtio-net device. On the target - system the primary device will be automatically plugged back and the - net_failover module registers it again as the primary device. +Virtio-net standby allows easy migration while using a passed-through +fast networking device by falling back to a virtio-net device for the +duration of the migration. It is like a simple version of a bond, the +difference is that it requires no configuration in the guest. When a +guest is live-migrated to another host QEMU will unplug the primary +device via the PCIe based hotplug handler and traffic will go through +the virtio-net device. On the target system the primary device will be +automatically plugged back and the net_failover module registers it +again as the primary device. Usage ----- - The primary device can be hotplugged or be part of the startup configuration +The primary device can be hotplugged or be part of the startup configuration - -device virtio-net-pci,netdev=hostnet1,id=net1,mac=52:54:00:6f:55:cc, \ - bus=root2,failover=on +.. code-block:: shell - With the parameter failover=on the VIRTIO_NET_F_STANDBY feature will be enabled. + -device virtio-net-pci,netdev=hostnet1,id=net1,mac=52:54:00:6f:55:cc,bus=root2,failover=on + +With the parameter ``failover=on`` the VIRTIO_NET_F_STANDBY feature will be enabled. + +.. code-block:: shell -device vfio-pci,host=5e:00.2,id=hostdev0,bus=root1,failover_pair_id=net1 - failover_pair_id references the id of the virtio-net standby device. This - is only for pairing the devices within QEMU. The guest kernel module - net_failover will match devices with identical MAC addresses. +``failover_pair_id`` references the id of the virtio-net standby device. +This is only for pairing the devices within QEMU. The guest kernel +module net_failover will match devices with identical MAC addresses. Hotplug ------- - Both primary and standby device can be hotplugged via the QEMU monitor. Note - that if the virtio-net device is plugged first a warning will be issued that it - couldn't find the primary device. +Both primary and standby device can be hotplugged via the QEMU +monitor. Note that if the virtio-net device is plugged first a warning +will be issued that it couldn't find the primary device. Migration --------- - A new migration state wait-unplug was added for this feature. If failover primary - devices are present in the configuration, migration will go into this state. - It will wait until the device unplug is completed in the guest and then move into - active state. On the target system the primary devices will be automatically hotplugged - when the feature bit was negotiated for the virtio-net standby device. +A new migration state wait-unplug was added for this feature. If +failover primary devices are present in the configuration, migration +will go into this state. It will wait until the device unplug is +completed in the guest and then move into active state. On the target +system the primary devices will be automatically hotplugged when the +feature bit was negotiated for the virtio-net standby device.
Signature · 1 line
2.47.2
Re: [PATCH 7/7] docs/system: clean-up formatting of virtio-net-failover
Quoted 92 lines · Alex Bennée
We didn't clean-up the rst formatting when we moved this into the docs so lets do that now:
- un-indent the usage/hotplug/migration paragraphs
- properly wrap the command line fragments in code-block
- highlight parameters in text with ``double quotes``No changes to the actual text.
Signed-off-by Alex Bennée <[email protected]>--- docs/system/virtio-net-failover.rst | 51 ++++++++++++++++------------- 1 file changed, 28 insertions(+), 23 deletions(-)docs/system/virtio-net-failover.rst +28
-24@@ -26,43 +26,48 @@ and standby devices are not plugged into the same PCIe slot. Usecase ------- - Virtio-net standby allows easy migration while using a passed-through fast - networking device by falling back to a virtio-net device for the duration of - the migration. It is like a simple version of a bond, the difference is that it - requires no configuration in the guest. When a guest is live-migrated to - another host QEMU will unplug the primary device via the PCIe based hotplug - handler and traffic will go through the virtio-net device. On the target - system the primary device will be automatically plugged back and the - net_failover module registers it again as the primary device. +Virtio-net standby allows easy migration while using a passed-through +fast networking device by falling back to a virtio-net device for the +duration of the migration. It is like a simple version of a bond, the +difference is that it requires no configuration in the guest. When a +guest is live-migrated to another host QEMU will unplug the primary +device via the PCIe based hotplug handler and traffic will go through +the virtio-net device. On the target system the primary device will be +automatically plugged back and the net_failover module registers it +again as the primary device. Usage ----- - The primary device can be hotplugged or be part of the startup configuration +The primary device can be hotplugged or be part of the startup configuration - -device virtio-net-pci,netdev=hostnet1,id=net1,mac=52:54:00:6f:55:cc, \ - bus=root2,failover=on +.. code-block:: shell - With the parameter failover=on the VIRTIO_NET_F_STANDBY feature will be enabled. + -device virtio-net-pci,netdev=hostnet1,id=net1,mac=52:54:00:6f:55:cc,bus=root2,failover=on + +With the parameter ``failover=on`` the VIRTIO_NET_F_STANDBY feature will be enabled. + +.. code-block:: shell -device vfio-pci,host=5e:00.2,id=hostdev0,bus=root1,failover_pair_id=net1 - failover_pair_id references the id of the virtio-net standby device. This - is only for pairing the devices within QEMU. The guest kernel module - net_failover will match devices with identical MAC addresses. +``failover_pair_id`` references the id of the virtio-net standby device. +This is only for pairing the devices within QEMU. The guest kernel +module net_failover will match devices with identical MAC addresses. Hotplug ------- - Both primary and standby device can be hotplugged via the QEMU monitor. Note - that if the virtio-net device is plugged first a warning will be issued that it - couldn't find the primary device. +Both primary and standby device can be hotplugged via the QEMU +monitor. Note that if the virtio-net device is plugged first a warning +will be issued that it couldn't find the primary device. Migration --------- - A new migration state wait-unplug was added for this feature. If failover primary - devices are present in the configuration, migration will go into this state. - It will wait until the device unplug is completed in the guest and then move into - active state. On the target system the primary devices will be automatically hotplugged - when the feature bit was negotiated for the virtio-net standby device. +A new migration state wait-unplug was added for this feature. If +failover primary devices are present in the configuration, migration +will go into this state. It will wait until the device unplug is +completed in the guest and then move into active state. On the target +system the primary devices will be automatically hotplugged when the +feature bit was negotiated for the virtio-net standby device. --
Quoted 3 lines
2.47.2