All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] RDMA wrongly detected as being supported on FreeBSD
@ 2018-07-25  4:47 Rebecca Cran
  2018-07-25  7:32 ` Thomas Huth
  0 siblings, 1 reply; 16+ messages in thread
From: Rebecca Cran @ 2018-07-25  4:47 UTC (permalink / raw)
  To: qemu-devel

In commit 18a398f6a39df4b08ff86ac0d38384193ca5f4cc, ./configure on
FreeBSD incorrectly detects RDMA support, with the build subsequently
failing with:

/home/bcran/workspace/qemu/hw/rdma/vmw/pvrdma_cmd.c:19:10: fatal error:
'linux/types.h' file not found
#include <linux/types.h>
         ^~~~~~~~~~~~~~~
1 error generated.
gmake[1]: *** [/home/bcran/workspace/qemu/rules.mak:69:
hw/rdma/vmw/pvrdma_cmd.o] Error 1
gmake[1]: *** Waiting for unfinished jobs....
gmake: *** [Makefile:481: subdir-x86_64-softmmu] Error 2


-- 
Rebecca Cran

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] RDMA wrongly detected as being supported on FreeBSD
  2018-07-25  4:47 [Qemu-devel] RDMA wrongly detected as being supported on FreeBSD Rebecca Cran
@ 2018-07-25  7:32 ` Thomas Huth
  2018-07-25 10:48   ` Marcel Apfelbaum
  2018-07-29  3:08   ` Rebecca Cran
  0 siblings, 2 replies; 16+ messages in thread
From: Thomas Huth @ 2018-07-25  7:32 UTC (permalink / raw)
  To: Rebecca Cran, qemu-devel; +Cc: Peter Maydell, Yuval Shaia, Marcel Apfelbaum

On 25.07.2018 06:47, Rebecca Cran wrote:
> In commit 18a398f6a39df4b08ff86ac0d38384193ca5f4cc, ./configure on
> FreeBSD incorrectly detects RDMA support, with the build subsequently
> failing with:
> 
> /home/bcran/workspace/qemu/hw/rdma/vmw/pvrdma_cmd.c:19:10: fatal error:
> 'linux/types.h' file not found
> #include <linux/types.h>
>          ^~~~~~~~~~~~~~~
> 1 error generated.
> gmake[1]: *** [/home/bcran/workspace/qemu/rules.mak:69:
> hw/rdma/vmw/pvrdma_cmd.o] Error 1
> gmake[1]: *** Waiting for unfinished jobs....
> gmake: *** [Makefile:481: subdir-x86_64-softmmu] Error 2

When was it still working for you the last time? Was it still working
with v3.0-rc1 ? Or just with v2.12 ? Any chance that you could bisect
the problem to determine when it has been introduced?

 Thomas

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] RDMA wrongly detected as being supported on FreeBSD
  2018-07-25  7:32 ` Thomas Huth
@ 2018-07-25 10:48   ` Marcel Apfelbaum
  2018-07-25 10:59     ` Dr. David Alan Gilbert
  2018-07-25 11:14     ` Thomas Huth
  2018-07-29  3:08   ` Rebecca Cran
  1 sibling, 2 replies; 16+ messages in thread
From: Marcel Apfelbaum @ 2018-07-25 10:48 UTC (permalink / raw)
  To: Thomas Huth, Rebecca Cran, qemu-devel; +Cc: Peter Maydell, Yuval Shaia

Hi,

On 07/25/2018 10:32 AM, Thomas Huth wrote:
> On 25.07.2018 06:47, Rebecca Cran wrote:
>> In commit 18a398f6a39df4b08ff86ac0d38384193ca5f4cc, ./configure on
>> FreeBSD incorrectly detects RDMA support,

configure is looking for the rdma related libraries,  if they are there,
the rdma code will be compiled into QEMU.

You can try and run configure with --disable-rdma flag until we find
a solution.

>>   with the build subsequently
>> failing with:
>>
>> /home/bcran/workspace/qemu/hw/rdma/vmw/pvrdma_cmd.c:19:10: fatal error:
>> 'linux/types.h' file not found
>> #include <linux/types.h>
>>           ^~~~~~~~~~~~~~~
Do you have the kernel-headers package installed?

>> 1 error generated.
>> gmake[1]: *** [/home/bcran/workspace/qemu/rules.mak:69:
>> hw/rdma/vmw/pvrdma_cmd.o] Error 1
>> gmake[1]: *** Waiting for unfinished jobs....
>> gmake: *** [Makefile:481: subdir-x86_64-softmmu] Error 2
> When was it still working for you the last time? Was it still working
> with v3.0-rc1 ? Or just with v2.12 ? Any chance that you could bisect
> the problem to determine when it has been introduced?

Good idea.

Thanks,
Marcel

>   Thomas

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] RDMA wrongly detected as being supported on FreeBSD
  2018-07-25 10:48   ` Marcel Apfelbaum
