summaryrefslogtreecommitdiffstats
path: root/hw/rdma/vmw/pvrdma_main.c
diff options
context:
space:
mode:
authorYuval Shaia2019-08-18 15:21:07 +0200
committerMarcel Apfelbaum2019-11-06 11:49:04 +0100
commit68b89aee710ab48b3dcaaa721bbc5d8aa5ea24d1 (patch)
tree9f3ecdbdc16421e3f88198a038995e0d2cad5038 /hw/rdma/vmw/pvrdma_main.c
parentconfigure: Check if we can use ibv_reg_mr_iova (diff)
downloadqemu-68b89aee710ab48b3dcaaa721bbc5d8aa5ea24d1.tar.gz
qemu-68b89aee710ab48b3dcaaa721bbc5d8aa5ea24d1.tar.xz
qemu-68b89aee710ab48b3dcaaa721bbc5d8aa5ea24d1.zip
hw/rdma: Utilize ibv_reg_mr_iova for memory registration
The virtual address that is provided by the guest in post_send and post_recv operations is related to the guest address space. This address space is unknown to the HCA resides on host so extra step in these operations is needed to adjust the address to host virtual address. This step, which is done in data-path affects performances. An enhanced verion of MR registration introduced here https://patchwork.kernel.org/patch/11044467/ can be used so that the guest virtual address space for this MR is known to the HCA in host. This will save the data-path adjustment. Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> Message-Id: <20190818132107.18181-3-yuval.shaia@oracle.com> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Diffstat (limited to 'hw/rdma/vmw/pvrdma_main.c')
-rw-r--r--hw/rdma/vmw/pvrdma_main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c
index 3722d9e772..6f0fc405c7 100644
--- a/hw/rdma/vmw/pvrdma_main.c
+++ b/hw/rdma/vmw/pvrdma_main.c
@@ -664,6 +664,12 @@ static void pvrdma_realize(PCIDevice *pdev, Error **errp)
dev->shutdown_notifier.notify = pvrdma_shutdown_notifier;
qemu_register_shutdown_notifier(&dev->shutdown_notifier);
+#ifdef LEGACY_RDMA_REG_MR
+ rdma_info_report("Using legacy reg_mr");
+#else
+ rdma_info_report("Using iova reg_mr");
+#endif
+
out:
if (rc) {
pvrdma_fini(pdev);