Port-xen archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Building kernel modules with Xen-specific settings
I would like to automatically build
/stand/amd64-xen/9.1/modules/zfs/zfs.kmod with
-DMAXPHYS=32768 while not affecting the build for any other machine
(specifically amd64).
Is this possible or are the object files shared?
---------- Forwarded message ----------
Date: Wed, 13 Jan 2021 13:27:00 +0000 (GMT)
From: Stephen Borrill <netbsd%precedence.co.uk@localhost>
To: "[UTF-8] JaromÃr DoleÄ~Mek" <jaromir.dolecek%gmail.com@localhost>
Cc: Matthias Petermann <mp%petermann-it.de@localhost>, Brian Buhrow <buhrow%nfbcal.org@localhost>,
Mathew Cherry G. <c%bow.st@localhost>, port-xen <port-xen%netbsd.org@localhost>
Subject: Re: NetBSD DomU (PV) hangs on Xen 4.13.1 / NetBSD 9.1
On Wed, 23 Dec 2020, JaromÃr DoleÄ~Mek wrote:
TL;DR ZFS + Xen doesn't work together under NetBSD 9.1. You need to
either use NetBSD-current, or use something other than ZFS.
Longer version: Xen under NetBSD up to 9.x had a limitation of 32KB
MAXBSIZE related to xbd(4), the Xen kernels had an option override to
force the lower limit. This limitation was removed in NetBSD-current.
ZFS is loaded as a module, and is compiled with default MAXBSIZE of
64kb, which doesn't work with the Xen kernel's 32KB.
But overriding as per
http://mail-index.netbsd.org/port-xen/2020/09/11/msg009793.html works. What I
don't get is why seeing as xen modules are distinct from non-xen
(/stand/amd64/9.1/modules/zfs/zfs.kmod vs
/stand/amd64-xen/9.1/modules/zfs/zfs.kmod), the xen versions cannot be built
with this override automatically. The patch below would also impact non-Xen
kernels.
I've not yet managed to follow through the build process to work out how
amd64-xen kernel modules are built, I expect someone (hopefully reading
this list!) will know off the top of their head.
--- src/sys/modules/zfs/Makefile.zfsmod.DIST 2019-02-05 04:54:36.000000000
-0500
+++ src/sys/modules/zfs/Makefile.zfsmod 2020-09-10 18:35:34.683493656 -0400
@@ -135,5 +135,6 @@
CPPFLAGS+= -I${ZFSDIR}/dist/uts/common
CPPFLAGS+= -D_PROPLIB_ZFS_CONFLICT
+CPPFLAGS+= -DMAXPHYS=32768
NEED_ISYSTEM= # duplicate headers, depends on -isystem to build
--
Stephen
Home |
Main Index |
Thread Index |
Old Index