@ 2018-07-25 10:59     ` Dr. David Alan Gilbert
  2018-07-26 16:11       ` Marcel Apfelbaum
  2018-07-25 11:14     ` Thomas Huth
  1 sibling, 1 reply; 16+ messages in thread
From: Dr. David Alan Gilbert @ 2018-07-25 10:59 UTC (permalink / raw)
  To: Marcel Apfelbaum
  Cc: Thomas Huth, Rebecca Cran, qemu-devel, Peter Maydell, Yuval Shaia

* Marcel Apfelbaum (marcel.apfelbaum@gmail.com) wrote:
> Hi,
> 
> On 07/25/2018 10:32 AM, Thomas Huth wrote:
> > On 25.07.2018 06:47, Rebecca Cran wrote:
> > > In commit 18a398f6a39df4b08ff86ac0d38384193ca5f4cc, ./configure on
> > > FreeBSD incorrectly detects RDMA support,
> 
> configure is looking for the rdma related libraries,  if they are there,
> the rdma code will be compiled into QEMU.
> 
> You can try and run configure with --disable-rdma flag until we find
> a solution.

Note that this flag is tied to both the RMDA migration and the RDMA
device emulation; RDMA migration may well be working for the reporter.

Dave

> > >   with the build subsequently
> > > failing with:
> > > 
> > > /home/bcran/workspace/qemu/hw/rdma/vmw/pvrdma_cmd.c:19:10: fatal error:
> > > 'linux/types.h' file not found
> > > #include <linux/types.h>
> > >           ^~~~~~~~~~~~~~~
> Do you have the kernel-headers package installed?
> 
> > > 1 error generated.
> > > gmake[1]: *** [/home/bcran/workspace/qemu/rules.mak:69:
> > > hw/rdma/vmw/pvrdma_cmd.o] Error 1
> > > gmake[1]: *** Waiting for unfinished jobs....
> > > gmake: *** [Makefile:481: subdir-x86_64-softmmu] Error 2
> > When was it still working for you the last time? Was it still working
> > with v3.0-rc1 ? Or just with v2.12 ? Any chance that you could bisect
> > the problem to determine when it has been introduced?
> 
> Good idea.
> 
> Thanks,
> Marcel
> 
> >   Thomas
> 
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] RDMA wrongly detected as being supported on FreeBSD
  2018-07-25 10:48   ` Marcel Apfelbaum
  2018-07-25 10:59     ` Dr. David Alan Gilbert
@ 2018-07-25 11:14     ` Thomas Huth
  2018-07-28  3:50       ` Rebecca Cran
  1 sibling, 1 reply; 16+ messages in thread
From: Thomas Huth @ 2018-07-25 11:14 UTC (permalink / raw)
  To: Marcel Apfelbaum, Rebecca Cran, qemu-devel; +Cc: Peter Maydell, Yuval Shaia

On 25.07.2018 12:48, Marcel Apfelbaum wrote:
> Hi,
> 
> On 07/25/2018 10:32 AM, Thomas Huth wrote:
>> On 25.07.2018 06:47, Rebecca Cran wrote:
>>> In commit 18a398f6a39df4b08ff86ac0d38384193ca5f4cc, ./configure on
>>> FreeBSD incorrectly detects RDMA support,
> 
> configure is looking for the rdma related libraries,  if they are there,
> the rdma code will be compiled into QEMU.
> 
> You can try and run configure with --disable-rdma flag until we find
> a solution.
> 
>>>   with the build subsequently
>>> failing with:
>>>
>>> /home/bcran/workspace/qemu/hw/rdma/vmw/pvrdma_cmd.c:19:10: fatal error:
>>> 'linux/types.h' file not found
>>> #include <linux/types.h>
>>>           ^~~~~~~~~~~~~~~
> Do you have the kernel-headers package installed?

Note that the error has been reported to happen on FreeBSD - so I doubt
that this <linux/types.h> header should be here.

Anyway, our include/standard-headers/linux/types.h is also empty ... so
could you try whether it compiles if you simply remove this #include
line, Rebecca?

 Thomas

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] RDMA wrongly detected as being supported on FreeBSD
  2018-07-25 10:59     ` Dr. David Alan Gilbert
