qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] usage of mremap in pvrdma break FreeBSD build


From: Marcel Apfelbaum
Subject: Re: [Qemu-devel] usage of mremap in pvrdma break FreeBSD build
Date: Fri, 24 Aug 2018 19:49:01 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

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,
Marcel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]