Warnings when building the ACRN hypervisor


Geoffroy Van Cutsem
 

Hi folks,

I have noticed some warnings when buiding the ACRN hypervisor:
gcc  -I/home/gvancuts/work/acrn/acrn-hypervisor/build/hypervisor/include -I. -c -I. -I.. -I../hypervisor/include/arch/x86/guest -I/usr/include/efi -I/usr/include/efi/x86_64 -I../hypervisor/include/public -I../hypervisor/include/lib -I../hypervisor/bsp/include/ -DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding -Wall -I../fs/ -Dx86_64 -O2 -I../hypervisor/include/arch/x86 -include config.h -mno-mmx -mno-sse -mno-sse2 -mno-80387 -mno-fp-ret-in-387 -mno-red-zone  malloc.c -o /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/malloc.o
In file included from ../hypervisor/bsp/include/firmware_uefi.h:10,
                 from boot.c:40:
../hypervisor/bsp/include/firmware.h:16:38: warning: ‘struct acrn_vm’ declared inside parameter list will not be visible outside of this definition or declaration
  int32_t (*init_vm_boot_info)(struct acrn_vm *vm);
                                      ^~~~~~~
../hypervisor/bsp/include/firmware.h:24:43: warning: ‘struct acrn_vm’ declared inside parameter list will not be visible outside of this definition or declaration
 int32_t firmware_init_vm_boot_info(struct acrn_vm *vm);
                                           ^~~~~~~
In file included from boot.c:40:
../hypervisor/bsp/include/firmware_uefi.h:22:48: warning: ‘struct acrn_vm’ declared inside parameter list will not be visible outside of this definition or declaration
 int32_t uefi_init_vm_boot_info(__unused struct acrn_vm *vm);
                                                ^~~~~~~
ld -T /usr/lib64/elf_x86_64_efi.lds -Bsymbolic -shared -nostdlib -znocombreloc -L/usr/lib64 /usr/lib64/crt0-efi-x86_64.o -o /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/boot.so /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/boot.o /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/pe.o /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/malloc.o  -lgnuefi -lefi /usr/lib64/gcc/x86_64-generic-linux/8.3.1/libgcc.a

I saw this on the latest master as of today (acrn-2019w12.2-140000p-4-ge131d705) but it's been there for a little while. It was introduced by this commit:
commit 334382f9ef1f0564598cd2f96ad22d1a7f8b4c1c (HEAD)
Author: Tw <wei.tan@...>
Date:   Mon Mar 11 09:15:59 2019 +0800

    efi-stub: minor change for uefi refactor
   
    Include these changes:
    - substitute efi_context with uefi_context
    - remove EFI_STUB from Kconfig
    - remove EFI_
   
    Signed-off-by: Tw <wei.tan@...>

Is this a known issue?

Thanks,
Geoffroy


Wang, Hongbo
 

+TanWei to talk a look first.

 

 

Best regards.

Hongbo

Tel: +86-21-6116 7445

MP: +86-1364 1793 689

Mail: hongbo.wang@...

 

From: acrn-users@... [mailto:acrn-users@...] On Behalf Of Geoffroy Van Cutsem
Sent: Tuesday, March 19, 2019 8:19 PM
To: acrn-users@...
Subject: [acrn-users] Warnings when building the ACRN hypervisor

 

Hi folks,

I have noticed some warnings when buiding the ACRN hypervisor:
gcc  -I/home/gvancuts/work/acrn/acrn-hypervisor/build/hypervisor/include -I. -c -I. -I.. -I../hypervisor/include/arch/x86/guest -I/usr/include/efi -I/usr/include/efi/x86_64 -I../hypervisor/include/public -I../hypervisor/include/lib -I../hypervisor/bsp/include/ -DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding -Wall -I../fs/ -Dx86_64 -O2 -I../hypervisor/include/arch/x86 -include config.h -mno-mmx -mno-sse -mno-sse2 -mno-80387 -mno-fp-ret-in-387 -mno-red-zone  malloc.c -o /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/malloc.o
In file included from ../hypervisor/bsp/include/firmware_uefi.h:10,
                 from boot.c:40:
../hypervisor/bsp/include/firmware.h:16:38: warning: ‘struct acrn_vm’ declared inside parameter list will not be visible outside of this definition or declaration
  int32_t (*init_vm_boot_info)(struct acrn_vm *vm);
                                      ^~~~~~~
../hypervisor/bsp/include/firmware.h:24:43: warning: ‘struct acrn_vm’ declared inside parameter list will not be visible outside of this definition or declaration
 int32_t firmware_init_vm_boot_info(struct acrn_vm *vm);
                                           ^~~~~~~
In file included from boot.c:40:
../hypervisor/bsp/include/firmware_uefi.h:22:48: warning: ‘struct acrn_vm’ declared inside parameter list will not be visible outside of this definition or declaration
 int32_t uefi_init_vm_boot_info(__unused struct acrn_vm *vm);
                                                ^~~~~~~
ld -T /usr/lib64/elf_x86_64_efi.lds -Bsymbolic -shared -nostdlib -znocombreloc -L/usr/lib64 /usr/lib64/crt0-efi-x86_64.o -o /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/boot.so /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/boot.o /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/pe.o /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/malloc.o  -lgnuefi -lefi /usr/lib64/gcc/x86_64-generic-linux/8.3.1/libgcc.a

I saw this on the latest master as of today (acrn-2019w12.2-140000p-4-ge131d705) but it's been there for a little while. It was introduced by this commit:
commit 334382f9ef1f0564598cd2f96ad22d1a7f8b4c1c (HEAD)
Author: Tw <wei.tan@...>
Date:   Mon Mar 11 09:15:59 2019 +0800

    efi-stub: minor change for uefi refactor
   
    Include these changes:
    - substitute efi_context with uefi_context
    - remove EFI_STUB from Kconfig
    - remove EFI_
   
    Signed-off-by: Tw <wei.tan@...>

Is this a known issue?

Thanks,
Geoffroy


Tw
 

Hi there,

 

This warning is irrelevant. Because we just include that header for the structure definition.

 

From: Wang, Hongbo
Sent: Tuesday, March 19, 2019 10:15 PM
To: acrn-users@...; Tan, Wei <wei.tan@...>
Subject: RE: [acrn-users] Warnings when building the ACRN hypervisor

 

+TanWei to talk a look first.

 

 

Best regards.

Hongbo

Tel: +86-21-6116 7445

MP: +86-1364 1793 689

Mail: hongbo.wang@...

 

From: acrn-users@... [mailto:acrn-users@...] On Behalf Of Geoffroy Van Cutsem
Sent: Tuesday, March 19, 2019 8:19 PM
To: acrn-users@...
Subject: [acrn-users] Warnings when building the ACRN hypervisor

 

Hi folks,

I have noticed some warnings when buiding the ACRN hypervisor:
gcc  -I/home/gvancuts/work/acrn/acrn-hypervisor/build/hypervisor/include -I. -c -I. -I.. -I../hypervisor/include/arch/x86/guest -I/usr/include/efi -I/usr/include/efi/x86_64 -I../hypervisor/include/public -I../hypervisor/include/lib -I../hypervisor/bsp/include/ -DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding -Wall -I../fs/ -Dx86_64 -O2 -I../hypervisor/include/arch/x86 -include config.h -mno-mmx -mno-sse -mno-sse2 -mno-80387 -mno-fp-ret-in-387 -mno-red-zone  malloc.c -o /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/malloc.o
In file included from ../hypervisor/bsp/include/firmware_uefi.h:10,
                 from boot.c:40:
../hypervisor/bsp/include/firmware.h:16:38: warning: struct acrn_vm declared inside parameter list will not be visible outside of this definition or declaration
  int32_t (*init_vm_boot_info)(struct acrn_vm *vm);
                                      ^~~~~~~
../hypervisor/bsp/include/firmware.h:24:43: warning: struct acrn_vm declared inside parameter list will not be visible outside of this definition or declaration
 int32_t firmware_init_vm_boot_info(struct acrn_vm *vm);
                                           ^~~~~~~
In file included from boot.c:40:
../hypervisor/bsp/include/firmware_uefi.h:22:48: warning: struct acrn_vm declared inside parameter list will not be visible outside of this definition or declaration
 int32_t uefi_init_vm_boot_info(__unused struct acrn_vm *vm);
                                                ^~~~~~~
ld -T /usr/lib64/elf_x86_64_efi.lds -Bsymbolic -shared -nostdlib -znocombreloc -L/usr/lib64 /usr/lib64/crt0-efi-x86_64.o -o /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/boot.so /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/boot.o /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/pe.o /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/malloc.o  -lgnuefi -lefi /usr/lib64/gcc/x86_64-generic-linux/8.3.1/libgcc.a