@ 2018-07-26 16:11       ` Marcel Apfelbaum
  0 siblings, 0 replies; 16+ messages in thread
From: Marcel Apfelbaum @ 2018-07-26 16:11 UTC (permalink / raw)
  To: Dr. David Alan Gilbert
  Cc: Thomas Huth, Rebecca Cran, qemu-devel, Peter Maydell, Yuval Shaia



On 07/25/2018 01:59 PM, Dr. David Alan Gilbert wrote:
> * Marcel Apfelbaum (marcel.apfelbaum@gmail.com) wrote:
>> Hi,
>>
>> On 07/25/2018 10:32 AM, Thomas Huth wrote:
>>> On 25.07.2018 06:47, Rebecca Cran wrote:
>>>> In commit 18a398f6a39df4b08ff86ac0d38384193ca5f4cc, ./configure on
>>>> FreeBSD incorrectly detects RDMA support,
>> configure is looking for the rdma related libraries,  if they are there,
>> the rdma code will be compiled into QEMU.
>>
>> You can try and run configure with --disable-rdma flag until we find
>> a solution.
> Note that this flag is tied to both the RMDA migration and the RDMA
> device emulation; RDMA migration may well be working for the reporter.

That's in case they don't care for either RDMA functionality of course -
to be used until we would find a solution.

Thanks,
Marcel

> Dave
>
>>>>    with the build subsequently
>>>> failing with:
>>>>
>>>> /home/bcran/workspace/qemu/hw/rdma/vmw/pvrdma_cmd.c:19:10: fatal error:
>>>> 'linux/types.h' file not found
>>>> #include <linux/types.h>
>>>>            ^~~~~~~~~~~~~~~
>> Do you have the kernel-headers package installed?
>>
>>>> 1 error generated.
>>>> gmake[1]: *** [/home/bcran/workspace/qemu/rules.mak:69:
>>>> hw/rdma/vmw/pvrdma_cmd.o] Error 1
>>>> gmake[1]: *** Waiting for unfinished jobs....
>>>> gmake: *** [Makefile:481: subdir-x86_64-softmmu] Error 2
>>> When was it still working for you the last time? Was it still working
>>> with v3.0-rc1 ? Or just with v2.12 ? Any chance that you could bisect
>>> the problem to determine when it has been introduced?
>> Good idea.
>>
>> Thanks,
>> Marcel
>>
>>>    Thomas
>>
> --
> Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] RDMA wrongly detected as being supported on FreeBSD
  2018-07-25 11:14     ` Thomas Huth
@ 2018-07-28  3:50       ` Rebecca Cran
  2018-08-06  8:51         ` Thomas Huth
  0 siblings, 1 reply; 16+ messages in thread
From: Rebecca Cran @ 2018-07-28  3:50 UTC (permalink / raw)
  To: Thomas Huth, Marcel Apfelbaum, qemu-devel; +Cc: Peter Maydell, Yuval Shaia

On 7/25/18 5:14 AM, Thomas Huth wrote:

>
> Note that the error has been reported to happen on FreeBSD - so I doubt
> that this <linux/types.h> header should be here.
>
> Anyway, our include/standard-headers/linux/types.h is also empty ... so
> could you try whether it compiles if you simply remove this #include
> line, Rebecca?


Sorry for the delay, I'm just getting back to this. Removing the include
causes it to fail later on, with:


/home/bcran/workspace/qemu/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);
                ^
/home/bcran/workspace/qemu/hw/rdma/vmw/pvrdma_cmd.c:60:17: warning: this
function declaration is not a prototype [-Wstrict-prototypes]
/home/bcran/workspace/qemu/hw/rdma/vmw/pvrdma_cmd.c:60:46: error: use of
undeclared identifier 'MREMAP_MAYMOVE'
    host_virt = mremap(curr_page, 0, length, MREMAP_MAYMOVE);
                                             ^
