[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] Unikraft: Problem with ordering of header files
Hi all, I was taking an initial look at adding balloning capability to the Xen platform when I came up with an issue that might be related to unikraft or kconfig or I might not be understanding something:
Background: 1. Added a new kconfig option in plat/xen/Config.uk named CONFIG_BALLOON 2. Created a new header file in include/uk/plat/balloon.h 3. Created a new file in plat/xen/balloon.c which includes the following headers:
Snippet of balloon.c:
#if (defined __X86_32__) || (defined __X86_64__) #include <xen-x86/mm.h> #elif (defined __ARM_32__) || (defined __ARM_64__) #include <xen-arm/mm.h> #endif
#include <uk/plat/balloon.h> #include <uk/print.h>
With this header ordering, unikraft builds OK both when CONFIG_BALLOON is set to Y and N.
The issue is that if the header ordering in balloon.c is reversed to the following: Note that now ballon.h comes before mm.h:
#include <uk/plat/balloon.h> #include <uk/print.h>
#if (defined __X86_32__) || (defined __X86_64__) #include <xen-x86/mm.h> #elif (defined __ARM_32__) || (defined __ARM_64__) #include <xen-arm/mm.h> #endif
Then unikraft fails to build when config balloon is selected using kconfig (CONFIG_BALLOON=Y). I have simplified balloon.h to be:
#ifndef _BALLOON_H_ #define _BALLOON_H_
#if CONFIG_BALLOON #warning "CONFIG_BALLON=y" #else #warning "CONFIG_BALLOON=n" #endif #endif
When I build unikraft, I see printed: /home/balvisio/unikraft/unikraft/include/uk/plat/balloon.h:33:2: warning: #warning "CONFIG BALLOON=n" [-Wcpp] #warning "CONFIG_BALLOON=n" So for some reason, the preprocessor is not reading the CONFIG_BALLOON macro correctly. I have gone through the kconfig and unikraft documentation but couldn’t find anything that could explain the issue. Is there an ordering in the inclusion of header files that should be followed in the unikraft source files? The branch can be found at:
https://github.com/balvisio/unikraft/tree/ballooning-test
Cheers,
Bruno _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |