Port-xen archive

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

Re: merge bouyer-xenpvh to HEAD



On Tue, 28 Apr 2020 at 00:44, Chavdar Ivanov <ci4ic4%gmail.com@localhost> wrote:
>
> On Mon, 27 Apr 2020 at 18:09, Chavdar Ivanov <ci4ic4%gmail.com@localhost> wrote:
> >
> > The built-in nvmm module worked - prior to the structure change.
> >
> > I'll carry on another update to see if I can take it out of the definition.
> >
> > On Mon, 27 Apr 2020 at 17:40, Manuel Bouyer <bouyer%antioche.eu.org@localhost> wrote:
> > >
> > > On Mon, Apr 27, 2020 at 06:30:14PM +0200, Maxime Villard wrote:
> > > > Not necessarily, the other #ifdefs are at the end of the structure, and they
> > > > deal with fields that modules are not "expected" to access. The problem we
> > > > see here is caused by the fact that the XEN #ifdef is at the _beginning_ of
> > > > the structure, and so the offset of several public fields will differ between
> > > > modules and the kernel.
> > > >
> > > > I would suggest that the field be moved down; quickly, if possible, because
> > > > NVMM is not the only module that accesses some parts of curcpu(), and chances
> > > > are that many other modules are broken too.
> > >
> > > OK, done.
> > >
> > > This module stuff is really a mess ...
>
> Under XCP-NG it works fine now. Also the problem with nvmm is gone.
>


However, the merge broke building VirtualBox additions for NetBSD:
.....

gcc -c -O2 -Wall -Wextra -Wno-missing-field-initializers -Wno-unused
-Wno-trigraphs -fdiagnostics-show-option -Wno-unused-parameter
-Wlogical-op -Wno-variadic-macros -Wpointer-arith -Winline
-Wno-pointer-sign -fdiagnostics-show-option -Wstrict-prototypes
-Wmissing-prototypes -Wstrict-prototypes
-Wimplicit-function-declaration -Werror-implicit-function-declaration
-O2 -ffreestanding -fno-strict-aliasing -fno-common
-finline-limit=8000 -fno-stack-protector -O2 -mtune=generic
-fno-omit-frame-pointer -nostdinc -std=c99 -msoft-float -include
/p/VirtualBox-6.1.6/include/VBox/VBoxGuestMangling.h -m64 --param
inline-unit-growth=100 --param large-function-growth=1000
-fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mno-sse
-mno-mmx -mno-avx -fno-asynchronous-unwind-tables -mno-fp-ret-in-387
-I/p/VirtualBox-6.1.6/src/VBox/Runtime
-I/p/VirtualBox-6.1.6/src/VBox/Runtime/include -I/usr/src/sys
-I/usr/src/common/include
-I/p/VirtualBox-6.1.6/out/netbsd.amd64/release/obj/netbsd/include
-I/p/VirtualBox-6.1.6/out/netbsd.amd64/release/obj/RuntimeGuestR0/dtrace
-I/p/VirtualBox-6.1.6/include
-I/p/VirtualBox-6.1.6/out/netbsd.amd64/release -DVBOX
-DVBOX_WITH_64_BITS_GUESTS -DRT_OS_NETBSD -DRT_ARCH_AMD64 -D__AMD64__
-DVBOX_WITH_DEBUGGER -DIN_RING0 -DIN_RT_R0 -DHC_ARCH_BITS=64
-DGC_ARCH_BITS=64 -D_KERNEL -D_MODULE -DIN_GUEST -DIN_GUEST_R0
-DIN_RT_R0 -DRT_WITH_VBOX -DRT_WITHOUT_NOCRT_WRAPPERS
-DRT_NO_EXPORT_SYMBOL -DNOFILEID
-Wp,-MD,/p/VirtualBox-6.1.6/out/netbsd.amd64/release/obj/RuntimeGuestR0/r0drv/netbsd/alloc-r0drv-netbsd.o.dep
-Wp,-MT,/p/VirtualBox-6.1.6/out/netbsd.amd64/release/obj/RuntimeGuestR0/r0drv/netbsd/alloc-r0drv-netbsd.o
-Wp,-MP -o /p/VirtualBox-6.1.6/out/netbsd.amd64/release/obj/RuntimeGuestR0/r0drv/netbsd/alloc-r0drv-netbsd.o
/p/VirtualBox-6.1.6/src/VBox/Runtime/r0drv/netbsd/alloc-r0drv-netbsd.c
In file included from
/p/VirtualBox-6.1.6/out/netbsd.amd64/release/obj/netbsd/include/x86/intr.h:49,
                 from
/p/VirtualBox-6.1.6/out/netbsd.amd64/release/obj/netbsd/include/machine/intr.h:3,
                 from /usr/src/sys/sys/intr.h:97,
                 from /usr/src/sys/sys/mutex.h:174,
                 from
/p/VirtualBox-6.1.6/out/netbsd.amd64/release/obj/netbsd/include/machine/vmparam.h:42,
                 from /usr/src/sys/uvm/uvm_param.h:76,
                 from /usr/src/sys/sys/param.h:149,
                 from
/p/VirtualBox-6.1.6/src/VBox/Runtime/r0drv/netbsd/the-netbsd-kernel.h:62,
                 from
/p/VirtualBox-6.1.6/src/VBox/Runtime/r0drv/netbsd/RTLogWriteStdOut-r0drv-netbsd.c:31:
/p/VirtualBox-6.1.6/out/netbsd.amd64/release/obj/netbsd/include/machine/intrdefs.h:4:10:
fatal error: xen/intrdefs.h: No such file or directory
 #include <xen/intrdefs.h>
          ^~~~~~~~~~~~~~~~
compilation terminated.

....


Also, the module built before the merge does not load anymore:

/p/VirtualBox-6.1.6 uname -a
NetBSD marge.lorien.lan 9.99.59 NetBSD 9.99.59 (GENERIC_KASLR) #13:
Tue Apr 28 19:59:43 BST 2020
sysbuild@ymir:/home/sysbuild/amd64/obj/home/sysbuild/src/sys/arch/amd64/compile/GENERIC_KASLR
amd64
/p/VirtualBox-6.1.6 ls -l /stand/amd64/9.99.59/modules/vboxguest
total 352
-rwxr-xr-x 1 root wheel 332088 Apr 24 22:55 vboxguest.kmod
/p/VirtualBox-6.1.6 modload vboxguest
modload: vboxguest: No such file or directory

This is strange, as there was no version bump with the merge;
apparently it affected bits which were not considered.


> > >
> > > --
> > > Manuel Bouyer <bouyer%antioche.eu.org@localhost>
> > >      NetBSD: 26 ans d'experience feront toujours la difference
> > > --
> >
> >
> >
> > --
> > ----
>
>
>
> --
> ----



-- 
----


Home | Main Index | Thread Index | Old Index