/home/bcran/workspace/qemu/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,
                                               ^
/home/bcran/workspace/qemu/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,


Since I'm not interested in RDMA support, I can work around it by
passing --disable-rdma on the command line.


-- 
Rebecca

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] RDMA wrongly detected as being supported on FreeBSD
  2018-07-25  7:32 ` Thomas Huth
  2018-07-25 10:48   ` Marcel Apfelbaum
@ 2018-07-29  3:08   ` Rebecca Cran
  1 sibling, 0 replies; 16+ messages in thread
From: Rebecca Cran @ 2018-07-29  3:08 UTC (permalink / raw)
  To: Thomas Huth, qemu-devel; +Cc: Peter Maydell, Yuval Shaia

On 7/25/18 1:32 AM, Thomas Huth wrote:
>
> When was it still working for you the last time? Was it still working
> with v3.0-rc1 ? Or just with v2.12 ? Any chance that you could bisect
> the problem to determine when it has been introduced?


I'm not sure if it's FreeBSD that might have changed to cause things to
break as well, since I _am_ running 12.0-CURRENT (i.e. HEAD).

However, I did some bisection and v2.12.0-rc0 and newer is broken, while
v2.11.0 works.


-- 

Rebecca

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] RDMA wrongly detected as being supported on FreeBSD
  2018-07-28  3:50       ` Rebecca Cran
@ 2018-08-06  8:51         ` Thomas Huth
  2018-08-11 16:47           ` Marcel Apfelbaum
  2018-08-15 13:37           ` Kamil Rytarowski
  0 siblings, 2 replies; 16+ messages in thread
From: Thomas Huth @ 2018-08-06  8:51 UTC (permalink / raw)
  To: Rebecca Cran, Marcel Apfelbaum, qemu-devel
  Cc: Peter Maydell, Yuval Shaia, Kamil Rytarowski, Brad Smith

On 07/28/2018 05:50 AM, Rebecca Cran wrote:
> On 7/25/18 5:14 AM, Thomas Huth wrote:
> 
>>
>> Note that the error has been reported to happen on FreeBSD - so I doubt
>> that this <linux/types.h> header should be here.
>>
>> Anyway, our include/standard-headers/linux/types.h is also empty ... so
>> could you try whether it compiles if you simply remove this #include
>> line, Rebecca?
> 
> 
> Sorry for the delay, I'm just getting back to this. Removing the include
> causes it to fail later on, with:
> 
> /home/bcran/workspace/qemu/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);

OK, thanks for checking. According to

 https://www.freebsd.org/cgi/man.cgi?query=mremap&manpath=NetBSD+5.0

that syscall should also be available on FreeBSD. So could you please do
one more test and see whether it works when you add the following line
somewhere at the beginning of the file:

  #include <sys/mman.h>

 Thanks,
  Thomas

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] RDMA wrongly detected as being supported on FreeBSD
  2018-08-06  8:51         ` Thomas Huth
