[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] usage of mremap in pvrdma break FreeBSD build
From: |
Roger Pau Monné |
Subject: |
Re: [Qemu-devel] usage of mremap in pvrdma break FreeBSD build |
Date: |
Fri, 24 Aug 2018 19:18:10 +0200 |
User-agent: |
NeoMutt/20180716 |
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/address@hidden/address@hidden/
Thanks! And sorry for the noise.
Roger.