<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il mer 27 mar 2024, 11:56 Philippe Mathieu-Daudé <<a href="mailto:philmd@linaro.org">philmd@linaro.org</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The whole RDMA subsystem was deprecated in commit e9a54265f5<br>
("hw/rdma: Deprecate the pvrdma device and the rdma subsystem")<br>
released in v8.2. Time to remove it.<br>
<br>
Keep the RAM_SAVE_FLAG_HOOK definition since it might appears<br>
in old migration streams.<br>
<br>
Remove the dependencies on libibumad and libibverbs.<br>
<br>
Remove the generated vmw_pvrdma/ directory from linux-headers.<br>
<br>
Remove RDMA handling from migration.<br>
<br>
Remove RDMA handling in GlusterFS block driver.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I don't think these two were deprecated? They are unrelated to pvrdma.</div><div dir="auto"><br></div><div dir="auto">Paolo</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Remove rdmacm-mux tool from contrib/.<br>
<br>
Remove PVRDMA device.<br>
<br>
Cc: Peter Xu <<a href="mailto:peterx@redhat.com" target="_blank" rel="noreferrer">peterx@redhat.com</a>><br>
Cc: Li Zhijian <<a href="mailto:lizhijian@fujitsu.com" target="_blank" rel="noreferrer">lizhijian@fujitsu.com</a>><br>
Cc: Yuval Shaia <<a href="mailto:yuval.shaia.ml@gmail.com" target="_blank" rel="noreferrer">yuval.shaia.ml@gmail.com</a>><br>
Cc: Marcel Apfelbaum <<a href="mailto:marcel.apfelbaum@gmail.com" target="_blank" rel="noreferrer">marcel.apfelbaum@gmail.com</a>><br>
Signed-off-by: Philippe Mathieu-Daudé <<a href="mailto:philmd@linaro.org" target="_blank" rel="noreferrer">philmd@linaro.org</a>><br>
---<br>
MAINTAINERS | 17 -<br>
docs/about/deprecated.rst | 9 -<br>
docs/about/removed-features.rst | 4 +<br>
docs/devel/migration/main.rst | 6 -<br>
docs/pvrdma.txt | 345 --<br>
docs/rdma.txt | 420 --<br>
docs/system/device-url-syntax.rst.inc | 4 +-<br>
docs/system/loongarch/virt.rst | 2 +-<br>
docs/system/qemu-block-drivers.rst.inc | 1 -<br>
meson.build | 59 -<br>
qapi/machine.json | 17 -<br>
qapi/migration.json | 31 +-<br>
qapi/qapi-schema.json | 1 -<br>
qapi/rdma.json | 38 -<br>
contrib/rdmacm-mux/rdmacm-mux.h | 61 -<br>
hw/rdma/rdma_backend.h | 129 -<br>
hw/rdma/rdma_backend_defs.h | 76 -<br>
hw/rdma/rdma_rm.h | 97 -<br>
hw/rdma/rdma_rm_defs.h | 146 -<br>
hw/rdma/rdma_utils.h | 63 -<br>
hw/rdma/trace.h | 1 -<br>
hw/rdma/vmw/pvrdma.h | 144 -<br>
hw/rdma/vmw/pvrdma_dev_ring.h | 46 -<br>
hw/rdma/vmw/pvrdma_qp_ops.h | 28 -<br>
hw/rdma/vmw/trace.h | 1 -<br>
include/hw/rdma/rdma.h | 37 -<br>
include/monitor/hmp.h | 1 -<br>
.../infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h | 685 ---<br>
.../infiniband/hw/vmw_pvrdma/pvrdma_verbs.h | 348 --<br>
.../standard-headers/rdma/vmw_pvrdma-abi.h | 310 --<br>
migration/migration-stats.h | 6 +-<br>
migration/migration.h | 9 -<br>
migration/options.h | 2 -<br>
migration/rdma.h | 69 -<br>
block/gluster.c | 39 -<br>
contrib/rdmacm-mux/main.c | 831 ----<br>
hw/core/machine-qmp-cmds.c | 32 -<br>
hw/rdma/rdma.c | 30 -<br>
hw/rdma/rdma_backend.c | 1401 ------<br>
hw/rdma/rdma_rm.c | 812 ----<br>
hw/rdma/rdma_utils.c | 126 -<br>
hw/rdma/vmw/pvrdma_cmd.c | 815 ----<br>
hw/rdma/vmw/pvrdma_dev_ring.c | 141 -<br>
hw/rdma/vmw/pvrdma_main.c | 735 ---<br>
hw/rdma/vmw/pvrdma_qp_ops.c | 298 --<br>
migration/migration-stats.c | 5 +-<br>
migration/migration.c | 31 -<br>
migration/options.c | 16 -<br>
migration/qemu-file.c | 1 -<br>
migration/ram.c | 86 +-<br>
migration/rdma.c | 4184 -----------------<br>
migration/savevm.c | 2 +-<br>
monitor/qmp-cmds.c | 1 -<br>
Kconfig.host | 3 -<br>
contrib/rdmacm-mux/meson.build | 7 -<br>
hmp-commands-info.hx | 13 -<br>
hw/Kconfig | 1 -<br>
hw/meson.build | 1 -<br>
hw/rdma/Kconfig | 3 -<br>
hw/rdma/meson.build | 12 -<br>
hw/rdma/trace-events | 31 -<br>
hw/rdma/vmw/trace-events | 17 -<br>
meson_options.txt | 4 -<br>
migration/meson.build | 1 -<br>
migration/trace-events | 68 +-<br>
qapi/meson.build | 1 -<br>
qemu-options.hx | 6 -<br>
.../ci/org.centos/stream/8/x86_64/configure | 1 -<br>
scripts/ci/setup/build-environment.yml | 2 -<br>
scripts/coverity-scan/run-coverity-scan | 2 +-<br>
scripts/meson-buildoptions.sh | 6 -<br>
scripts/update-linux-headers.sh | 27 -<br>
tests/lcitool/projects/qemu.yml | 2 -<br>
tests/migration/guestperf/engine.py | 4 +-<br>
74 files changed, 20 insertions(+), 12991 deletions(-)<br>
delete mode 100644 docs/pvrdma.txt<br>
delete mode 100644 docs/rdma.txt<br>
delete mode 100644 qapi/rdma.json<br>
delete mode 100644 contrib/rdmacm-mux/rdmacm-mux.h<br>
delete mode 100644 hw/rdma/rdma_backend.h<br>
delete mode 100644 hw/rdma/rdma_backend_defs.h<br>
delete mode 100644 hw/rdma/rdma_rm.h<br>
delete mode 100644 hw/rdma/rdma_rm_defs.h<br>
delete mode 100644 hw/rdma/rdma_utils.h<br>
delete mode 100644 hw/rdma/trace.h<br>
delete mode 100644 hw/rdma/vmw/pvrdma.h<br>
delete mode 100644 hw/rdma/vmw/pvrdma_dev_ring.h<br>
delete mode 100644 hw/rdma/vmw/pvrdma_qp_ops.h<br>
delete mode 100644 hw/rdma/vmw/trace.h<br>
delete mode 100644 include/hw/rdma/rdma.h<br>
delete mode 100644 include/standard-headers/drivers/infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h<br>
delete mode 100644 include/standard-headers/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.h<br>
delete mode 100644 include/standard-headers/rdma/vmw_pvrdma-abi.h<br>
delete mode 100644 migration/rdma.h<br>
delete mode 100644 contrib/rdmacm-mux/main.c<br>
delete mode 100644 hw/rdma/rdma.c<br>
delete mode 100644 hw/rdma/rdma_backend.c<br>
delete mode 100644 hw/rdma/rdma_rm.c<br>
delete mode 100644 hw/rdma/rdma_utils.c<br>
delete mode 100644 hw/rdma/vmw/pvrdma_cmd.c<br>
delete mode 100644 hw/rdma/vmw/pvrdma_dev_ring.c<br>
delete mode 100644 hw/rdma/vmw/pvrdma_main.c<br>
delete mode 100644 hw/rdma/vmw/pvrdma_qp_ops.c<br>
delete mode 100644 migration/rdma.c<br>
delete mode 100644 contrib/rdmacm-mux/meson.build<br>
delete mode 100644 hw/rdma/Kconfig<br>
delete mode 100644 hw/rdma/meson.build<br>
delete mode 100644 hw/rdma/trace-events<br>
delete mode 100644 hw/rdma/vmw/trace-events<br>
<br>
diff --git a/MAINTAINERS b/MAINTAINERS<br>
index a07af6b9d4..05226cea0a 100644<br>
--- a/MAINTAINERS<br>
+++ b/MAINTAINERS<br>
@@ -3426,13 +3426,6 @@ F: docs/devel/migration.rst<br>
F: qapi/migration.json<br>
F: tests/migration/<br>
F: util/userfaultfd.c<br>
-X: migration/rdma*<br>
-<br>
-RDMA Migration<br>
-R: Li Zhijian <<a href="mailto:lizhijian@fujitsu.com" target="_blank" rel="noreferrer">lizhijian@fujitsu.com</a>><br>
-R: Peter Xu <<a href="mailto:peterx@redhat.com" target="_blank" rel="noreferrer">peterx@redhat.com</a>><br>
-S: Odd Fixes<br>
-F: migration/rdma*<br>
<br>
Migration dirty limit and dirty page rate<br>
M: Hyman Huang <<a href="mailto:yong.huang@smartx.com" target="_blank" rel="noreferrer">yong.huang@smartx.com</a>><br>
@@ -4060,16 +4053,6 @@ F: block/replication.c<br>
F: tests/unit/test-replication.c<br>
F: docs/block-replication.txt<br>
<br>
-PVRDMA<br>
-M: Yuval Shaia <<a href="mailto:yuval.shaia.ml@gmail.com" target="_blank" rel="noreferrer">yuval.shaia.ml@gmail.com</a>><br>
-M: Marcel Apfelbaum <<a href="mailto:marcel.apfelbaum@gmail.com" target="_blank" rel="noreferrer">marcel.apfelbaum@gmail.com</a>><br>
-S: Odd Fixes<br>
-F: hw/rdma/*<br>
-F: hw/rdma/vmw/*<br>
-F: docs/pvrdma.txt<br>
-F: contrib/rdmacm-mux/*<br>
-F: qapi/rdma.json<br>
-<br>
Semihosting<br>
M: Alex Bennée <<a href="mailto:alex.bennee@linaro.org" target="_blank" rel="noreferrer">alex.bennee@linaro.org</a>><br>
S: Maintained<br>
diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst<br>
index 7b548519b5..29eae69e50 100644<br>
--- a/docs/about/deprecated.rst<br>
+++ b/docs/about/deprecated.rst<br>
@@ -376,15 +376,6 @@ recommending to switch to their stable counterparts:<br>
- "Zve64f" should be replaced with "zve64f"<br>
- "Zve64d" should be replaced with "zve64d"<br>
<br>
-``-device pvrdma`` and the rdma subsystem (since 8.2)<br>
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<br>
-<br>
-The pvrdma device and the whole rdma subsystem are in a bad shape and<br>
-without active maintenance. The QEMU project intends to remove this<br>
-device and subsystem from the code base in a future release without<br>
-replacement unless somebody steps up and improves the situation.<br>
-<br>
-<br>
Block device options<br>
''''''''''''''''''''<br>
<br>
diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst<br>
index f9cf874f7b..4d5bdc43b4 100644<br>
--- a/docs/about/removed-features.rst<br>
+++ b/docs/about/removed-features.rst<br>
@@ -909,6 +909,10 @@ contains native support for this feature and thus use of the option<br>
ROM approach was obsolete. The native SeaBIOS support can be activated<br>
by using ``-machine graphics=off``.<br>
<br>
+``pvrdma`` and the RDMA subsystem (removed in 9.1)<br>
+''''''''''''''''''''''''''''''''''''''''''''''''''<br>
+<br>
+The 'pvrdma' device and the whole RDMA subsystem have been removed.<br>
<br>
Related binaries<br>
----------------<br>
diff --git a/docs/devel/migration/main.rst b/docs/devel/migration/main.rst<br>
index 54385a23e5..70278ce1e3 100644<br>
--- a/docs/devel/migration/main.rst<br>
+++ b/docs/devel/migration/main.rst<br>
@@ -47,12 +47,6 @@ over any transport.<br>
QEMU interference. Note that QEMU does not flush cached file<br>
data/metadata at the end of migration.<br>
<br>
-In addition, support is included for migration using RDMA, which<br>
-transports the page data using ``RDMA``, where the hardware takes care of<br>
-transporting the pages, and the load on the CPU is much lower. While the<br>
-internals of RDMA migration are a bit different, this isn't really visible<br>
-outside the RAM migration code.<br>
-<br>
All these migration protocols use the same infrastructure to<br>
save/restore state devices. This infrastructure is shared with the<br>
savevm/loadvm functionality.<br>
diff --git a/docs/pvrdma.txt b/docs/pvrdma.txt<br>
deleted file mode 100644<br>
index 5c122fe818..0000000000<br>
--- a/docs/pvrdma.txt<br>
+++ /dev/null<br>
@@ -1,345 +0,0 @@<br>
-Paravirtualized RDMA Device (PVRDMA)<br>
-====================================<br>
-<br>
-<br>
-1. Description<br>
-===============<br>
-PVRDMA is the QEMU implementation of VMware's paravirtualized RDMA device.<br>
-It works with its Linux Kernel driver AS IS, no need for any special guest<br>
-modifications.<br>
-<br>
-While it complies with the VMware device, it can also communicate with bare<br>
-metal RDMA-enabled machines as peers.<br>
-<br>
-It does not require an RDMA HCA in the host, it can work with Soft-RoCE (rxe).<br>
-<br>
-It does not require the whole guest RAM to be pinned allowing memory<br>
-over-commit and, even if not implemented yet, migration support will be<br>
-possible with some HW assistance.<br>
-<br>
-A project presentation accompany this document:<br>
-- <a href="https://blog.linuxplumbersconf.org/2017/ocw/system/presentations/4730/original/lpc-2017-pvrdma-marcel-apfelbaum-yuval-shaia.pdf" rel="noreferrer noreferrer" target="_blank">https://blog.linuxplumbersconf.org/2017/ocw/system/presentations/4730/original/lpc-2017-pvrdma-marcel-apfelbaum-yuval-shaia.pdf</a><br>
-<br>
-<br>
-<br>
-2. Setup<br>
-========<br>
-<br>
-<br>
-2.1 Guest setup<br>
-===============<br>
-Fedora 27+ kernels work out of the box, older distributions<br>
-require updating the kernel to 4.14 to include the pvrdma driver.<br>
-<br>
-However the libpvrdma library needed by User Level Software is still<br>
-not available as part of the distributions, so the rdma-core library<br>
-needs to be compiled and optionally installed.<br>
-<br>
-Please follow the instructions at:<br>
- <a href="https://github.com/linux-rdma/rdma-core.git" rel="noreferrer noreferrer" target="_blank">https://github.com/linux-rdma/rdma-core.git</a><br>
-<br>
-<br>
-2.2 Host Setup<br>
-==============<br>
-The pvrdma backend is an ibdevice interface that can be exposed<br>
-either by a Soft-RoCE(rxe) device on machines with no RDMA device,<br>
-or an HCA SRIOV function(VF/PF).<br>
-Note that ibdevice interfaces can't be shared between pvrdma devices,<br>
-each one requiring a separate instance (rxe or SRIOV VF).<br>
-<br>
-<br>
-2.2.1 Soft-RoCE backend(rxe)<br>
-===========================<br>
-A stable version of rxe is required, Fedora 27+ or a Linux<br>
-Kernel 4.14+ is preferred.<br>
-<br>
-The rdma_rxe module is part of the Linux Kernel but not loaded by default.<br>
-Install the User Level library (librxe) following the instructions from:<br>
-<a href="https://github.com/SoftRoCE/rxe-dev/wiki/rxe-dev:-Home" rel="noreferrer noreferrer" target="_blank">https://github.com/SoftRoCE/rxe-dev/wiki/rxe-dev:-Home</a><br>
-<br>
-Associate an ETH interface with rxe by running:<br>
- rxe_cfg add eth0<br>
-An rxe0 ibdevice interface will be created and can be used as pvrdma backend.<br>
-<br>
-<br>
-2.2.2 RDMA device Virtual Function backend<br>
-==========================================<br>
-Nothing special is required, the pvrdma device can work not only with<br>
-Ethernet Links, but also Infinibands Links.<br>
-All is needed is an ibdevice with an active port, for Mellanox cards<br>
-will be something like mlx5_6 which can be the backend.<br>
-<br>
-<br>
-2.2.3 QEMU setup<br>
-================<br>
-Configure QEMU with --enable-rdma flag, installing<br>
-the required RDMA libraries.<br>
-<br>
-<br>
-<br>
-3. Usage<br>
-========<br>
-<br>
-<br>
-3.1 VM Memory settings<br>
-======================<br>
-Currently the device is working only with memory backed RAM<br>
-and it must be mark as "shared":<br>
- -m 1G \<br>
- -object memory-backend-ram,id=mb1,size=1G,share \<br>
- -numa node,memdev=mb1 \<br>
-<br>
-<br>
-3.2 MAD Multiplexer<br>
-===================<br>
-MAD Multiplexer is a service that exposes MAD-like interface for VMs in<br>
-order to overcome the limitation where only single entity can register with<br>
-MAD layer to send and receive RDMA-CM MAD packets.<br>
-<br>
-To build rdmacm-mux run<br>
-# make rdmacm-mux<br>
-<br>
-Before running the rdmacm-mux make sure that both ib_cm and rdma_cm kernel<br>
-modules aren't loaded, otherwise the rdmacm-mux service will fail to start.<br>
-<br>
-The application accepts 3 command line arguments and exposes a UNIX socket<br>
-to pass control and data to it.<br>
--d rdma-device-name Name of RDMA device to register with<br>
--s unix-socket-path Path to unix socket to listen (default /var/run/rdmacm-mux)<br>
--p rdma-device-port Port number of RDMA device to register with (default 1)<br>
-The final UNIX socket file name is a concatenation of the 3 arguments so<br>
-for example for device mlx5_0 on port 2 this /var/run/rdmacm-mux-mlx5_0-2<br>
-will be created.<br>
-<br>
-pvrdma requires this service.<br>
-<br>
-Please refer to contrib/rdmacm-mux for more details.<br>
-<br>
-<br>
-3.3 Service exposed by libvirt daemon<br>
-=====================================<br>
-The control over the RDMA device's GID table is done by updating the<br>
-device's Ethernet function addresses.<br>
-Usually the first GID entry is determined by the MAC address, the second by<br>
-the first IPv6 address and the third by the IPv4 address. Other entries can<br>
-be added by adding more IP addresses. The opposite is the same, i.e.<br>
-whenever an address is removed, the corresponding GID entry is removed.<br>
-The process is done by the network and RDMA stacks. Whenever an address is<br>
-added the ib_core driver is notified and calls the device driver add_gid<br>
-function which in turn update the device.<br>
-To support this in pvrdma device the device hooks into the create_bind and<br>
-destroy_bind HW commands triggered by pvrdma driver in guest.<br>
-<br>
-Whenever changed is made to the pvrdma port's GID table a special QMP<br>
-messages is sent to be processed by libvirt to update the address of the<br>
-backend Ethernet device.<br>
-<br>
-pvrdma requires that libvirt service will be up.<br>
-<br>
-<br>
-3.4 PCI devices settings<br>
-========================<br>
-RoCE device exposes two functions - an Ethernet and RDMA.<br>
-To support it, pvrdma device is composed of two PCI functions, an Ethernet<br>
-device of type vmxnet3 on PCI slot 0 and a PVRDMA device on PCI slot 1. The<br>
-Ethernet function can be used for other Ethernet purposes such as IP.<br>
-<br>
-<br>
-3.5 Device parameters<br>
-=====================<br>
-- netdev: Specifies the Ethernet device function name on the host for<br>
- example enp175s0f0. For Soft-RoCE device (rxe) this would be the Ethernet<br>
- device used to create it.<br>
-- ibdev: The IB device name on host for example rxe0, mlx5_0 etc.<br>
-- mad-chardev: The name of the MAD multiplexer char device.<br>
-- ibport: In case of multi-port device (such as Mellanox's HCA) this<br>
- specify the port to use. If not set 1 will be used.<br>
-- dev-caps-max-mr-size: The maximum size of MR.<br>
-- dev-caps-max-qp: Maximum number of QPs.<br>
-- dev-caps-max-cq: Maximum number of CQs.<br>
-- dev-caps-max-mr: Maximum number of MRs.<br>
-- dev-caps-max-pd: Maximum number of PDs.<br>
-- dev-caps-max-ah: Maximum number of AHs.<br>
-<br>
-Notes:<br>
-- The first 3 parameters are mandatory settings, the rest have their<br>
- defaults.<br>
-- The last 8 parameters (the ones that prefixed by dev-caps) defines the top<br>
- limits but the final values is adjusted by the backend device limitations.<br>
-- netdev can be extracted from ibdev's sysfs<br>
- (/sys/class/infiniband/<ibdev>/device/net/)<br>
-<br>
-<br>
-3.6 Example<br>
-===========<br>
-Define bridge device with vmxnet3 network backend:<br>
-<interface type='bridge'><br>
- <mac address='56:b4:44:e9:62:dc'/><br>
- <source bridge='bridge1'/><br>
- <model type='vmxnet3'/><br>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x10' function='0x0' multifunction='on'/><br>
-</interface><br>
-<br>
-Define pvrdma device:<br>
-<qemu:commandline><br>
- <qemu:arg value='-object'/><br>
- <qemu:arg value='memory-backend-ram,id=mb1,size=1G,share'/><br>
- <qemu:arg value='-numa'/><br>
- <qemu:arg value='node,memdev=mb1'/><br>
- <qemu:arg value='-chardev'/><br>
- <qemu:arg value='socket,path=/var/run/rdmacm-mux-rxe0-1,id=mads'/><br>
- <qemu:arg value='-device'/><br>
- <qemu:arg value='pvrdma,addr=10.1,ibdev=rxe0,netdev=bridge0,mad-chardev=mads'/><br>
-</qemu:commandline><br>
-<br>
-<br>
-<br>
-4. Implementation details<br>
-=========================<br>
-<br>
-<br>
-4.1 Overview<br>
-============<br>
-The device acts like a proxy between the Guest Driver and the host<br>
-ibdevice interface.<br>
-On configuration path:<br>
- - For every hardware resource request (PD/QP/CQ/...) the pvrdma will request<br>
- a resource from the backend interface, maintaining a 1-1 mapping<br>
- between the guest and host.<br>
-On data path:<br>
- - Every post_send/receive received from the guest will be converted into<br>
- a post_send/receive for the backend. The buffers data will not be touched<br>
- or copied resulting in near bare-metal performance for large enough buffers.<br>
- - Completions from the backend interface will result in completions for<br>
- the pvrdma device.<br>
-<br>
-<br>
-4.2 PCI BARs<br>
-============<br>
-PCI Bars:<br>
- BAR 0 - MSI-X<br>
- MSI-X vectors:<br>
- (0) Command - used when execution of a command is completed.<br>
- (1) Async - not in use.<br>
- (2) Completion - used when a completion event is placed in<br>
- device's CQ ring.<br>
- BAR 1 - Registers<br>
- --------------------------------------------------------<br>
- | VERSION | DSR | CTL | REQ | ERR | ICR | IMR | MAC |<br>
- --------------------------------------------------------<br>
- DSR - Address of driver/device shared memory used<br>
- for the command channel, used for passing:<br>
- - General info such as driver version<br>
- - Address of 'command' and 'response'<br>
- - Address of async ring<br>
- - Address of device's CQ ring<br>
- - Device capabilities<br>
- CTL - Device control operations (activate, reset etc)<br>
- IMG - Set interrupt mask<br>
- REQ - Command execution register<br>
- ERR - Operation status<br>
-<br>
- BAR 2 - UAR<br>
- ---------------------------------------------------------<br>
- | QP_NUM | SEND/RECV Flag || CQ_NUM | ARM/POLL Flag |<br>
- ---------------------------------------------------------<br>
- - Offset 0 used for QP operations (send and recv)<br>
- - Offset 4 used for CQ operations (arm and poll)<br>
-<br>
-<br>
-4.3 Major flows<br>
-===============<br>
-<br>
-4.3.1 Create CQ<br>
-===============<br>
- - Guest driver<br>
- - Allocates pages for CQ ring<br>
- - Creates page directory (pdir) to hold CQ ring's pages<br>
- - Initializes CQ ring<br>
- - Initializes 'Create CQ' command object (cqe, pdir etc)<br>
- - Copies the command to 'command' address<br>
- - Writes 0 into REQ register<br>
- - Device<br>
- - Reads the request object from the 'command' address<br>
- - Allocates CQ object and initialize CQ ring based on pdir<br>
- - Creates the backend CQ<br>
- - Writes operation status to ERR register<br>
- - Posts command-interrupt to guest<br>
- - Guest driver<br>
- - Reads the HW response code from ERR register<br>
-<br>
-4.3.2 Create QP<br>
-===============<br>
- - Guest driver<br>
- - Allocates pages for send and receive rings<br>
- - Creates page directory(pdir) to hold the ring's pages<br>
- - Initializes 'Create QP' command object (max_send_wr,<br>
- send_cq_handle, recv_cq_handle, pdir etc)<br>
- - Copies the object to 'command' address<br>
- - Write 0 into REQ register<br>
- - Device<br>
- - Reads the request object from 'command' address<br>
- - Allocates the QP object and initialize<br>
- - Send and recv rings based on pdir<br>
- - Send and recv ring state<br>
- - Creates the backend QP<br>
- - Writes the operation status to ERR register<br>
- - Posts command-interrupt to guest<br>
- - Guest driver<br>
- - Reads the HW response code from ERR register<br>
-<br>
-4.3.3 Post receive<br>
-==================<br>
- - Guest driver<br>
- - Initializes a wqe and place it on recv ring<br>
- - Write to qpn|qp_recv_bit (31) to QP offset in UAR<br>
- - Device<br>
- - Extracts qpn from UAR<br>
- - Walks through the ring and does the following for each wqe<br>
- - Prepares the backend CQE context to be used when<br>
- receiving completion from backend (wr_id, op_code, emu_cq_num)<br>
- - For each sge prepares backend sge<br>
- - Calls backend's post_recv<br>
-<br>
-4.3.4 Process backend events<br>
-============================<br>
- - Done by a dedicated thread used to process backend events;<br>
- at initialization is attached to the device and creates<br>
- the communication channel.<br>
- - Thread main loop:<br>
- - Polls for completions<br>
- - Extracts QEMU _cq_num, wr_id and op_code from context<br>
- - Writes CQE to CQ ring<br>
- - Writes CQ number to device CQ<br>
- - Sends completion-interrupt to guest<br>
- - Deallocates context<br>
- - Acks the event to backend<br>
-<br>
-<br>
-<br>
-5. Limitations<br>
-==============<br>
-- The device obviously is limited by the Guest Linux Driver features implementation<br>
- of the VMware device API.<br>
-- Memory registration mechanism requires mremap for every page in the buffer in order<br>
- to map it to a contiguous virtual address range. Since this is not the data path<br>
- it should not matter much. If the default max mr size is increased, be aware that<br>
- memory registration can take up to 0.5 seconds for 1GB of memory.<br>
-- The device requires target page size to be the same as the host page size,<br>
- otherwise it will fail to init.<br>
-- QEMU cannot map guest RAM from a file descriptor if a pvrdma device is attached,<br>
- so it can't work with huge pages. The limitation will be addressed in the future,<br>
- however QEMU allocates Guest RAM with MADV_HUGEPAGE so if there are enough huge<br>
- pages available, QEMU will use them. QEMU will fail to init if the requirements<br>
- are not met.<br>
-<br>
-<br>
-<br>
-6. Performance<br>
-==============<br>
-By design the pvrdma device exits on each post-send/receive, so for small buffers<br>
-the performance is affected; however for medium buffers it will became close to<br>
-bare metal and from 1MB buffers and up it reaches bare metal performance.<br>
-(tested with 2 VMs, the pvrdma devices connected to 2 VFs of the same device)<br>
-<br>
-All the above assumes no memory registration is done on data path.<br>
diff --git a/docs/rdma.txt b/docs/rdma.txt<br>
deleted file mode 100644<br>
index bd8dd799a9..0000000000<br>
--- a/docs/rdma.txt<br>
+++ /dev/null<br>
@@ -1,420 +0,0 @@<br>
-(RDMA: Remote Direct Memory Access)<br>
-RDMA Live Migration Specification, Version # 1<br>
-==============================================<br>
-Wiki: <a href="https://wiki.qemu.org/Features/RDMALiveMigration" rel="noreferrer noreferrer" target="_blank">https://wiki.qemu.org/Features/RDMALiveMigration</a><br>
-Github: git@github.com:hinesmr/qemu.git, 'rdma' branch<br>
-<br>
-Copyright (C) 2013 Michael R. Hines <<a href="mailto:mrhines@us.ibm.com" target="_blank" rel="noreferrer">mrhines@us.ibm.com</a>><br>
-<br>
-An *exhaustive* paper (2010) shows additional performance details<br>
-linked on the QEMU wiki above.<br>
-<br>
-Contents:<br>
-=========<br>
-* Introduction<br>
-* Before running<br>
-* Running<br>
-* Performance<br>
-* RDMA Migration Protocol Description<br>
-* Versioning and Capabilities<br>
-* QEMUFileRDMA Interface<br>
-* Migration of VM's ram<br>
-* Error handling<br>
-* TODO<br>
-<br>
-Introduction:<br>
-=============<br>
-<br>
-RDMA helps make your migration more deterministic under heavy load because<br>
-of the significantly lower latency and higher throughput over TCP/IP. This is<br>
-because the RDMA I/O architecture reduces the number of interrupts and<br>
-data copies by bypassing the host networking stack. In particular, a TCP-based<br>
-migration, under certain types of memory-bound workloads, may take a more<br>
-unpredictable amount of time to complete the migration if the amount of<br>
-memory tracked during each live migration iteration round cannot keep pace<br>
-with the rate of dirty memory produced by the workload.<br>
-<br>
-RDMA currently comes in two flavors: both Ethernet based (RoCE, or RDMA<br>
-over Converged Ethernet) as well as Infiniband-based. This implementation of<br>
-migration using RDMA is capable of using both technologies because of<br>
-the use of the OpenFabrics OFED software stack that abstracts out the<br>
-programming model irrespective of the underlying hardware.<br>
-<br>
-Refer to <a href="http://openfabrics.org" rel="noreferrer noreferrer" target="_blank">openfabrics.org</a> or your respective RDMA hardware vendor for<br>
-an understanding on how to verify that you have the OFED software stack<br>
-installed in your environment. You should be able to successfully link<br>
-against the "librdmacm" and "libibverbs" libraries and development headers<br>
-for a working build of QEMU to run successfully using RDMA Migration.<br>
-<br>
-BEFORE RUNNING:<br>
-===============<br>
-<br>
-Use of RDMA during migration requires pinning and registering memory<br>
-with the hardware. This means that memory must be physically resident<br>
-before the hardware can transmit that memory to another machine.<br>
-If this is not acceptable for your application or product, then the use<br>
-of RDMA migration may in fact be harmful to co-located VMs or other<br>
-software on the machine if there is not sufficient memory available to<br>
-relocate the entire footprint of the virtual machine. If so, then the<br>
-use of RDMA is discouraged and it is recommended to use standard TCP migration.<br>
-<br>
-Experimental: Next, decide if you want dynamic page registration.<br>
-For example, if you have an 8GB RAM virtual machine, but only 1GB<br>
-is in active use, then enabling this feature will cause all 8GB to<br>
-be pinned and resident in memory. This feature mostly affects the<br>
-bulk-phase round of the migration and can be enabled for extremely<br>
-high-performance RDMA hardware using the following command:<br>
-<br>
-QEMU Monitor Command:<br>
-$ migrate_set_capability rdma-pin-all on # disabled by default<br>
-<br>
-Performing this action will cause all 8GB to be pinned, so if that's<br>
-not what you want, then please ignore this step altogether.<br>
-<br>
-On the other hand, this will also significantly speed up the bulk round<br>
-of the migration, which can greatly reduce the "total" time of your migration.<br>
-Example performance of this using an idle VM in the previous example<br>
-can be found in the "Performance" section.<br>
-<br>
-Note: for very large virtual machines (hundreds of GBs), pinning all<br>
-*all* of the memory of your virtual machine in the kernel is very expensive<br>
-may extend the initial bulk iteration time by many seconds,<br>
-and thus extending the total migration time. However, this will not<br>
-affect the determinism or predictability of your migration you will<br>
-still gain from the benefits of advanced pinning with RDMA.<br>
-<br>
-RUNNING:<br>
-========<br>
-<br>
-First, set the migration speed to match your hardware's capabilities:<br>
-<br>
-QEMU Monitor Command:<br>
-$ migrate_set_parameter max-bandwidth 40g # or whatever is the MAX of your RDMA device<br>
-<br>
-Next, on the destination machine, add the following to the QEMU command line:<br>
-<br>
-qemu ..... -incoming rdma:host:port<br>
-<br>
-Finally, perform the actual migration on the source machine:<br>
-<br>
-QEMU Monitor Command:<br>
-$ migrate -d rdma:host:port<br>
-<br>
-PERFORMANCE<br>
-===========<br>
-<br>
-Here is a brief summary of total migration time and downtime using RDMA:<br>
-Using a 40gbps infiniband link performing a worst-case stress test,<br>
-using an 8GB RAM virtual machine:<br>
-<br>
-Using the following command:<br>
-$ apt-get install stress<br>
-$ stress --vm-bytes 7500M --vm 1 --vm-keep<br>
-<br>
-1. Migration throughput: 26 gigabits/second.<br>
-2. Downtime (stop time) varies between 15 and 100 milliseconds.<br>
-<br>
-EFFECTS of memory registration on bulk phase round:<br>
-<br>
-For example, in the same 8GB RAM example with all 8GB of memory in<br>
-active use and the VM itself is completely idle using the same 40 gbps<br>
-infiniband link:<br>
-<br>
-1. rdma-pin-all disabled total time: approximately 7.5 seconds @ 9.5 Gbps<br>
-2. rdma-pin-all enabled total time: approximately 4 seconds @ 26 Gbps<br>
-<br>
-These numbers would of course scale up to whatever size virtual machine<br>
-you have to migrate using RDMA.<br>
-<br>
-Enabling this feature does *not* have any measurable affect on<br>
-migration *downtime*. This is because, without this feature, all of the<br>
-memory will have already been registered already in advance during<br>
-the bulk round and does not need to be re-registered during the successive<br>
-iteration rounds.<br>
-<br>
-RDMA Protocol Description:<br>
-==========================<br>
-<br>
-Migration with RDMA is separated into two parts:<br>
-<br>
-1. The transmission of the pages using RDMA<br>
-2. Everything else (a control channel is introduced)<br>
-<br>
-"Everything else" is transmitted using a formal<br>
-protocol now, consisting of infiniband SEND messages.<br>
-<br>
-An infiniband SEND message is the standard ibverbs<br>
-message used by applications of infiniband hardware.<br>
-The only difference between a SEND message and an RDMA<br>
-message is that SEND messages cause notifications<br>
-to be posted to the completion queue (CQ) on the<br>
-infiniband receiver side, whereas RDMA messages (used<br>
-for VM's ram) do not (to behave like an actual DMA).<br>
-<br>
-Messages in infiniband require two things:<br>
-<br>
-1. registration of the memory that will be transmitted<br>
-2. (SEND only) work requests to be posted on both<br>
- sides of the network before the actual transmission<br>
- can occur.<br>
-<br>
-RDMA messages are much easier to deal with. Once the memory<br>
-on the receiver side is registered and pinned, we're<br>
-basically done. All that is required is for the sender<br>
-side to start dumping bytes onto the link.<br>
-<br>
-(Memory is not released from pinning until the migration<br>
-completes, given that RDMA migrations are very fast.)<br>
-<br>
-SEND messages require more coordination because the<br>
-receiver must have reserved space (using a receive<br>
-work request) on the receive queue (RQ) before QEMUFileRDMA<br>
-can start using them to carry all the bytes as<br>
-a control transport for migration of device state.<br>
-<br>
-To begin the migration, the initial connection setup is<br>
-as follows (migration-rdma.c):<br>
-<br>
-1. Receiver and Sender are started (command line or libvirt):<br>
-2. Both sides post two RQ work requests<br>
-3. Receiver does listen()<br>
-4. Sender does connect()<br>
-5. Receiver accept()<br>
-6. Check versioning and capabilities (described later)<br>
-<br>
-At this point, we define a control channel on top of SEND messages<br>
-which is described by a formal protocol. Each SEND message has a<br>
-header portion and a data portion (but together are transmitted<br>
-as a single SEND message).<br>
-<br>
-Header:<br>
- * Length (of the data portion, uint32, network byte order)<br>
- * Type (what command to perform, uint32, network byte order)<br>
- * Repeat (Number of commands in data portion, same type only)<br>
-<br>
-The 'Repeat' field is here to support future multiple page registrations<br>
-in a single message without any need to change the protocol itself<br>
-so that the protocol is compatible against multiple versions of QEMU.<br>
-Version #1 requires that all server implementations of the protocol must<br>
-check this field and register all requests found in the array of commands located<br>
-in the data portion and return an equal number of results in the response.<br>
-The maximum number of repeats is hard-coded to 4096. This is a conservative<br>
-limit based on the maximum size of a SEND message along with empirical<br>
-observations on the maximum future benefit of simultaneous page registrations.<br>
-<br>
-The 'type' field has 12 different command values:<br>
- 1. Unused<br>
- 2. Error (sent to the source during bad things)<br>
- 3. Ready (control-channel is available)<br>
- 4. QEMU File (for sending non-live device state)<br>
- 5. RAM Blocks request (used right after connection setup)<br>
- 6. RAM Blocks result (used right after connection setup)<br>
- 7. Compress page (zap zero page and skip registration)<br>
- 8. Register request (dynamic chunk registration)<br>
- 9. Register result ('rkey' to be used by sender)<br>
- 10. Register finished (registration for current iteration finished)<br>
- 11. Unregister request (unpin previously registered memory)<br>
- 12. Unregister finished (confirmation that unpin completed)<br>
-<br>
-A single control message, as hinted above, can contain within the data<br>
-portion an array of many commands of the same type. If there is more than<br>
-one command, then the 'repeat' field will be greater than 1.<br>
-<br>
-After connection setup, message 5 & 6 are used to exchange ram block<br>
-information and optionally pin all the memory if requested by the user.<br>
-<br>
-After ram block exchange is completed, we have two protocol-level<br>
-functions, responsible for communicating control-channel commands<br>
-using the above list of values:<br>
-<br>
-Logically:<br>
-<br>
-qemu_rdma_exchange_recv(header, expected command type)<br>
-<br>
-1. We transmit a READY command to let the sender know that<br>
- we are *ready* to receive some data bytes on the control channel.<br>
-2. Before attempting to receive the expected command, we post another<br>
- RQ work request to replace the one we just used up.<br>
-3. Block on a CQ event channel and wait for the SEND to arrive.<br>
-4. When the send arrives, librdmacm will unblock us.<br>
-5. Verify that the command-type and version received matches the one we expected.<br>
-<br>
-qemu_rdma_exchange_send(header, data, optional response header & data):<br>
-<br>
-1. Block on the CQ event channel waiting for a READY command<br>
- from the receiver to tell us that the receiver<br>
- is *ready* for us to transmit some new bytes.<br>
-2. Optionally: if we are expecting a response from the command<br>
- (that we have not yet transmitted), let's post an RQ<br>
- work request to receive that data a few moments later.<br>
-3. When the READY arrives, librdmacm will<br>
- unblock us and we immediately post a RQ work request<br>
- to replace the one we just used up.<br>
-4. Now, we can actually post the work request to SEND<br>
- the requested command type of the header we were asked for.<br>
-5. Optionally, if we are expecting a response (as before),<br>
- we block again and wait for that response using the additional<br>
- work request we previously posted. (This is used to carry<br>
- 'Register result' commands #6 back to the sender which<br>
- hold the rkey need to perform RDMA. Note that the virtual address<br>
- corresponding to this rkey was already exchanged at the beginning<br>
- of the connection (described below).<br>
-<br>
-All of the remaining command types (not including 'ready')<br>
-described above all use the aforementioned two functions to do the hard work:<br>
-<br>
-1. After connection setup, RAMBlock information is exchanged using<br>
- this protocol before the actual migration begins. This information includes<br>
- a description of each RAMBlock on the server side as well as the virtual addresses<br>
- and lengths of each RAMBlock. This is used by the client to determine the<br>
- start and stop locations of chunks and how to register them dynamically<br>
- before performing the RDMA operations.<br>
-2. During runtime, once a 'chunk' becomes full of pages ready to<br>
- be sent with RDMA, the registration commands are used to ask the<br>
- other side to register the memory for this chunk and respond<br>
- with the result (rkey) of the registration.<br>
-3. Also, the QEMUFile interfaces also call these functions (described below)<br>
- when transmitting non-live state, such as devices or to send<br>
- its own protocol information during the migration process.<br>
-4. Finally, zero pages are only checked if a page has not yet been registered<br>
- using chunk registration (or not checked at all and unconditionally<br>
- written if chunk registration is disabled. This is accomplished using<br>
- the "Compress" command listed above. If the page *has* been registered<br>
- then we check the entire chunk for zero. Only if the entire chunk is<br>
- zero, then we send a compress command to zap the page on the other side.<br>
-<br>
-Versioning and Capabilities<br>
-===========================<br>
-Current version of the protocol is version #1.<br>
-<br>
-The same version applies to both for protocol traffic and capabilities<br>
-negotiation. (i.e. There is only one version number that is referred to<br>
-by all communication).<br>
-<br>
-librdmacm provides the user with a 'private data' area to be exchanged<br>
-at connection-setup time before any infiniband traffic is generated.<br>
-<br>
-Header:<br>
- * Version (protocol version validated before send/recv occurs),<br>
- uint32, network byte order<br>
- * Flags (bitwise OR of each capability),<br>
- uint32, network byte order<br>
-<br>
-There is no data portion of this header right now, so there is<br>
-no length field. The maximum size of the 'private data' section<br>
-is only 192 bytes per the Infiniband specification, so it's not<br>
-very useful for data anyway. This structure needs to remain small.<br>
-<br>
-This private data area is a convenient place to check for protocol<br>
-versioning because the user does not need to register memory to<br>
-transmit a few bytes of version information.<br>
-<br>
-This is also a convenient place to negotiate capabilities<br>
-(like dynamic page registration).<br>
-<br>
-If the version is invalid, we throw an error.<br>
-<br>
-If the version is new, we only negotiate the capabilities that the<br>
-requested version is able to perform and ignore the rest.<br>
-<br>
-Currently there is only one capability in Version #1: dynamic page registration<br>
-<br>
-Finally: Negotiation happens with the Flags field: If the primary-VM<br>
-sets a flag, but the destination does not support this capability, it<br>
-will return a zero-bit for that flag and the primary-VM will understand<br>
-that as not being an available capability and will thus disable that<br>
-capability on the primary-VM side.<br>
-<br>
-QEMUFileRDMA Interface:<br>
-=======================<br>
-<br>
-QEMUFileRDMA introduces a couple of new functions:<br>
-<br>
-1. qemu_rdma_get_buffer() (QEMUFileOps rdma_read_ops)<br>
-2. qemu_rdma_put_buffer() (QEMUFileOps rdma_write_ops)<br>
-<br>
-These two functions are very short and simply use the protocol<br>
-describe above to deliver bytes without changing the upper-level<br>
-users of QEMUFile that depend on a bytestream abstraction.<br>
-<br>
-Finally, how do we handoff the actual bytes to get_buffer()?<br>
-<br>
-Again, because we're trying to "fake" a bytestream abstraction<br>
-using an analogy not unlike individual UDP frames, we have<br>
-to hold on to the bytes received from control-channel's SEND<br>
-messages in memory.<br>
-<br>
-Each time we receive a complete "QEMU File" control-channel<br>
-message, the bytes from SEND are copied into a small local holding area.<br>
-<br>
-Then, we return the number of bytes requested by get_buffer()<br>
-and leave the remaining bytes in the holding area until get_buffer()<br>
-comes around for another pass.<br>
-<br>
-If the buffer is empty, then we follow the same steps<br>
-listed above and issue another "QEMU File" protocol command,<br>
-asking for a new SEND message to re-fill the buffer.<br>
-<br>
-Migration of VM's ram:<br>
-====================<br>
-<br>
-At the beginning of the migration, (migration-rdma.c),<br>
-the sender and the receiver populate the list of RAMBlocks<br>
-to be registered with each other into a structure.<br>
-Then, using the aforementioned protocol, they exchange a<br>
-description of these blocks with each other, to be used later<br>
-during the iteration of main memory. This description includes<br>
-a list of all the RAMBlocks, their offsets and lengths, virtual<br>
-addresses and possibly includes pre-registered RDMA keys in case dynamic<br>
-page registration was disabled on the server-side, otherwise not.<br>
-<br>
-Main memory is not migrated with the aforementioned protocol,<br>
-but is instead migrated with normal RDMA Write operations.<br>
-<br>
-Pages are migrated in "chunks" (hard-coded to 1 Megabyte right now).<br>
-Chunk size is not dynamic, but it could be in a future implementation.<br>
-There's nothing to indicate that this is useful right now.<br>
-<br>
-When a chunk is full (or a flush() occurs), the memory backed by<br>
-the chunk is registered with librdmacm is pinned in memory on<br>
-both sides using the aforementioned protocol.<br>
-After pinning, an RDMA Write is generated and transmitted<br>
-for the entire chunk.<br>
-<br>
-Chunks are also transmitted in batches: This means that we<br>
-do not request that the hardware signal the completion queue<br>
-for the completion of *every* chunk. The current batch size<br>
-is about 64 chunks (corresponding to 64 MB of memory).<br>
-Only the last chunk in a batch must be signaled.<br>
-This helps keep everything as asynchronous as possible<br>
-and helps keep the hardware busy performing RDMA operations.<br>
-<br>
-Error-handling:<br>
-===============<br>
-<br>
-Infiniband has what is called a "Reliable, Connected"<br>
-link (one of 4 choices). This is the mode in which<br>
-we use for RDMA migration.<br>
-<br>
-If a *single* message fails,<br>
-the decision is to abort the migration entirely and<br>
-cleanup all the RDMA descriptors and unregister all<br>
-the memory.<br>
-<br>
-After cleanup, the Virtual Machine is returned to normal<br>
-operation the same way that would happen if the TCP<br>
-socket is broken during a non-RDMA based migration.<br>
-<br>
-TODO:<br>
-=====<br>
-1. Currently, 'ulimit -l' mlock() limits as well as cgroups swap limits<br>
- are not compatible with infiniband memory pinning and will result in<br>
- an aborted migration (but with the source VM left unaffected).<br>
-2. Use of the recent /proc/<pid>/pagemap would likely speed up<br>
- the use of KSM and ballooning while using RDMA.<br>
-3. Also, some form of balloon-device usage tracking would also<br>
- help alleviate some issues.<br>
-4. Use LRU to provide more fine-grained direction of UNREGISTER<br>
- requests for unpinning memory in an overcommitted environment.<br>
-5. Expose UNREGISTER support to the user by way of workload-specific<br>
- hints about application behavior.<br>
diff --git a/docs/system/device-url-syntax.rst.inc b/docs/system/device-url-syntax.rst.inc<br>
index 7dbc525fa8..43b5c2596b 100644<br>
--- a/docs/system/device-url-syntax.rst.inc<br>
+++ b/docs/system/device-url-syntax.rst.inc<br>
@@ -87,8 +87,8 @@ These are specified using a special URL syntax.<br>
<br>
``GlusterFS``<br>
GlusterFS is a user space distributed file system. QEMU supports the<br>
- use of GlusterFS volumes for hosting VM disk images using TCP, Unix<br>
- Domain Sockets and RDMA transport protocols.<br>
+ use of GlusterFS volumes for hosting VM disk images using TCP and Unix<br>
+ Domain Sockets transport protocols.<br>
<br>
Syntax for specifying a VM disk image on GlusterFS volume is<br>
<br>
diff --git a/docs/system/loongarch/virt.rst b/docs/system/loongarch/virt.rst<br>
index c37268b404..0a8e0766e4 100644<br>
--- a/docs/system/loongarch/virt.rst<br>
+++ b/docs/system/loongarch/virt.rst<br>
@@ -39,7 +39,7 @@ can be accessed by following steps.<br>
<br>
.. code-block:: bash<br>
<br>
- ./configure --disable-rdma --disable-pvrdma --prefix=/usr \<br>
+ ./configure --prefix=/usr \<br>
--target-list="loongarch64-softmmu" \<br>
--disable-libiscsi --disable-libnfs --disable-libpmem \<br>
--disable-glusterfs --enable-libusb --enable-usb-redir \<br>
diff --git a/docs/system/qemu-block-drivers.rst.inc b/docs/system/qemu-block-drivers.rst.inc<br>
index 105cb9679c..384e95ba76 100644<br>
--- a/docs/system/qemu-block-drivers.rst.inc<br>
+++ b/docs/system/qemu-block-drivers.rst.inc<br>
@@ -737,7 +737,6 @@ Examples<br>
|qemu_system| -drive file=gluster+tcp://[1:2:3:4:5:6:7:8]:24007/testvol/dir/a.img<br>
|qemu_system| -drive file=gluster+tcp://<a href="http://server.domain.com:24007/testvol/dir/a.img" rel="noreferrer noreferrer" target="_blank">server.domain.com:24007/testvol/dir/a.img</a><br>
|qemu_system| -drive file=gluster+unix:///testvol/dir/a.img?socket=/tmp/glusterd.socket<br>
- |qemu_system| -drive file=gluster+rdma://<a href="http://1.2.3.4:24007/testvol/a.img" rel="noreferrer noreferrer" target="_blank">1.2.3.4:24007/testvol/a.img</a><br>
|qemu_system| -drive file=gluster://<a href="http://1.2.3.4/testvol/a.img,file.debug=9,file.logfile=/var/log/qemu-gluster.log" rel="noreferrer noreferrer" target="_blank">1.2.3.4/testvol/a.img,file.debug=9,file.logfile=/var/log/qemu-gluster.log</a><br>
|qemu_system| 'json:{"driver":"qcow2",<br>
"file":{"driver":"gluster",<br>
diff --git a/meson.build b/meson.build<br>
index c9c3217ba4..bd65abad13 100644<br>
--- a/meson.build<br>
+++ b/meson.build<br>
@@ -1854,21 +1854,6 @@ if numa.found() and not cc.links('''<br>
endif<br>
endif<br>
<br>
-rdma = not_found<br>
-if not get_option('rdma').auto() or have_system<br>
- libumad = cc.find_library('ibumad', required: get_option('rdma'))<br>
- rdma_libs = [cc.find_library('rdmacm', has_headers: ['rdma/rdma_cma.h'],<br>
- required: get_option('rdma')),<br>
- cc.find_library('ibverbs', required: get_option('rdma')),<br>
- libumad]<br>
- rdma = declare_dependency(dependencies: rdma_libs)<br>
- foreach lib: rdma_libs<br>
- if not lib.found()<br>
- rdma = not_found<br>
- endif<br>
- endforeach<br>
-endif<br>
-<br>
cacard = not_found<br>
if not get_option('smartcard').auto() or have_system<br>
cacard = dependency('libcacard', required: get_option('smartcard'),<br>
@@ -2246,7 +2231,6 @@ endif<br>
config_host_data.set('CONFIG_OPENGL', opengl.found())<br>
config_host_data.set('CONFIG_PLUGIN', get_option('plugins'))<br>
config_host_data.set('CONFIG_RBD', rbd.found())<br>
-config_host_data.set('CONFIG_RDMA', rdma.found())<br>
config_host_data.set('CONFIG_RELOCATABLE', get_option('relocatable'))<br>
config_host_data.set('CONFIG_SAFESTACK', get_option('safe_stack'))<br>
config_host_data.set('CONFIG_SDL', sdl.found())<br>
@@ -2399,12 +2383,6 @@ if rbd.found()<br>
dependencies: rbd,<br>
prefix: '#include <rbd/librbd.h>'))<br>
endif<br>
-if rdma.found()<br>
- config_host_data.set('HAVE_IBV_ADVISE_MR',<br>
- cc.has_function('ibv_advise_mr',<br>
- dependencies: rdma,<br>
- prefix: '#include <infiniband/verbs.h>'))<br>
-endif<br>
<br>
have_asan_fiber = false<br>
if get_option('sanitizers') and \<br>
@@ -2829,37 +2807,6 @@ config_host_data.set('CONFIG_ARM_AES_BUILTIN', cc.compiles('''<br>
void foo(uint8x16_t *p) { *p = vaesmcq_u8(*p); }<br>
'''))<br>
<br>
-have_pvrdma = get_option('pvrdma') \<br>
- .require(rdma.found(), error_message: 'PVRDMA requires OpenFabrics libraries') \<br>
- .require(cc.compiles(gnu_source_prefix + '''<br>
- #include <sys/mman.h><br>
- int main(void)<br>
- {<br>
- char buf = 0;<br>
- void *addr = &buf;<br>
- addr = mremap(addr, 0, 1, MREMAP_MAYMOVE | MREMAP_FIXED);<br>
-<br>
- return 0;<br>
- }'''), error_message: 'PVRDMA requires mremap').allowed()<br>
-<br>
-if have_pvrdma<br>
- config_host_data.set('LEGACY_RDMA_REG_MR', not cc.links('''<br>
- #include <infiniband/verbs.h><br>
- int main(void)<br>
- {<br>
- struct ibv_mr *mr;<br>
- struct ibv_pd *pd = NULL;<br>
- size_t length = 10;<br>
- uint64_t iova = 0;<br>
- int access = 0;<br>
- void *addr = NULL;<br>
-<br>
- mr = ibv_reg_mr_iova(pd, addr, length, iova, access);<br>
- ibv_dereg_mr(mr);<br>
- return 0;<br>
- }'''))<br>
-endif<br>
-<br>
if get_option('membarrier').disabled()<br>
have_membarrier = false<br>
elif host_os == 'windows'<br>
@@ -2993,7 +2940,6 @@ host_kconfig = \<br>
(have_vhost_kernel ? ['CONFIG_VHOST_KERNEL=y'] : []) + \<br>
(have_virtfs ? ['CONFIG_VIRTFS=y'] : []) + \<br>
(host_os == 'linux' ? ['CONFIG_LINUX=y'] : []) + \<br>
- (have_pvrdma ? ['CONFIG_PVRDMA=y'] : []) + \<br>
(multiprocess_allowed ? ['CONFIG_MULTIPROCESS_ALLOWED=y'] : []) + \<br>
(vfio_user_server_allowed ? ['CONFIG_VFIO_USER_SERVER_ALLOWED=y'] : []) + \<br>
(hv_balloon ? ['CONFIG_HV_BALLOON_POSSIBLE=y'] : [])<br>
@@ -3357,8 +3303,6 @@ if have_system<br>
'hw/pci',<br>
'hw/pci-host',<br>
'hw/ppc',<br>
- 'hw/rdma',<br>
- 'hw/rdma/vmw',<br>
'hw/rtc',<br>
'hw/s390x',<br>
'hw/scsi',<br>
@@ -4028,7 +3972,6 @@ if have_tools<br>
}]<br>
endforeach<br>
<br>
- subdir('contrib/rdmacm-mux')<br>
subdir('contrib/elf2dmp')<br>
<br>
executable('qemu-edid', files('qemu-edid.c', 'hw/display/edid-generate.c'),<br>
@@ -4433,8 +4376,6 @@ summary_info += {'Multipath support': mpathpersist}<br>
summary_info += {'Linux AIO support': libaio}<br>
summary_info += {'Linux io_uring support': linux_io_uring}<br>
summary_info += {'ATTR/XATTR support': libattr}<br>
-summary_info += {'RDMA support': rdma}<br>
-summary_info += {'PVRDMA support': have_pvrdma}<br>
summary_info += {'fdt support': fdt_opt == 'disabled' ? false : fdt_opt}<br>
summary_info += {'libcap-ng support': libcap_ng}<br>
summary_info += {'bpf support': libbpf}<br>
diff --git a/qapi/machine.json b/qapi/machine.json<br>
index e8b60641f2..e9f0f0c49a 100644<br>
--- a/qapi/machine.json<br>
+++ b/qapi/machine.json<br>
@@ -1737,23 +1737,6 @@<br>
'returns': 'HumanReadableText',<br>
'features': [ 'unstable' ] }<br>
<br>
-##<br>
-# @x-query-rdma:<br>
-#<br>
-# Query RDMA state<br>
-#<br>
-# Features:<br>
-#<br>
-# @unstable: This command is meant for debugging.<br>
-#<br>
-# Returns: RDMA state<br>
-#<br>
-# Since: 6.2<br>
-##<br>
-{ 'command': 'x-query-rdma',<br>
- 'returns': 'HumanReadableText',<br>
- 'features': [ 'unstable' ] }<br>
-<br>
##<br>
# @x-query-roms:<br>
#<br>
diff --git a/qapi/migration.json b/qapi/migration.json<br>
index 8c65b90328..9a56d403be 100644<br>
--- a/qapi/migration.json<br>
+++ b/qapi/migration.json<br>
@@ -221,8 +221,8 @@<br>
#<br>
# @setup-time: amount of setup time in milliseconds *before* the<br>
# iterations begin but *after* the QMP command is issued. This is<br>
-# designed to provide an accounting of any activities (such as<br>
-# RDMA pinning) which may be expensive, but do not actually occur<br>
+# designed to provide an accounting of any activities which may be<br>
+# expensive, but do not actually occur<br>
# during the iterative migration rounds themselves. (since 1.6)<br>
#<br>
# @cpu-throttle-percentage: percentage of time guest cpus are being<br>
@@ -430,10 +430,6 @@<br>
# for certain work loads, by sending compressed difference of the<br>
# pages<br>
#<br>
-# @rdma-pin-all: Controls whether or not the entire VM memory<br>
-# footprint is mlock()'d on demand or all at once. Refer to<br>
-# docs/rdma.txt for usage. Disabled by default. (since 2.0)<br>
-#<br>
# @zero-blocks: During storage migration encode blocks of zeroes<br>
# efficiently. This essentially saves 1MB of zeroes per block on<br>
# the wire. Enabling requires source and target VM to support<br>
@@ -547,7 +543,7 @@<br>
# Since: 1.2<br>
##<br>
{ 'enum': 'MigrationCapability',<br>
- 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',<br>
+ 'data': ['xbzrle', 'auto-converge', 'zero-blocks',<br>
{ 'name': 'compress', 'features': [ 'deprecated' ] },<br>
'events', 'postcopy-ram',<br>
{ 'name': 'x-colo', 'features': [ 'unstable' ] },<br>
@@ -606,7 +602,6 @@<br>
# -> { "execute": "query-migrate-capabilities" }<br>
# <- { "return": [<br>
# {"state": false, "capability": "xbzrle"},<br>
-# {"state": false, "capability": "rdma-pin-all"},<br>
# {"state": false, "capability": "auto-converge"},<br>
# {"state": false, "capability": "zero-blocks"},<br>
# {"state": false, "capability": "compress"},<br>
@@ -1654,14 +1649,12 @@<br>
#<br>
# @exec: Direct the migration stream to another process.<br>
#<br>
-# @rdma: Migrate via RDMA.<br>
-#<br>
# @file: Direct the migration stream to a file.<br>
#<br>
# Since: 8.2<br>
##<br>
{ 'enum': 'MigrationAddressType',<br>
- 'data': [ 'socket', 'exec', 'rdma', 'file' ] }<br>
+ 'data': [ 'socket', 'exec', 'file' ] }<br>
<br>
##<br>
# @FileMigrationArgs:<br>
@@ -1701,7 +1694,6 @@<br>
'data': {<br>
'socket': 'SocketAddress',<br>
'exec': 'MigrationExecCommand',<br>
- 'rdma': 'InetSocketAddress',<br>
'file': 'FileMigrationArgs' } }<br>
<br>
##<br>
@@ -1804,14 +1796,6 @@<br>
# -> { "execute": "migrate",<br>
# "arguments": {<br>
# "channels": [ { "channel-type": "main",<br>
-# "addr": { "transport": "rdma",<br>
-# "host": "10.12.34.9",<br>
-# "port": "1050" } } ] } }<br>
-# <- { "return": {} }<br>
-#<br>
-# -> { "execute": "migrate",<br>
-# "arguments": {<br>
-# "channels": [ { "channel-type": "main",<br>
# "addr": { "transport": "file",<br>
# "filename": "/tmp/migfile",<br>
# "offset": "0x1000" } } ] } }<br>
@@ -1879,13 +1863,6 @@<br>
# "/some/sock" ] } } ] } }<br>
# <- { "return": {} }<br>
#<br>
-# -> { "execute": "migrate-incoming",<br>
-# "arguments": {<br>
-# "channels": [ { "channel-type": "main",<br>
-# "addr": { "transport": "rdma",<br>
-# "host": "10.12.34.9",<br>
-# "port": "1050" } } ] } }<br>
-# <- { "return": {} }<br>
##<br>
{ 'command': 'migrate-incoming',<br>
'data': {'*uri': 'str',<br>
diff --git a/qapi/qapi-schema.json b/qapi/qapi-schema.json<br>
index 8304d45625..5e33da7228 100644<br>
--- a/qapi/qapi-schema.json<br>
+++ b/qapi/qapi-schema.json<br>
@@ -54,7 +54,6 @@<br>
{ 'include': 'dump.json' }<br>
{ 'include': 'net.json' }<br>
{ 'include': 'ebpf.json' }<br>
-{ 'include': 'rdma.json' }<br>
{ 'include': 'rocker.json' }<br>
{ 'include': 'tpm.json' }<br>
{ 'include': 'ui.json' }<br>
diff --git a/qapi/rdma.json b/qapi/rdma.json<br>
deleted file mode 100644<br>
index 195c001850..0000000000<br>
--- a/qapi/rdma.json<br>
+++ /dev/null<br>
@@ -1,38 +0,0 @@<br>
-# -*- Mode: Python -*-<br>
-# vim: filetype=python<br>
-#<br>
-<br>
-##<br>
-# = RDMA device<br>
-##<br>
-<br>
-##<br>
-# @RDMA_GID_STATUS_CHANGED:<br>
-#<br>
-# Emitted when guest driver adds/deletes GID to/from device<br>
-#<br>
-# @netdev: RoCE Network Device name<br>
-#<br>
-# @gid-status: Add or delete indication<br>
-#<br>
-# @subnet-prefix: Subnet Prefix<br>
-#<br>
-# @interface-id: Interface ID<br>
-#<br>
-# Since: 4.0<br>
-#<br>
-# Example:<br>
-#<br>
-# <- {"timestamp": {"seconds": 1541579657, "microseconds": 986760},<br>
-# "event": "RDMA_GID_STATUS_CHANGED",<br>
-# "data":<br>
-# {"netdev": "bridge0",<br>
-# "interface-id": 15880512517475447892,<br>
-# "gid-status": true,<br>
-# "subnet-prefix": 33022}}<br>
-##<br>
-{ 'event': 'RDMA_GID_STATUS_CHANGED',<br>
- 'data': { 'netdev' : 'str',<br>
- 'gid-status' : 'bool',<br>
- 'subnet-prefix' : 'uint64',<br>
- 'interface-id' : 'uint64' } }<br>
diff --git a/contrib/rdmacm-mux/rdmacm-mux.h b/contrib/rdmacm-mux/rdmacm-mux.h<br>
deleted file mode 100644<br>
index 07a4722913..0000000000<br>
--- a/contrib/rdmacm-mux/rdmacm-mux.h<br>
+++ /dev/null<br>
@@ -1,61 +0,0 @@<br>
-/*<br>
- * QEMU paravirtual RDMA - rdmacm-mux declarations<br>
- *<br>
- * Copyright (C) 2018 Oracle<br>
- * Copyright (C) 2018 Red Hat Inc<br>
- *<br>
- * Authors:<br>
- * Yuval Shaia <<a href="mailto:yuval.shaia@oracle.com" target="_blank" rel="noreferrer">yuval.shaia@oracle.com</a>><br>
- * Marcel Apfelbaum <<a href="mailto:marcel@redhat.com" target="_blank" rel="noreferrer">marcel@redhat.com</a>><br>
- *<br>
- * This work is licensed under the terms of the GNU GPL, version 2 or later.<br>
- * See the COPYING file in the top-level directory.<br>
- *<br>
- */<br>
-<br>
-#ifndef RDMACM_MUX_H<br>
-#define RDMACM_MUX_H<br>
-<br>
-#include "linux/if.h"<br>
-#include <infiniband/verbs.h><br>
-#include <infiniband/umad.h><br>
-#include <rdma/rdma_user_cm.h><br>
-<br>
-typedef enum RdmaCmMuxMsgType {<br>
- RDMACM_MUX_MSG_TYPE_REQ = 0,<br>
- RDMACM_MUX_MSG_TYPE_RESP = 1,<br>
-} RdmaCmMuxMsgType;<br>
-<br>
-typedef enum RdmaCmMuxOpCode {<br>
- RDMACM_MUX_OP_CODE_REG = 0,<br>
- RDMACM_MUX_OP_CODE_UNREG = 1,<br>
- RDMACM_MUX_OP_CODE_MAD = 2,<br>
-} RdmaCmMuxOpCode;<br>
-<br>
-typedef enum RdmaCmMuxErrCode {<br>
- RDMACM_MUX_ERR_CODE_OK = 0,<br>
- RDMACM_MUX_ERR_CODE_EINVAL = 1,<br>
- RDMACM_MUX_ERR_CODE_EEXIST = 2,<br>
- RDMACM_MUX_ERR_CODE_EACCES = 3,<br>
- RDMACM_MUX_ERR_CODE_ENOTFOUND = 4,<br>
-} RdmaCmMuxErrCode;<br>
-<br>
-typedef struct RdmaCmMuxHdr {<br>
- RdmaCmMuxMsgType msg_type;<br>
- RdmaCmMuxOpCode op_code;<br>
- union ibv_gid sgid;<br>
- RdmaCmMuxErrCode err_code;<br>
-} RdmaCmUHdr;<br>
-<br>
-typedef struct RdmaCmUMad {<br>
- struct ib_user_mad hdr;<br>
- char mad[RDMA_MAX_PRIVATE_DATA];<br>
-} RdmaCmUMad;<br>
-<br>
-typedef struct RdmaCmMuxMsg {<br>
- RdmaCmUHdr hdr;<br>
- int umad_len;<br>
- RdmaCmUMad umad;<br>
-} RdmaCmMuxMsg;<br>
-<br>
-#endif<br>
diff --git a/hw/rdma/rdma_backend.h b/hw/rdma/rdma_backend.h<br>
deleted file mode 100644<br>
index 225af481e0..0000000000<br>
--- a/hw/rdma/rdma_backend.h<br>
+++ /dev/null<br>
@@ -1,129 +0,0 @@<br>
-/*<br>
- * RDMA device: Definitions of Backend Device functions<br>
- *<br>
- * Copyright (C) 2018 Oracle<br>
- * Copyright (C) 2018 Red Hat Inc<br>
- *<br>
- * Authors:<br>
- * Yuval Shaia <<a href="mailto:yuval.shaia@oracle.com" target="_blank" rel="noreferrer">yuval.shaia@oracle.com</a>><br>
- * Marcel Apfelbaum <<a href="mailto:marcel@redhat.com" target="_blank" rel="noreferrer">marcel@redhat.com</a>><br>
- *<br>
- * This work is licensed under the terms of the GNU GPL, version 2 or later.<br>
- * See the COPYING file in the top-level directory.<br>
- *<br>
- */<br>
-<br>
-#ifndef RDMA_BACKEND_H<br>
-#define RDMA_BACKEND_H<br>
-<br>
-#include "qapi/error.h"<br>
-#include "chardev/char-fe.h"<br>
-<br>
-#include "rdma_rm_defs.h"<br>
-#include "rdma_backend_defs.h"<br>
-<br>
-/* Vendor Errors */<br>
-#define VENDOR_ERR_FAIL_BACKEND 0x201<br>
-#define VENDOR_ERR_TOO_MANY_SGES 0x202<br>
-#define VENDOR_ERR_NOMEM 0x203<br>
-#define VENDOR_ERR_QP0 0x204<br>
-#define VENDOR_ERR_INV_NUM_SGE 0x205<br>
-#define VENDOR_ERR_MAD_SEND 0x206<br>
-#define VENDOR_ERR_INVLKEY 0x207<br>
-#define VENDOR_ERR_MR_SMALL 0x208<br>
-#define VENDOR_ERR_INV_MAD_BUFF 0x209<br>
-#define VENDOR_ERR_INV_GID_IDX 0x210<br>
-<br>
-/* Add definition for QP0 and QP1 as there is no userspace enums for them */<br>
-enum ibv_special_qp_type {<br>
- IBV_QPT_SMI = 0,<br>
- IBV_QPT_GSI = 1,<br>
-};<br>
-<br>
-static inline uint32_t rdma_backend_qpn(const RdmaBackendQP *qp)<br>
-{<br>
- return qp->ibqp ? qp->ibqp->qp_num : 1;<br>
-}<br>
-<br>
-static inline uint32_t rdma_backend_mr_lkey(const RdmaBackendMR *mr)<br>
-{<br>
- return mr->ibmr ? mr->ibmr->lkey : 0;<br>
-}<br>
-<br>
-static inline uint32_t rdma_backend_mr_rkey(const RdmaBackendMR *mr)<br>
-{<br>
- return mr->ibmr ? mr->ibmr->rkey : 0;<br>
-}<br>
-<br>
-int rdma_backend_init(RdmaBackendDev *backend_dev, PCIDevice *pdev,<br>
- RdmaDeviceResources *rdma_dev_res,<br>
- const char *backend_device_name, uint8_t port_num,<br>
- struct ibv_device_attr *dev_attr,<br>
- CharBackend *mad_chr_be);<br>
-void rdma_backend_fini(RdmaBackendDev *backend_dev);<br>
-int rdma_backend_add_gid(RdmaBackendDev *backend_dev, const char *ifname,<br>
- union ibv_gid *gid);<br>
-int rdma_backend_del_gid(RdmaBackendDev *backend_dev, const char *ifname,<br>
- union ibv_gid *gid);<br>
-int rdma_backend_get_gid_index(RdmaBackendDev *backend_dev,<br>
- union ibv_gid *gid);<br>
-void rdma_backend_start(RdmaBackendDev *backend_dev);<br>
-void rdma_backend_stop(RdmaBackendDev *backend_dev);<br>
-void rdma_backend_register_comp_handler(void (*handler)(void *ctx,<br>
- struct ibv_wc *wc));<br>
-void rdma_backend_unregister_comp_handler(void);<br>
-<br>
-int rdma_backend_query_port(RdmaBackendDev *backend_dev,<br>
- struct ibv_port_attr *port_attr);<br>
-int rdma_backend_create_pd(RdmaBackendDev *backend_dev, RdmaBackendPD *pd);<br>
-void rdma_backend_destroy_pd(RdmaBackendPD *pd);<br>
-<br>
-int rdma_backend_create_mr(RdmaBackendMR *mr, RdmaBackendPD *pd, void *addr,<br>
- size_t length, uint64_t guest_start, int access);<br>
-void rdma_backend_destroy_mr(RdmaBackendMR *mr);<br>
-<br>
-int rdma_backend_create_cq(RdmaBackendDev *backend_dev, RdmaBackendCQ *cq,<br>
- int cqe);<br>
-void rdma_backend_destroy_cq(RdmaBackendCQ *cq);<br>
-void rdma_backend_poll_cq(RdmaDeviceResources *rdma_dev_res, RdmaBackendCQ *cq);<br>
-<br>
-int rdma_backend_create_qp(RdmaBackendQP *qp, uint8_t qp_type,<br>
- RdmaBackendPD *pd, RdmaBackendCQ *scq,<br>
- RdmaBackendCQ *rcq, RdmaBackendSRQ *srq,<br>
- uint32_t max_send_wr, uint32_t max_recv_wr,<br>
- uint32_t max_send_sge, uint32_t max_recv_sge);<br>
-int rdma_backend_qp_state_init(RdmaBackendDev *backend_dev, RdmaBackendQP *qp,<br>
- uint8_t qp_type, uint32_t qkey);<br>
-int rdma_backend_qp_state_rtr(RdmaBackendDev *backend_dev, RdmaBackendQP *qp,<br>
- uint8_t qp_type, uint8_t sgid_idx,<br>
- union ibv_gid *dgid, uint32_t dqpn,<br>
- uint32_t rq_psn, uint32_t qkey, bool use_qkey);<br>
-int rdma_backend_qp_state_rts(RdmaBackendQP *qp, uint8_t qp_type,<br>
- uint32_t sq_psn, uint32_t qkey, bool use_qkey);<br>
-int rdma_backend_query_qp(RdmaBackendQP *qp, struct ibv_qp_attr *attr,<br>
- int attr_mask, struct ibv_qp_init_attr *init_attr);<br>
-void rdma_backend_destroy_qp(RdmaBackendQP *qp, RdmaDeviceResources *dev_res);<br>
-<br>
-void rdma_backend_post_send(RdmaBackendDev *backend_dev,<br>
- RdmaBackendQP *qp, uint8_t qp_type,<br>
- struct ibv_sge *sge, uint32_t num_sge,<br>
- uint8_t sgid_idx, union ibv_gid *sgid,<br>
- union ibv_gid *dgid, uint32_t dqpn, uint32_t dqkey,<br>
- void *ctx);<br>
-void rdma_backend_post_recv(RdmaBackendDev *backend_dev,<br>
- RdmaBackendQP *qp, uint8_t qp_type,<br>
- struct ibv_sge *sge, uint32_t num_sge, void *ctx);<br>
-<br>
-int rdma_backend_create_srq(RdmaBackendSRQ *srq, RdmaBackendPD *pd,<br>
- uint32_t max_wr, uint32_t max_sge,<br>
- uint32_t srq_limit);<br>
-int rdma_backend_query_srq(RdmaBackendSRQ *srq, struct ibv_srq_attr *srq_attr);<br>
-int rdma_backend_modify_srq(RdmaBackendSRQ *srq, struct ibv_srq_attr *srq_attr,<br>
- int srq_attr_mask);<br>
-void rdma_backend_destroy_srq(RdmaBackendSRQ *srq,<br>
- RdmaDeviceResources *dev_res);<br>
-void rdma_backend_post_srq_recv(RdmaBackendDev *backend_dev,<br>
- RdmaBackendSRQ *srq, struct ibv_sge *sge,<br>
- uint32_t num_sge, void *ctx);<br>
-<br>
-#endif<br>
diff --git a/hw/rdma/rdma_backend_defs.h b/hw/rdma/rdma_backend_defs.h<br>
deleted file mode 100644<br>
index 4e6c0ad695..0000000000<br>
--- a/hw/rdma/rdma_backend_defs.h<br>
+++ /dev/null<br>
@@ -1,76 +0,0 @@<br>
-/*<br>
- * RDMA device: Definitions of Backend Device structures<br>
- *<br>
- * Copyright (C) 2018 Oracle<br>
- * Copyright (C) 2018 Red Hat Inc<br>
- *<br>
- * Authors:<br>
- * Yuval Shaia <<a href="mailto:yuval.shaia@oracle.com" target="_blank" rel="noreferrer">yuval.shaia@oracle.com</a>><br>
- * Marcel Apfelbaum <<a href="mailto:marcel@redhat.com" target="_blank" rel="noreferrer">marcel@redhat.com</a>><br>
- *<br>
- * This work is licensed under the terms of the GNU GPL, version 2 or later.<br>
- * See the COPYING file in the top-level directory.<br>
- *<br>
- */<br>
-<br>
-#ifndef RDMA_BACKEND_DEFS_H<br>
-#define RDMA_BACKEND_DEFS_H<br>
-<br>
-#include "qemu/thread.h"<br>
-#include "chardev/char-fe.h"<br>
-#include <infiniband/verbs.h><br>
-#include "contrib/rdmacm-mux/rdmacm-mux.h"<br>
-#include "rdma_utils.h"<br>
-<br>
-typedef struct RdmaDeviceResources RdmaDeviceResources;<br>
-<br>
-typedef struct RdmaBackendThread {<br>
- QemuThread thread;<br>
- bool run; /* Set by thread manager to let thread know it should exit */<br>
- bool is_running; /* Set by the thread to report its status */<br>
-} RdmaBackendThread;<br>
-<br>
-typedef struct RdmaCmMux {<br>
- CharBackend *chr_be;<br>
- int can_receive;<br>
-} RdmaCmMux;<br>
-<br>
-typedef struct RdmaBackendDev {<br>
- RdmaBackendThread comp_thread;<br>
- PCIDevice *dev;<br>
- RdmaDeviceResources *rdma_dev_res;<br>
- struct ibv_device *ib_dev;<br>
- struct ibv_context *context;<br>
- struct ibv_comp_channel *channel;<br>
- uint8_t port_num;<br>
- RdmaProtectedGQueue recv_mads_list;<br>
- RdmaCmMux rdmacm_mux;<br>
-} RdmaBackendDev;<br>
-<br>
-typedef struct RdmaBackendPD {<br>
- struct ibv_pd *ibpd;<br>
-} RdmaBackendPD;<br>
-<br>
-typedef struct RdmaBackendMR {<br>
- struct ibv_pd *ibpd;<br>
- struct ibv_mr *ibmr;<br>
-} RdmaBackendMR;<br>
-<br>
-typedef struct RdmaBackendCQ {<br>
- RdmaBackendDev *backend_dev;<br>
- struct ibv_cq *ibcq;<br>
-} RdmaBackendCQ;<br>
-<br>
-typedef struct RdmaBackendQP {<br>
- struct ibv_pd *ibpd;<br>
- struct ibv_qp *ibqp;<br>
- uint8_t sgid_idx;<br>
- RdmaProtectedGSList cqe_ctx_list;<br>
-} RdmaBackendQP;<br>
-<br>
-typedef struct RdmaBackendSRQ {<br>
- struct ibv_srq *ibsrq;<br>
- RdmaProtectedGSList cqe_ctx_list;<br>
-} RdmaBackendSRQ;<br>
-<br>
-#endif<br>
diff --git a/hw/rdma/rdma_rm.h b/hw/rdma/rdma_rm.h<br>
deleted file mode 100644<br>
index d69a917795..0000000000<br>
--- a/hw/rdma/rdma_rm.h<br>
+++ /dev/null<br>
@@ -1,97 +0,0 @@<br>
-/*<br>
- * RDMA device: Definitions of Resource Manager functions<br>
- *<br>
- * Copyright (C) 2018 Oracle<br>
- * Copyright (C) 2018 Red Hat Inc<br>
- *<br>
- * Authors:<br>
- * Yuval Shaia <<a href="mailto:yuval.shaia@oracle.com" target="_blank" rel="noreferrer">yuval.shaia@oracle.com</a>><br>
- * Marcel Apfelbaum <<a href="mailto:marcel@redhat.com" target="_blank" rel="noreferrer">marcel@redhat.com</a>><br>
- *<br>
- * This work is licensed under the terms of the GNU GPL, version 2 or later.<br>
- * See the COPYING file in the top-level directory.<br>
- *<br>
- */<br>
-<br>
-#ifndef RDMA_RM_H<br>
-#define RDMA_RM_H<br>
-<br>
-#include "qapi/error.h"<br>
-#include "rdma_backend_defs.h"<br>
-#include "rdma_rm_defs.h"<br>
-<br>
-int rdma_rm_init(RdmaDeviceResources *dev_res,<br>
- struct ibv_device_attr *dev_attr);<br>
-void rdma_rm_fini(RdmaDeviceResources *dev_res, RdmaBackendDev *backend_dev,<br>
- const char *ifname);<br>
-<br>
-int rdma_rm_alloc_pd(RdmaDeviceResources *dev_res, RdmaBackendDev *backend_dev,<br>
- uint32_t *pd_handle, uint32_t ctx_handle);<br>
-RdmaRmPD *rdma_rm_get_pd(RdmaDeviceResources *dev_res, uint32_t pd_handle);<br>
-void rdma_rm_dealloc_pd(RdmaDeviceResources *dev_res, uint32_t pd_handle);<br>
-<br>
-int rdma_rm_alloc_mr(RdmaDeviceResources *dev_res, uint32_t pd_handle,<br>
- uint64_t guest_start, uint64_t guest_length,<br>
- void *host_virt, int access_flags, uint32_t *mr_handle,<br>
- uint32_t *lkey, uint32_t *rkey);<br>
-RdmaRmMR *rdma_rm_get_mr(RdmaDeviceResources *dev_res, uint32_t mr_handle);<br>
-void rdma_rm_dealloc_mr(RdmaDeviceResources *dev_res, uint32_t mr_handle);<br>
-<br>
-int rdma_rm_alloc_uc(RdmaDeviceResources *dev_res, uint32_t pfn,<br>
- uint32_t *uc_handle);<br>
-RdmaRmUC *rdma_rm_get_uc(RdmaDeviceResources *dev_res, uint32_t uc_handle);<br>
-void rdma_rm_dealloc_uc(RdmaDeviceResources *dev_res, uint32_t uc_handle);<br>
-<br>
-int rdma_rm_alloc_cq(RdmaDeviceResources *dev_res, RdmaBackendDev *backend_dev,<br>
- uint32_t cqe, uint32_t *cq_handle, void *opaque);<br>
-RdmaRmCQ *rdma_rm_get_cq(RdmaDeviceResources *dev_res, uint32_t cq_handle);<br>
-void rdma_rm_req_notify_cq(RdmaDeviceResources *dev_res, uint32_t cq_handle,<br>
- bool notify);<br>
-void rdma_rm_dealloc_cq(RdmaDeviceResources *dev_res, uint32_t cq_handle);<br>
-<br>
-int rdma_rm_alloc_qp(RdmaDeviceResources *dev_res, uint32_t pd_handle,<br>
- uint8_t qp_type, uint32_t max_send_wr,<br>
- uint32_t max_send_sge, uint32_t send_cq_handle,<br>
- uint32_t max_recv_wr, uint32_t max_recv_sge,<br>
- uint32_t recv_cq_handle, void *opaque, uint32_t *qpn,<br>
- uint8_t is_srq, uint32_t srq_handle);<br>
-RdmaRmQP *rdma_rm_get_qp(RdmaDeviceResources *dev_res, uint32_t qpn);<br>
-int rdma_rm_modify_qp(RdmaDeviceResources *dev_res, RdmaBackendDev *backend_dev,<br>
- uint32_t qp_handle, uint32_t attr_mask, uint8_t sgid_idx,<br>
- union ibv_gid *dgid, uint32_t dqpn,<br>
- enum ibv_qp_state qp_state, uint32_t qkey,<br>
- uint32_t rq_psn, uint32_t sq_psn);<br>
-int rdma_rm_query_qp(RdmaDeviceResources *dev_res, RdmaBackendDev *backend_dev,<br>
- uint32_t qp_handle, struct ibv_qp_attr *attr,<br>
- int attr_mask, struct ibv_qp_init_attr *init_attr);<br>
-void rdma_rm_dealloc_qp(RdmaDeviceResources *dev_res, uint32_t qp_handle);<br>
-<br>
-RdmaRmSRQ *rdma_rm_get_srq(RdmaDeviceResources *dev_res, uint32_t srq_handle);<br>
-int rdma_rm_alloc_srq(RdmaDeviceResources *dev_res, uint32_t pd_handle,<br>
- uint32_t max_wr, uint32_t max_sge, uint32_t srq_limit,<br>
- uint32_t *srq_handle, void *opaque);<br>
-int rdma_rm_query_srq(RdmaDeviceResources *dev_res, uint32_t srq_handle,<br>
- struct ibv_srq_attr *srq_attr);<br>
-int rdma_rm_modify_srq(RdmaDeviceResources *dev_res, uint32_t srq_handle,<br>
- struct ibv_srq_attr *srq_attr, int srq_attr_mask);<br>
-void rdma_rm_dealloc_srq(RdmaDeviceResources *dev_res, uint32_t srq_handle);<br>
-<br>
-int rdma_rm_alloc_cqe_ctx(RdmaDeviceResources *dev_res, uint32_t *cqe_ctx_id,<br>
- void *ctx);<br>
-void *rdma_rm_get_cqe_ctx(RdmaDeviceResources *dev_res, uint32_t cqe_ctx_id);<br>
-void rdma_rm_dealloc_cqe_ctx(RdmaDeviceResources *dev_res, uint32_t cqe_ctx_id);<br>
-<br>
-int rdma_rm_add_gid(RdmaDeviceResources *dev_res, RdmaBackendDev *backend_dev,<br>
- const char *ifname, union ibv_gid *gid, int gid_idx);<br>
-int rdma_rm_del_gid(RdmaDeviceResources *dev_res, RdmaBackendDev *backend_dev,<br>
- const char *ifname, int gid_idx);<br>
-int rdma_rm_get_backend_gid_index(RdmaDeviceResources *dev_res,<br>
- RdmaBackendDev *backend_dev, int sgid_idx);<br>
-static inline union ibv_gid *rdma_rm_get_gid(RdmaDeviceResources *dev_res,<br>
- int sgid_idx)<br>
-{<br>
- return &dev_res->port.gid_tbl[sgid_idx].gid;<br>
-}<br>
-void rdma_format_device_counters(RdmaDeviceResources *dev_res, GString *buf);<br>
-<br>
-#endif<br>
diff --git a/hw/rdma/rdma_rm_defs.h b/hw/rdma/rdma_rm_defs.h<br>
deleted file mode 100644<br>
index 534f2f74d3..0000000000<br>
--- a/hw/rdma/rdma_rm_defs.h<br>
+++ /dev/null<br>
@@ -1,146 +0,0 @@<br>
-/*<br>
- * RDMA device: Definitions of Resource Manager structures<br>
- *<br>
- * Copyright (C) 2018 Oracle<br>
- * Copyright (C) 2018 Red Hat Inc<br>
- *<br>
- * Authors:<br>
- * Yuval Shaia <<a href="mailto:yuval.shaia@oracle.com" target="_blank" rel="noreferrer">yuval.shaia@oracle.com</a>><br>
- * Marcel Apfelbaum <<a href="mailto:marcel@redhat.com" target="_blank" rel="noreferrer">marcel@redhat.com</a>><br>
- *<br>
- * This work is licensed under the terms of the GNU GPL, version 2 or later.<br>
- * See the COPYING file in the top-level directory.<br>
- *<br>
- */<br>
-<br>
-#ifndef RDMA_RM_DEFS_H<br>
-#define RDMA_RM_DEFS_H<br>
-<br>
-#include "rdma_backend_defs.h"<br>
-<br>
-#define MAX_PORTS 1 /* Do not change - we support only one port */<br>
-#define MAX_PORT_GIDS 255<br>
-#define MAX_GIDS MAX_PORT_GIDS<br>
-#define MAX_PORT_PKEYS 1<br>
-#define MAX_PKEYS MAX_PORT_PKEYS<br>
-#define MAX_UCS 512<br>
-#define MAX_MR_SIZE (1UL << 27)<br>
-#define MAX_QP 1024<br>
-#define MAX_SGE 4<br>
-#define MAX_CQ 2048<br>
-#define MAX_MR 1024<br>
-#define MAX_PD 1024<br>
-#define MAX_QP_RD_ATOM 16<br>
-#define MAX_QP_INIT_RD_ATOM 16<br>
-#define MAX_AH 64<br>
-#define MAX_SRQ 512<br>
-<br>
-#define MAX_RM_TBL_NAME 16<br>
-#define MAX_CONSEQ_EMPTY_POLL_CQ 4096 /* considered as error above this */<br>
-<br>
-typedef struct RdmaRmResTbl {<br>
- char name[MAX_RM_TBL_NAME];<br>
- QemuMutex lock;<br>
- unsigned long *bitmap;<br>
- size_t tbl_sz;<br>
- size_t res_sz;<br>
- void *tbl;<br>
- uint32_t used; /* number of used entries in the table */<br>
-} RdmaRmResTbl;<br>
-<br>
-typedef struct RdmaRmPD {<br>
- RdmaBackendPD backend_pd;<br>
- uint32_t ctx_handle;<br>
-} RdmaRmPD;<br>
-<br>
-typedef enum CQNotificationType {<br>
- CNT_CLEAR,<br>
- CNT_ARM,<br>
- CNT_SET,<br>
-} CQNotificationType;<br>
-<br>
-typedef struct RdmaRmCQ {<br>
- RdmaBackendCQ backend_cq;<br>
- void *opaque;<br>
- CQNotificationType notify;<br>
-} RdmaRmCQ;<br>
-<br>
-/* MR (DMA region) */<br>
-typedef struct RdmaRmMR {<br>
- RdmaBackendMR backend_mr;<br>
- void *virt;<br>
- uint64_t start;<br>
- size_t length;<br>
- uint32_t pd_handle;<br>
- uint32_t lkey;<br>
- uint32_t rkey;<br>
-} RdmaRmMR;<br>
-<br>
-typedef struct RdmaRmUC {<br>
- uint64_t uc_handle;<br>
-} RdmaRmUC;<br>
-<br>
-typedef struct RdmaRmQP {<br>
- RdmaBackendQP backend_qp;<br>
- void *opaque;<br>
- uint32_t qp_type;<br>
- uint32_t qpn;<br>
- uint32_t send_cq_handle;<br>
- uint32_t recv_cq_handle;<br>
- enum ibv_qp_state qp_state;<br>
- uint8_t is_srq;<br>
-} RdmaRmQP;<br>
-<br>
-typedef struct RdmaRmSRQ {<br>
- RdmaBackendSRQ backend_srq;<br>
- uint32_t recv_cq_handle;<br>
- void *opaque;<br>
-} RdmaRmSRQ;<br>
-<br>
-typedef struct RdmaRmGid {<br>
- union ibv_gid gid;<br>
- int backend_gid_index;<br>
-} RdmaRmGid;<br>
-<br>
-typedef struct RdmaRmPort {<br>
- RdmaRmGid gid_tbl[MAX_PORT_GIDS];<br>
- enum ibv_port_state state;<br>
-} RdmaRmPort;<br>
-<br>
-typedef struct RdmaRmStats {<br>
- uint64_t tx;<br>
- uint64_t tx_len;<br>
- uint64_t tx_err;<br>
- uint64_t rx_bufs;<br>
- uint64_t rx_bufs_len;<br>
- uint64_t rx_bufs_err;<br>
- uint64_t rx_srq;<br>
- uint64_t completions;<br>
- uint64_t mad_tx;<br>
- uint64_t mad_tx_err;<br>
- uint64_t mad_rx;<br>
- uint64_t mad_rx_err;<br>
- uint64_t mad_rx_bufs;<br>
- uint64_t mad_rx_bufs_err;<br>
- uint64_t poll_cq_from_bk;<br>
- uint64_t poll_cq_from_guest;<br>
- uint64_t poll_cq_from_guest_empty;<br>
- uint64_t poll_cq_ppoll_to;<br>
- uint32_t missing_cqe;<br>
-} RdmaRmStats;<br>
-<br>
-struct RdmaDeviceResources {<br>
- RdmaRmPort port;<br>
- RdmaRmResTbl pd_tbl;<br>
- RdmaRmResTbl mr_tbl;<br>
- RdmaRmResTbl uc_tbl;<br>
- RdmaRmResTbl qp_tbl;<br>
- RdmaRmResTbl cq_tbl;<br>
- RdmaRmResTbl cqe_ctx_tbl;<br>
- RdmaRmResTbl srq_tbl;<br>
- GHashTable *qp_hash; /* Keeps mapping between real and emulated */<br>
- QemuMutex lock;<br>
- RdmaRmStats stats;<br>
-};<br>
-<br>
-#endif<br>
diff --git a/hw/rdma/rdma_utils.h b/hw/rdma/rdma_utils.h<br>
deleted file mode 100644<br>
index 54e4f56edd..0000000000<br>
--- a/hw/rdma/rdma_utils.h<br>
+++ /dev/null<br>
@@ -1,63 +0,0 @@<br>
-/*<br>
- * RDMA device: Debug utilities<br>
- *<br>
- * Copyright (C) 2018 Oracle<br>
- * Copyright (C) 2018 Red Hat Inc<br>
- *<br>
- *<br>
- * Authors:<br>
- * Yuval Shaia <<a href="mailto:yuval.shaia@oracle.com" target="_blank" rel="noreferrer">yuval.shaia@oracle.com</a>><br>
- * Marcel Apfelbaum <<a href="mailto:marcel@redhat.com" target="_blank" rel="noreferrer">marcel@redhat.com</a>><br>
- *<br>
- * This work is licensed under the terms of the GNU GPL, version 2 or later.<br>
- * See the COPYING file in the top-level directory.<br>
- *<br>
- */<br>
-<br>
-#ifndef RDMA_UTILS_H<br>
-#define RDMA_UTILS_H<br>
-<br>
-#include "qemu/error-report.h"<br>
-#include "sysemu/dma.h"<br>
-<br>
-#define rdma_error_report(fmt, ...) \<br>
- error_report("%s: " fmt, "rdma", ## __VA_ARGS__)<br>
-#define rdma_warn_report(fmt, ...) \<br>
- warn_report("%s: " fmt, "rdma", ## __VA_ARGS__)<br>
-#define rdma_info_report(fmt, ...) \<br>
- info_report("%s: " fmt, "rdma", ## __VA_ARGS__)<br>
-<br>
-typedef struct RdmaProtectedGQueue {<br>
- QemuMutex lock;<br>
- GQueue *list;<br>
-} RdmaProtectedGQueue;<br>
-<br>
-typedef struct RdmaProtectedGSList {<br>
- QemuMutex lock;<br>
- GSList *list;<br>
-} RdmaProtectedGSList;<br>
-<br>
-void *rdma_pci_dma_map(PCIDevice *dev, dma_addr_t addr, dma_addr_t len);<br>
-void rdma_pci_dma_unmap(PCIDevice *dev, void *buffer, dma_addr_t len);<br>
-void rdma_protected_gqueue_init(RdmaProtectedGQueue *list);<br>
-void rdma_protected_gqueue_destroy(RdmaProtectedGQueue *list);<br>
-void rdma_protected_gqueue_append_int64(RdmaProtectedGQueue *list,<br>
- int64_t value);<br>
-int64_t rdma_protected_gqueue_pop_int64(RdmaProtectedGQueue *list);<br>
-void rdma_protected_gslist_init(RdmaProtectedGSList *list);<br>
-void rdma_protected_gslist_destroy(RdmaProtectedGSList *list);<br>
-void rdma_protected_gslist_append_int32(RdmaProtectedGSList *list,<br>
- int32_t value);<br>
-void rdma_protected_gslist_remove_int32(RdmaProtectedGSList *list,<br>
- int32_t value);<br>
-<br>
-static inline void addrconf_addr_eui48(uint8_t *eui, const char *addr)<br>
-{<br>
- memcpy(eui, addr, 3);<br>
- eui[3] = 0xFF;<br>
- eui[4] = 0xFE;<br>
- memcpy(eui + 5, addr + 3, 3);<br>
- eui[0] ^= 2;<br>
-}<br>
-<br>
-#endif<br>
diff --git a/hw/rdma/trace.h b/hw/rdma/trace.h<br>
deleted file mode 100644<br>
index b3fa8ebc51..0000000000<br>
--- a/hw/rdma/trace.h<br>
+++ /dev/null<br>
@@ -1 +0,0 @@<br>
-#include "trace/trace-hw_rdma.h"<br>
diff --git a/hw/rdma/vmw/pvrdma.h b/hw/rdma/vmw/pvrdma.h<br>
deleted file mode 100644<br>
index 4cbc10c980..0000000000<br>
--- a/hw/rdma/vmw/pvrdma.h<br>
+++ /dev/null<br>
@@ -1,144 +0,0 @@<br>
-/*<br>
- * QEMU VMWARE paravirtual RDMA device definitions<br>
- *<br>
- * Copyright (C) 2018 Oracle<br>
- * Copyright (C) 2018 Red Hat Inc<br>
- *<br>
- * Authors:<br>
- * Yuval Shaia <<a href="mailto:yuval.shaia@oracle.com" target="_blank" rel="noreferrer">yuval.shaia@oracle.com</a>><br>
- * Marcel Apfelbaum <<a href="mailto:marcel@redhat.com" target="_blank" rel="noreferrer">marcel@redhat.com</a>><br>
- *<br>
- * This work is licensed under the terms of the GNU GPL, version 2 or later.<br>
- * See the COPYING file in the top-level directory.<br>
- *<br>
- */<br>
-<br>
-#ifndef PVRDMA_PVRDMA_H<br>
-#define PVRDMA_PVRDMA_H<br>
-<br>
-#include "qemu/units.h"<br>
-#include "qemu/notify.h"<br>
-#include "hw/pci/msix.h"<br>
-#include "hw/pci/pci_device.h"<br>
-#include "chardev/char-fe.h"<br>
-#include "hw/net/vmxnet3_defs.h"<br>
-<br>
-#include "../rdma_backend_defs.h"<br>
-#include "../rdma_rm_defs.h"<br>
-<br>
-#include "standard-headers/drivers/infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h"<br>
-#include "pvrdma_dev_ring.h"<br>
-#include "qom/object.h"<br>
-<br>
-/* BARs */<br>
-#define RDMA_MSIX_BAR_IDX 0<br>
-#define RDMA_REG_BAR_IDX 1<br>
-#define RDMA_UAR_BAR_IDX 2<br>
-#define RDMA_BAR0_MSIX_SIZE (16 * KiB)<br>
-#define RDMA_BAR1_REGS_SIZE 64<br>
-#define RDMA_BAR2_UAR_SIZE (0x1000 * MAX_UCS) /* each uc gets page */<br>
-<br>
-/* MSIX */<br>
-#define RDMA_MAX_INTRS 3<br>
-#define RDMA_MSIX_TABLE 0x0000<br>
-#define RDMA_MSIX_PBA 0x2000<br>
-<br>
-/* Interrupts Vectors */<br>
-#define INTR_VEC_CMD_RING 0<br>
-#define INTR_VEC_CMD_ASYNC_EVENTS 1<br>
-#define INTR_VEC_CMD_COMPLETION_Q 2<br>
-<br>
-/* HW attributes */<br>
-#define PVRDMA_HW_NAME "pvrdma"<br>
-#define PVRDMA_HW_VERSION 17<br>
-#define PVRDMA_FW_VERSION 14<br>
-<br>
-/* Some defaults */<br>
-#define PVRDMA_PKEY 0xFFFF<br>
-<br>
-typedef struct DSRInfo {<br>
- dma_addr_t dma;<br>
- struct pvrdma_device_shared_region *dsr;<br>
-<br>
- union pvrdma_cmd_req *req;<br>
- union pvrdma_cmd_resp *rsp;<br>
-<br>
- PvrdmaRingState *async_ring_state;<br>
- PvrdmaRing async;<br>
-<br>
- PvrdmaRingState *cq_ring_state;<br>
- PvrdmaRing cq;<br>
-} DSRInfo;<br>
-<br>
-typedef struct PVRDMADevStats {<br>
- uint64_t commands;<br>
- uint64_t regs_reads;<br>
- uint64_t regs_writes;<br>
- uint64_t uar_writes;<br>
- uint64_t interrupts;<br>
-} PVRDMADevStats;<br>
-<br>
-struct PVRDMADev {<br>
- PCIDevice parent_obj;<br>
- MemoryRegion msix;<br>
- MemoryRegion regs;<br>
- uint32_t regs_data[RDMA_BAR1_REGS_SIZE];<br>
- MemoryRegion uar;<br>
- uint32_t uar_data[RDMA_BAR2_UAR_SIZE];<br>
- DSRInfo dsr_info;<br>
- int interrupt_mask;<br>
- struct ibv_device_attr dev_attr;<br>
- uint64_t node_guid;<br>
- char *backend_eth_device_name;<br>
- char *backend_device_name;<br>
- uint8_t backend_port_num;<br>
- RdmaBackendDev backend_dev;<br>
- RdmaDeviceResources rdma_dev_res;<br>
- CharBackend mad_chr;<br>
- VMXNET3State *func0;<br>
- Notifier shutdown_notifier;<br>
- PVRDMADevStats stats;<br>
-};<br>
-typedef struct PVRDMADev PVRDMADev;<br>
-DECLARE_INSTANCE_CHECKER(PVRDMADev, PVRDMA_DEV,<br>
- PVRDMA_HW_NAME)<br>
-<br>
-static inline int get_reg_val(PVRDMADev *dev, hwaddr addr, uint32_t *val)<br>
-{<br>
- int idx = addr >> 2;<br>
-<br>
- if (idx >= RDMA_BAR1_REGS_SIZE) {<br>
- return -EINVAL;<br>
- }<br>
-<br>
- *val = dev->regs_data[idx];<br>
-<br>
- return 0;<br>
-}<br>
-<br>
-static inline int set_reg_val(PVRDMADev *dev, hwaddr addr, uint32_t val)<br>
-{<br>
- int idx = addr >> 2;<br>
-<br>
- if (idx >= RDMA_BAR1_REGS_SIZE) {<br>
- return -EINVAL;<br>
- }<br>
-<br>
- dev->regs_data[idx] = val;<br>
-<br>
- return 0;<br>
-}<br>
-<br>
-static inline void post_interrupt(PVRDMADev *dev, unsigned vector)<br>
-{<br>
- PCIDevice *pci_dev = PCI_DEVICE(dev);<br>
-<br>
- if (likely(!dev->interrupt_mask)) {<br>
- dev->stats.interrupts++;<br>
- msix_notify(pci_dev, vector);<br>
- }<br>
-}<br>
-<br>
-int pvrdma_exec_cmd(PVRDMADev *dev);<br>
-<br>
-#endif<br>
diff --git a/hw/rdma/vmw/pvrdma_dev_ring.h b/hw/rdma/vmw/pvrdma_dev_ring.h<br>
deleted file mode 100644<br>
index d231588ce0..0000000000<br>
--- a/hw/rdma/vmw/pvrdma_dev_ring.h<br>
+++ /dev/null<br>
@@ -1,46 +0,0 @@<br>
-/*<br>
- * QEMU VMWARE paravirtual RDMA ring utilities<br>
- *<br>
- * Copyright (C) 2018 Oracle<br>
- * Copyright (C) 2018 Red Hat Inc<br>
- *<br>
- * Authors:<br>
- * Yuval Shaia <<a href="mailto:yuval.shaia@oracle.com" target="_blank" rel="noreferrer">yuval.shaia@oracle.com</a>><br>
- * Marcel Apfelbaum <<a href="mailto:marcel@redhat.com" target="_blank" rel="noreferrer">marcel@redhat.com</a>><br>
- *<br>
- * This work is licensed under the terms of the GNU GPL, version 2 or later.<br>
- * See the COPYING file in the top-level directory.<br>
- *<br>
- */<br>
-<br>
-#ifndef PVRDMA_DEV_RING_H<br>
-#define PVRDMA_DEV_RING_H<br>
-<br>
-<br>
-#define MAX_RING_NAME_SZ 32<br>
-<br>
-typedef struct PvrdmaRingState {<br>
- int prod_tail; /* producer tail */<br>
- int cons_head; /* consumer head */<br>
-} PvrdmaRingState;<br>
-<br>
-typedef struct PvrdmaRing {<br>
- char name[MAX_RING_NAME_SZ];<br>
- PCIDevice *dev;<br>
- uint32_t max_elems;<br>
- size_t elem_sz;<br>
- PvrdmaRingState *ring_state; /* used only for unmap */<br>
- int npages;<br>
- void **pages;<br>
-} PvrdmaRing;<br>
-<br>
-int pvrdma_ring_init(PvrdmaRing *ring, const char *name, PCIDevice *dev,<br>
- PvrdmaRingState *ring_state, uint32_t max_elems,<br>
- size_t elem_sz, dma_addr_t *tbl, uint32_t npages);<br>
-void *pvrdma_ring_next_elem_read(PvrdmaRing *ring);<br>
-void pvrdma_ring_read_inc(PvrdmaRing *ring);<br>
-void *pvrdma_ring_next_elem_write(PvrdmaRing *ring);<br>
-void pvrdma_ring_write_inc(PvrdmaRing *ring);<br>
-void pvrdma_ring_free(PvrdmaRing *ring);<br>
-<br>
-#endif<br>
diff --git a/hw/rdma/vmw/pvrdma_qp_ops.h b/hw/rdma/vmw/pvrdma_qp_ops.h<br>
deleted file mode 100644<br>
index bf2b15c5ce..0000000000<br>
--- a/hw/rdma/vmw/pvrdma_qp_ops.h<br>
+++ /dev/null<br>
@@ -1,28 +0,0 @@<br>
-/*<br>
- * QEMU VMWARE paravirtual RDMA QP Operations<br>
- *<br>
- * Copyright (C) 2018 Oracle<br>
- * Copyright (C) 2018 Red Hat Inc<br>
- *<br>
- * Authors:<br>
- * Yuval Shaia <<a href="mailto:yuval.shaia@oracle.com" target="_blank" rel="noreferrer">yuval.shaia@oracle.com</a>><br>
- * Marcel Apfelbaum <<a href="mailto:marcel@redhat.com" target="_blank" rel="noreferrer">marcel@redhat.com</a>><br>
- *<br>
- * This work is licensed under the terms of the GNU GPL, version 2 or later.<br>
- * See the COPYING file in the top-level directory.<br>
- *<br>
- */<br>
-<br>
-#ifndef PVRDMA_QP_OPS_H<br>
-#define PVRDMA_QP_OPS_H<br>
-<br>
-#include "pvrdma.h"<br>
-<br>
-int pvrdma_qp_ops_init(void);<br>
-void pvrdma_qp_ops_fini(void);<br>
-void pvrdma_qp_send(PVRDMADev *dev, uint32_t qp_handle);<br>
-void pvrdma_qp_recv(PVRDMADev *dev, uint32_t qp_handle);<br>
-void pvrdma_srq_recv(PVRDMADev *dev, uint32_t srq_handle);<br>
-void pvrdma_cq_poll(RdmaDeviceResources *dev_res, uint32_t cq_handle);<br>
-<br>
-#endif<br>
diff --git a/hw/rdma/vmw/trace.h b/hw/rdma/vmw/trace.h<br>
deleted file mode 100644<br>
index 3ebc9fb7ad..0000000000<br>
--- a/hw/rdma/vmw/trace.h<br>
+++ /dev/null<br>
@@ -1 +0,0 @@<br>
-#include "trace/trace-hw_rdma_vmw.h"<br>
diff --git a/include/hw/rdma/rdma.h b/include/hw/rdma/rdma.h<br>
deleted file mode 100644<br>
index 80b2e531c4..0000000000<br>
--- a/include/hw/rdma/rdma.h<br>
+++ /dev/null<br>
@@ -1,37 +0,0 @@<br>
-/*<br>
- * RDMA device interface<br>
- *<br>
- * Copyright (C) 2019 Oracle<br>
- * Copyright (C) 2019 Red Hat Inc<br>
- *<br>
- * Authors:<br>
- * Yuval Shaia <<a href="mailto:yuval.shaia@oracle.com" target="_blank" rel="noreferrer">yuval.shaia@oracle.com</a>><br>
- *<br>
- * This work is licensed under the terms of the GNU GPL, version 2 or later.<br>
- * See the COPYING file in the top-level directory.<br>
- *<br>
- */<br>
-<br>
-#ifndef RDMA_H<br>
-#define RDMA_H<br>
-<br>
-#include "qom/object.h"<br>
-<br>
-#define INTERFACE_RDMA_PROVIDER "rdma"<br>
-<br>
-typedef struct RdmaProviderClass RdmaProviderClass;<br>
-DECLARE_CLASS_CHECKERS(RdmaProviderClass, RDMA_PROVIDER,<br>
- INTERFACE_RDMA_PROVIDER)<br>
-#define RDMA_PROVIDER(obj) \<br>
- INTERFACE_CHECK(RdmaProvider, (obj), \<br>
- INTERFACE_RDMA_PROVIDER)<br>
-<br>
-typedef struct RdmaProvider RdmaProvider;<br>
-<br>
-struct RdmaProviderClass {<br>
- InterfaceClass parent;<br>
-<br>
- void (*format_statistics)(RdmaProvider *obj, GString *buf);<br>
-};<br>
-<br>
-#endif<br>
diff --git a/include/monitor/hmp.h b/include/monitor/hmp.h<br>
index 13f9a2dedb..f4cf8f6717 100644<br>
--- a/include/monitor/hmp.h<br>
+++ b/include/monitor/hmp.h<br>
@@ -37,7 +37,6 @@ void hmp_info_spice(Monitor *mon, const QDict *qdict);<br>
void hmp_info_balloon(Monitor *mon, const QDict *qdict);<br>
void hmp_info_irq(Monitor *mon, const QDict *qdict);<br>
void hmp_info_pic(Monitor *mon, const QDict *qdict);<br>
-void hmp_info_rdma(Monitor *mon, const QDict *qdict);<br>
void hmp_info_pci(Monitor *mon, const QDict *qdict);<br>
void hmp_info_tpm(Monitor *mon, const QDict *qdict);<br>
void hmp_info_iothreads(Monitor *mon, const QDict *qdict);<br>
diff --git a/include/standard-headers/drivers/infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h b/include/standard-headers/drivers/infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h<br>
deleted file mode 100644<br>
index a5a1c8234e..0000000000<br>
--- a/include/standard-headers/drivers/infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h<br>
+++ /dev/null<br>
@@ -1,685 +0,0 @@<br>
-/*<br>
- * Copyright (c) 2012-2016 VMware, Inc. All rights reserved.<br>
- *<br>
- * This program is free software; you can redistribute it and/or<br>
- * modify it under the terms of EITHER the GNU General Public License<br>
- * version 2 as published by the Free Software Foundation or the BSD<br>
- * 2-Clause License. This program is distributed in the hope that it<br>
- * will be useful, but WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED<br>
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.<br>
- * See the GNU General Public License version 2 for more details at<br>
- * <a href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html" rel="noreferrer noreferrer" target="_blank"></a></blockquote></div></div></div>