I saw this on the latest master as of today (acrn-2019w12.2-140000p-4-ge131d705) but it's been there for a little while. It was introduced by this commit:
commit 334382f9ef1f0564598cd2f96ad22d1a7f8b4c1c (HEAD)
Author: Tw <wei.tan@...>
Date:   Mon Mar 11 09:15:59 2019 +0800

    efi-stub: minor change for uefi refactor
   
    Include these changes:
    - substitute efi_context with uefi_context
    - remove EFI_STUB from Kconfig
    - remove EFI_
   
    Signed-off-by: Tw <wei.tan@...>

Is this a known issue?

Thanks,
Geoffroy


Mingqiang Chi
 

Hi,

Roy is clean-up the header file for bsp folder,

He can fix this warning

 

From: acrn-users@... [mailto:acrn-users@...] On Behalf Of Tw
Sent: Wednesday, March 20, 2019 9:04 AM
To: Wang, Hongbo <hongbo.wang@...>; acrn-users@...
Subject: Re: [acrn-users] Warnings when building the ACRN hypervisor

 

Hi there,

 

This warning is irrelevant. Because we just include that header for the structure definition.

 

From: Wang, Hongbo
Sent: Tuesday, March 19, 2019 10:15 PM
To: acrn-users@...; Tan, Wei <wei.tan@...>
Subject: RE: [acrn-users] Warnings when building the ACRN hypervisor

 

+TanWei to talk a look first.

 

 

Best regards.

Hongbo

Tel: +86-21-6116 7445

MP: +86-1364 1793 689

Mail: hongbo.wang@...

 

From: acrn-users@... [mailto:acrn-users@...] On Behalf Of Geoffroy Van Cutsem
Sent: Tuesday, March 19, 2019 8:19 PM
To: acrn-users@...
Subject: [acrn-users] Warnings when building the ACRN hypervisor

 

Hi folks,

I have noticed some warnings when buiding the ACRN hypervisor:
gcc  -I/home/gvancuts/work/acrn/acrn-hypervisor/build/hypervisor/include -I. -c -I. -I.. -I../hypervisor/include/arch/x86/guest -I/usr/include/efi -I/usr/include/efi/x86_64 -I../hypervisor/include/public -I../hypervisor/include/lib -I../hypervisor/bsp/include/ -DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding -Wall -I../fs/ -Dx86_64 -O2 -I../hypervisor/include/arch/x86 -include config.h -mno-mmx -mno-sse -mno-sse2 -mno-80387 -mno-fp-ret-in-387 -mno-red-zone  malloc.c -o /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/malloc.o
In file included from ../hypervisor/bsp/include/firmware_uefi.h:10,
                 from boot.c:40:
../hypervisor/bsp/include/firmware.h:16:38: warning:
struct acrn_vm declared inside parameter list will not be visible outside of this definition or declaration
  int32_t (*init_vm_boot_info)(struct acrn_vm *vm);
                                      ^~~~~~~
../hypervisor/bsp/include/firmware.h:24:43: warning:
struct acrn_vm declared inside parameter list will not be visible outside of this definition or declaration
 int32_t firmware_init_vm_boot_info(struct acrn_vm *vm);
                                           ^~~~~~~
In file included from boot.c:40:
../hypervisor/bsp/include/firmware_uefi.h:22:48: warning:
struct acrn_vm declared inside parameter list will not be visible outside of this definition or declaration
 int32_t uefi_init_vm_boot_info(__unused struct acrn_vm *vm);
                                                ^~~~~~~
ld -T /usr/lib64/elf_x86_64_efi.lds -Bsymbolic -shared -nostdlib -znocombreloc -L/usr/lib64 /usr/lib64/crt0-efi-x86_64.o -o /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/boot.so /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/boot.o /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/pe.o /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/malloc.o  -lgnuefi -lefi /usr/lib64/gcc/x86_64-generic-linux/8.3.1/libgcc.a

I saw this on the latest master as of today (acrn-2019w12.2-140000p-4-ge131d705) but it's been there for a little while. It was introduced by this commit:
commit 334382f9ef1f0564598cd2f96ad22d1a7f8b4c1c (HEAD)
Author: Tw <wei.tan@...>
Date:   Mon Mar 11 09:15:59 2019 +0800

    efi-stub: minor change for uefi refactor
   
    Include these changes:
    - substitute efi_context with uefi_context
    - remove EFI_STUB from Kconfig
    - remove EFI_
   
    Signed-off-by: Tw <wei.tan@...>

Is this a known issue?

Thanks,
Geoffroy


Geoffroy Van Cutsem
 

