On Fri, Aug 24, 2018 at 07:49:01PM +0300, Marcel Apfelbaum wrote: > Hi Roger, > > > On 08/24/2018 06:58 PM, Roger Pau Monné wrote: > > Hello, > > > > The usage of mremap in the pvrdma code breaks the build on FreeBSD: > > > > /root/src/xen/tools/qemu-xen-dir/hw/rdma/vmw/pvrdma_cmd.c:60:17: warning: > > implicit declaration of > > function 'mremap' is invalid in C99 [-Wimplicit-function-declaration] > > host_virt = mremap(curr_page, 0, length, MREMAP_MAYMOVE); > > ^ > > /root/src/xen/tools/qemu-xen-dir/hw/rdma/vmw/pvrdma_cmd.c:60:17: warning: > > this function > > declaration is not a prototype [-Wstrict-prototypes] > > /root/src/xen/tools/qemu-xen-dir/hw/rdma/vmw/pvrdma_cmd.c:60:46: error: use > > of undeclared > > identifier 'MREMAP_MAYMOVE' > > host_virt = mremap(curr_page, 0, length, MREMAP_MAYMOVE); > > ^ > > /root/src/xen/tools/qemu-xen-dir/hw/rdma/vmw/pvrdma_cmd.c:97:48: error: use > > of undeclared > > identifier 'MREMAP_MAYMOVE' > > mremap(curr_page, 0, TARGET_PAGE_SIZE, MREMAP_MAYMOVE | > > MREMAP_FIXED, > > ^ > > /root/src/xen/tools/qemu-xen-dir/hw/rdma/vmw/pvrdma_cmd.c:97:65: error: use > > of undeclared > > identifier 'MREMAP_FIXED' > > mremap(curr_page, 0, TARGET_PAGE_SIZE, MREMAP_MAYMOVE | > > MREMAP_FIXED, > > ^ > > > > FreeBSD has librdma in base so by default QEMU configure script will > > enable the build of the rdma bits in QEMU. Sadly this code uses mremap > > which is Linux-specific. > > > > AFAICT either the build of pvrdma is limited to Linux in the configure > > script, or the calls to mremap are replaced with a portable > > equivalent. > > > > Thanks, Roger. > > A fix has been submitted and merged: > > https://patchew.org/QEMU/20180819202300.10590-1-marcel.apfelb...@gmail.com/20180819202300.10590-16-marcel.apfelb...@gmail.com/
Thanks! And sorry for the noise. Roger.