@ 2018-08-11 16:47           ` Marcel Apfelbaum
  2018-08-12  8:39             ` Yuval Shaia
  2018-08-15 13:37           ` Kamil Rytarowski
  1 sibling, 1 reply; 16+ messages in thread
From: Marcel Apfelbaum @ 2018-08-11 16:47 UTC (permalink / raw)
  To: Thomas Huth, Rebecca Cran, qemu-devel
  Cc: Peter Maydell, Yuval Shaia, Kamil Rytarowski, Brad Smith

Hi,

On 08/06/2018 11:51 AM, Thomas Huth wrote:
> On 07/28/2018 05:50 AM, Rebecca Cran wrote:
>> On 7/25/18 5:14 AM, Thomas Huth wrote:
>>
>>> Note that the error has been reported to happen on FreeBSD - so I doubt
>>> that this <linux/types.h> header should be here.
>>>
>>> Anyway, our include/standard-headers/linux/types.h is also empty ... so
>>> could you try whether it compiles if you simply remove this #include
>>> line, Rebecca?
>>
>> Sorry for the delay, I'm just getting back to this. Removing the include
>> causes it to fail later on, with:
>>
>> /home/bcran/workspace/qemu/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);
> OK, thanks for checking. According to
>
>   https://www.freebsd.org/cgi/man.cgi?query=mremap&manpath=NetBSD+5.0
>
> that syscall should also be available on FreeBSD. So could you please do
> one more test and see whether it works when you add the following line
> somewhere at the beginning of the file:
>
>    #include <sys/mman.h>

It took some time, but I finally have a FreeBSD VM with RDMA enabled.

My findings:
- The RDMA libraries are there, so the flag  "RDMA"=yes is set correctly.
- include of <linux/types.h> is not needed, I will remove it.
- In FreeBSD mremap is not implemented in all configurations, it depends
   on some SANITIZER_LINUX flag (Linux emulation?), I think;
   so pvrdma cannot be compiled.  I think we should have a different 
QEMU configuration
   flag --enable-pvrdma that will specifically check it is not a "bsd" 
platform.
   I'll send a patch for that too.

Thanks,
Marcel


>
>   Thanks,
>    Thomas

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] RDMA wrongly detected as being supported on FreeBSD
  2018-08-11 16:47           ` Marcel Apfelbaum
@ 2018-08-12  8:39             ` Yuval Shaia
  2018-08-12 12:10               ` Marcel Apfelbaum
  0 siblings, 1 reply; 16+ messages in thread
From: Yuval Shaia @ 2018-08-12  8:39 UTC (permalink / raw)
  To: Marcel Apfelbaum
  Cc: Thomas Huth, Rebecca Cran, qemu-devel, Peter Maydell,
	Kamil Rytarowski, Brad Smith

On Sat, Aug 11, 2018 at 07:47:49PM +0300, Marcel Apfelbaum wrote:
> Hi,
> 
> On 08/06/2018 11:51 AM, Thomas Huth wrote:
> > On 07/28/2018 05:50 AM, Rebecca Cran wrote:
> > > On 7/25/18 5:14 AM, Thomas Huth wrote:
> > > 
> > > > Note that the error has been reported to happen on FreeBSD - so I doubt
> > > > that this <linux/types.h> header should be here.
> > > > 
> > > > Anyway, our include/standard-headers/linux/types.h is also empty ... so
> > > > could you try whether it compiles if you simply remove this #include
> > > > line, Rebecca?
> > > 
> > > Sorry for the delay, I'm just getting back to this. Removing the include
> > > causes it to fail later on, with:
> > > 
> > > /home/bcran/workspace/qemu/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);
> > OK, thanks for checking. According to
> > 
> >   https://www.freebsd.org/cgi/man.cgi?query=mremap&manpath=NetBSD+5.0
> > 
> > that syscall should also be available on FreeBSD. So could you please do
> > one more test and see whether it works when you add the following line
> > somewhere at the beginning of the file:
> > 
> >    #include <sys/mman.h>
> 
> It took some time, but I finally have a FreeBSD VM with RDMA enabled.
> 
> My findings:
> - The RDMA libraries are there, so the flag  "RDMA"=yes is set correctly.
> - include of <linux/types.h> is not needed, I will remove it.
> - In FreeBSD mremap is not implemented in all configurations, it depends
>   on some SANITIZER_LINUX flag (Linux emulation?), I think;
>   so pvrdma cannot be compiled.  I think we should have a different QEMU
> configuration
>   flag --enable-pvrdma that will specifically check it is not a "bsd"
> platform.

A good idea.

So, do i get it right that you will "revert back" the things we did
to--enable-rdma and do all our stuff in new --enable-pvrdma section?

>   I'll send a patch for that too.
> 
> Thanks,
> Marcel
> 
> 
> > 
> >   Thanks,
> >    Thomas
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] RDMA wrongly detected as being supported on FreeBSD
  2018-08-12  8:39             ` Yuval Shaia
@ 2018-08-12 12:10               ` Marcel Apfelbaum
  0 siblings, 0 replies; 16+ messages in thread
From: Marcel Apfelbaum @ 2018-08-12 12:10 UTC (permalink / raw)
  To: Yuval Shaia
  Cc: Thomas Huth, Rebecca Cran, qemu-devel, Peter Maydell,
	Kamil Rytarowski, Brad Smith