Sounds good, I have filed https://github.com/projectacrn/acrn-hypervisor/issues/2830 to track this.

 

Thanks!
Geoffroy

 

From: acrn-users@... [mailto:acrn-users@...] On Behalf Of Mingqiang Chi
Sent: Wednesday, March 20, 2019 2:24 AM
To: acrn-users@...; Wang, Hongbo <hongbo.wang@...>
Cc: Roy, Arindam <arindam.roy@...>
Subject: Re: [acrn-users] Warnings when building the ACRN hypervisor

 

Hi,

Roy is clean-up the header file for bsp folder,

He can fix this warning

 

From: acrn-users@... [mailto:acrn-users@...] On Behalf Of Tw
Sent: Wednesday, March 20, 2019 9:04 AM
To: Wang, Hongbo <hongbo.wang@...>; acrn-users@...
Subject: Re: [acrn-users] Warnings when building the ACRN hypervisor

 

Hi there,

 

This warning is irrelevant. Because we just include that header for the structure definition.

 

From: Wang, Hongbo
Sent: Tuesday, March 19, 2019 10:15 PM
To: acrn-users@...; Tan, Wei <wei.tan@...>
Subject: RE: [acrn-users] Warnings when building the ACRN hypervisor

 

+TanWei to talk a look first.

 

 

Best regards.

Hongbo

Tel: +86-21-6116 7445

MP: +86-1364 1793 689

Mail: hongbo.wang@...

 

From: acrn-users@... [mailto:acrn-users@...] On Behalf Of Geoffroy Van Cutsem
Sent: Tuesday, March 19, 2019 8:19 PM
To: acrn-users@...
Subject: [acrn-users] Warnings when building the ACRN hypervisor

 

Hi folks,

I have noticed some warnings when buiding the ACRN hypervisor:
gcc  -I/home/gvancuts/work/acrn/acrn-hypervisor/build/hypervisor/include -I. -c -I. -I.. -I../hypervisor/include/arch/x86/guest -I/usr/include/efi -I/usr/include/efi/x86_64 -I../hypervisor/include/public -I../hypervisor/include/lib -I../hypervisor/bsp/include/ -DEFI_FUNCTION_WRAPPER -fPIC -fshort-wchar -ffreestanding -Wall -I../fs/ -Dx86_64 -O2 -I../hypervisor/include/arch/x86 -include config.h -mno-mmx -mno-sse -mno-sse2 -mno-80387 -mno-fp-ret-in-387 -mno-red-zone  malloc.c -o /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/malloc.o
In file included from ../hypervisor/bsp/include/firmware_uefi.h:10,
                 from boot.c:40:
../hypervisor/bsp/include/firmware.h:16:38: warning: struct acrn_vm declared inside parameter list will not be visible outside of this definition or declaration
  int32_t (*init_vm_boot_info)(struct acrn_vm *vm);
                                      ^~~~~~~
../hypervisor/bsp/include/firmware.h:24:43: warning: struct acrn_vm declared inside parameter list will not be visible outside of this definition or declaration
 int32_t firmware_init_vm_boot_info(struct acrn_vm *vm);
                                           ^~~~~~~
In file included from boot.c:40:
../hypervisor/bsp/include/firmware_uefi.h:22:48: warning: struct acrn_vm declared inside parameter list will not be visible outside of this definition or declaration
 int32_t uefi_init_vm_boot_info(__unused struct acrn_vm *vm);
                                                ^~~~~~~
ld -T /usr/lib64/elf_x86_64_efi.lds -Bsymbolic -shared -nostdlib -znocombreloc -L/usr/lib64 /usr/lib64/crt0-efi-x86_64.o -o /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/boot.so /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/boot.o /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/pe.o /home/gvancuts/work/acrn/acrn-hypervisor/build/efi-stub/malloc.o  -lgnuefi -lefi /usr/lib64/gcc/x86_64-generic-linux/8.3.1/libgcc.a

I saw this on the latest master as of today (acrn-2019w12.2-140000p-4-ge131d705) but it's been there for a little while. It was introduced by this commit:
commit 334382f9ef1f0564598cd2f96ad22d1a7f8b4c1c (HEAD)
Author: Tw <wei.tan@...>
Date:   Mon Mar 11 09:15:59 2019 +0800

    efi-stub: minor change for uefi refactor
   
    Include these changes:
    - substitute efi_context with uefi_context
    - remove EFI_STUB from Kconfig
    - remove EFI_
   
    Signed-off-by: Tw <wei.tan@...>

Is this a known issue?

Thanks,
Geoffroy