On 08/12/2018 11:39 AM, Yuval Shaia wrote:
> On Sat, Aug 11, 2018 at 07:47:49PM +0300, Marcel Apfelbaum wrote:
>> Hi,
>>
>> On 08/06/2018 11:51 AM, Thomas Huth wrote:
>>> On 07/28/2018 05:50 AM, Rebecca Cran wrote:
>>>> On 7/25/18 5:14 AM, Thomas Huth wrote:
>>>>
>>>>> Note that the error has been reported to happen on FreeBSD - so I doubt
>>>>> that this <linux/types.h> header should be here.
>>>>>
>>>>> Anyway, our include/standard-headers/linux/types.h is also empty ... so
>>>>> could you try whether it compiles if you simply remove this #include
>>>>> line, Rebecca?
>>>> Sorry for the delay, I'm just getting back to this. Removing the include
>>>> causes it to fail later on, with:
>>>>
>>>> /home/bcran/workspace/qemu/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);
>>> OK, thanks for checking. According to
>>>
>>>    https://www.freebsd.org/cgi/man.cgi?query=mremap&manpath=NetBSD+5.0
>>>
>>> that syscall should also be available on FreeBSD. So could you please do
>>> one more test and see whether it works when you add the following line
>>> somewhere at the beginning of the file:
>>>
>>>     #include <sys/mman.h>
>> It took some time, but I finally have a FreeBSD VM with RDMA enabled.
>>
>> My findings:
>> - The RDMA libraries are there, so the flag  "RDMA"=yes is set correctly.
>> - include of <linux/types.h> is not needed, I will remove it.
>> - In FreeBSD mremap is not implemented in all configurations, it depends
>>    on some SANITIZER_LINUX flag (Linux emulation?), I think;
>>    so pvrdma cannot be compiled.  I think we should have a different QEMU
>> configuration
>>    flag --enable-pvrdma that will specifically check it is not a "bsd"
>> platform.
> A good idea.
>
> So, do i get it right that you will "revert back" the things we did
> to--enable-rdma and do all our stuff in new --enable-pvrdma section?

Yes, but I plan to do it as a patch "on top" rather than reverting the 
actual commit.

Thanks,
Marcel

>>    I'll send a patch for that too.
>>
>> Thanks,
>> Marcel
>>
>>
>>>    Thanks,
>>>     Thomas

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] RDMA wrongly detected as being supported on FreeBSD
  2018-08-06  8:51         ` Thomas Huth
  2018-08-11 16:47           ` Marcel Apfelbaum
@ 2018-08-15 13:37           ` Kamil Rytarowski
  2018-08-16  8:55             ` Marcel Apfelbaum
  1 sibling, 1 reply; 16+ messages in thread
From: Kamil Rytarowski @ 2018-08-15 13:37 UTC (permalink / raw)
  To: Thomas Huth, Rebecca Cran, Marcel Apfelbaum, qemu-devel
  Cc: Peter Maydell, Yuval Shaia, Brad Smith

[-- Attachment #1: Type: text/plain, Size: 1411 bytes --]

On 06.08.2018 10:51, Thomas Huth wrote:
> On 07/28/2018 05:50 AM, Rebecca Cran wrote:
>> On 7/25/18 5:14 AM, Thomas Huth wrote:
>>
>>>
>>> Note that the error has been reported to happen on FreeBSD - so I doubt
>>> that this <linux/types.h> header should be here.
>>>
>>> Anyway, our include/standard-headers/linux/types.h is also empty ... so
>>> could you try whether it compiles if you simply remove this #include
>>> line, Rebecca?
>>
>>
>> Sorry for the delay, I'm just getting back to this. Removing the include
>> causes it to fail later on, with:
>>
>> /home/bcran/workspace/qemu/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);
> 
> OK, thanks for checking. According to
> 
>  https://www.freebsd.org/cgi/man.cgi?query=mremap&manpath=NetBSD+5.0
> 
> that syscall should also be available on FreeBSD. So could you please do
> one more test and see whether it works when you add the following line
> somewhere at the beginning of the file:
> 
>   #include <sys/mman.h>
> 
>  Thanks,
>   Thomas
> 

I'm a little bit disoriented. The linked page is from NetBSD in a very
old version 5.x. We have 8.0 out now.

The thread is about FreeBSD. If there are any questions regarding
NetBSD, please let me know.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 850 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] RDMA wrongly detected as being supported on FreeBSD
  2018-08-15 13:37           ` Kamil Rytarowski
@ 2018-08-16  8:55             ` Marcel Apfelbaum
  2018-08-16  9:02               ` Thomas Huth
  0 siblings, 1 reply; 16+ messages in thread
From: Marcel Apfelbaum @ 2018-08-16  8:55 UTC (permalink / raw)
  To: Kamil Rytarowski, Thomas Huth, Rebecca Cran, qemu-devel
  Cc: Peter Maydell, Yuval Shaia, Brad Smith



On 08/15/2018 04:37 PM, Kamil Rytarowski wrote:
> On 06.08.2018 10:51, Thomas Huth wrote:
>> On 07/28/2018 05:50 AM, Rebecca Cran wrote:
>>> On 7/25/18 5:14 AM, Thomas Huth wrote:
>>>
>>>> Note that the error has been reported to happen on FreeBSD - so I doubt
>>>> that this <linux/types.h> header should be here.
>>>>
>>>> Anyway, our include/standard-headers/linux/types.h is also empty ... so
>>>> could you try whether it compiles if you simply remove this #include
>>>> line, Rebecca?
>>>
>>> Sorry for the delay, I'm just getting back to this. Removing the include
>>> causes it to fail later on, with:
>>>
>>> /home/bcran/workspace/qemu/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);
>> OK, thanks for checking. According to
>>
>>   https://www.freebsd.org/cgi/man.cgi?query=mremap&manpath=NetBSD+5.0
>>
>> that syscall should also be available on FreeBSD. So could you please do
>> one more test and see whether it works when you add the following line
>> somewhere at the beginning of the file:
>>
>>    #include <sys/mman.h>
>>
>>   Thanks,
>>    Thomas
>>
> I'm a little bit disoriented. The linked page is from NetBSD in a very
> old version 5.x. We have 8.0 out now.
>
> The thread is about FreeBSD. If there are any questions regarding
> NetBSD, please let me know.

Indeed, the linked page didn't help, we are referring to FreeBSD
which doesn't support mremap, at least by default.

Thanks,
Marcel

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] RDMA wrongly detected as being supported on FreeBSD
  2018-08-16  8:55             ` Marcel Apfelbaum
@ 2018-08-16  9:02               ` Thomas Huth
  2018-08-16  9:07                 ` Marcel Apfelbaum
  0 siblings, 1 reply; 16+ messages in thread
From: Thomas Huth @ 2018-08-16  9:02 UTC (permalink / raw)
  To: Marcel Apfelbaum, Kamil Rytarowski, Rebecca Cran, qemu-devel
  Cc: Peter Maydell, Yuval Shaia, Brad Smith

On 08/16/2018 10:55 AM, Marcel Apfelbaum wrote:
> 
> 
> On 08/15/2018 04:37 PM, Kamil Rytarowski wrote:
>> On 06.08.2018 10:51, Thomas Huth wrote:
>>> On 07/28/2018 05:50 AM, Rebecca Cran wrote:
>>>> On 7/25/18 5:14 AM, Thomas Huth wrote:
>>>>
>>>>> Note that the error has been reported to happen on FreeBSD - so I
>>>>> doubt
>>>>> that this <linux/types.h> header should be here.
>>>>>
>>>>> Anyway, our include/standard-headers/linux/types.h is also empty
>>>>> ... so
>>>>> could you try whether it compiles if you simply remove this #include
>>>>> line, Rebecca?
>>>>
>>>> Sorry for the delay, I'm just getting back to this. Removing the
>>>> include
>>>> causes it to fail later on, with:
>>>>
>>>> /home/bcran/workspace/qemu/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);
>>> OK, thanks for checking. According to
>>>
>>>   https://www.freebsd.org/cgi/man.cgi?query=mremap&manpath=NetBSD+5.0
>>>
>>> that syscall should also be available on FreeBSD. So could you please do
>>> one more test and see whether it works when you add the following line
>>> somewhere at the beginning of the file:
>>>
>>>    #include <sys/mman.h>
>>>
>>>   Thanks,
>>>    Thomas
>>>
>> I'm a little bit disoriented. The linked page is from NetBSD in a very
>> old version 5.x. We have 8.0 out now.
>>
>> The thread is about FreeBSD. If there are any questions regarding
>> NetBSD, please let me know.
> 
> Indeed, the linked page didn't help, we are referring to FreeBSD
> which doesn't support mremap, at least by default.

Sorry, my bad, I was tricked by the freebsd.org domain. So I guess the
right thing to do is a check for mremap in the configure script and only
include that rdma code if mremap is available?

 Thomas

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] RDMA wrongly detected as being supported on FreeBSD
  2018-08-16  9:02               ` Thomas Huth
@ 2018-08-16  9:07                 ` Marcel Apfelbaum
  0 siblings, 0 replies; 16+ messages in thread
From: Marcel Apfelbaum @ 2018-08-16  9:07 UTC (permalink / raw)
  To: Thomas Huth, Kamil Rytarowski, Rebecca Cran, qemu-devel
  Cc: Peter Maydell, Yuval Shaia, Brad Smith



On 08/16/2018 12:02 PM, Thomas Huth wrote:
> On 08/16/2018 10:55 AM, Marcel Apfelbaum wrote:
>>
>> On 08/15/2018 04:37 PM, Kamil Rytarowski wrote:
>>> On 06.08.2018 10:51, Thomas Huth wrote:
>>>> On 07/28/2018 05:50 AM, Rebecca Cran wrote:
>>>>> On 7/25/18 5:14 AM, Thomas Huth wrote:
>>>>>
>>>>>> Note that the error has been reported to happen on FreeBSD - so I
>>>>>> doubt
>>>>>> that this <linux/types.h> header should be here.
>>>>>>
>>>>>> Anyway, our include/standard-headers/linux/types.h is also empty
>>>>>> ... so
>>>>>> could you try whether it compiles if you simply remove this #include
>>>>>> line, Rebecca?
>>>>> Sorry for the delay, I'm just getting back to this. Removing the
>>>>> include
>>>>> causes it to fail later on, with:
>>>>>
>>>>> /home/bcran/workspace/qemu/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);
>>>> OK, thanks for checking. According to
>>>>
>>>>    https://www.freebsd.org/cgi/man.cgi?query=mremap&manpath=NetBSD+5.0
>>>>
>>>> that syscall should also be available on FreeBSD. So could you please do
>>>> one more test and see whether it works when you add the following line
>>>> somewhere at the beginning of the file:
>>>>
>>>>     #include <sys/mman.h>
>>>>
>>>>    Thanks,
>>>>     Thomas
>>>>
>>> I'm a little bit disoriented. The linked page is from NetBSD in a very
>>> old version 5.x. We have 8.0 out now.
>>>
>>> The thread is about FreeBSD. If there are any questions regarding
>>> NetBSD, please let me know.
>> Indeed, the linked page didn't help, we are referring to FreeBSD
>> which doesn't support mremap, at least by default.
> Sorry, my bad, I was tricked by the freebsd.org domain. So I guess the
> right thing to do is a check for mremap in the configure script and only
> include that rdma code if mremap is available?

Only pvrdma should be left out for bsd systems, the RDMA migration
can be compiled. I just sent a patch doing that.

Thanks,
Marcel

>   Thomas

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-08-16  9:08 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-25  4:47 [Qemu-devel] RDMA wrongly detected as being supported on FreeBSD Rebecca Cran
2018-07-25  7:32 ` Thomas Huth
2018-07-25 10:48   ` Marcel Apfelbaum
2018-07-25 10:59     ` Dr. David Alan Gilbert
2018-07-26 16:11       ` Marcel Apfelbaum
2018-07-25 11:14     ` Thomas Huth
2018-07-28  3:50       ` Rebecca Cran
2018-08-06  8:51         ` Thomas Huth
2018-08-11 16:47           ` Marcel Apfelbaum
2018-08-12  8:39             ` Yuval Shaia
2018-08-12 12:10               ` Marcel Apfelbaum
2018-08-15 13:37           ` Kamil Rytarowski
2018-08-16  8:55             ` Marcel Apfelbaum
2018-08-16  9:02               ` Thomas Huth
2018-08-16  9:07                 ` Marcel Apfelbaum
2018-07-29  3:08   ` Rebecca Cran

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.