tech-kern archive

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

Re: XEN modules?



On Mon, 26 Mar 2018, Paul Goyette wrote:

I know there's some magic somewhere in the Makefiles that automatically builds both "normal" and XEN variants of the modules for amd64 (and, for i386, there's a PAE variant, too)! But I can't seem to find the magic!

Anyway, it seems to me that, when building the XEN (or PAE) variants of each module, they should be built with -DXEN (or -DPAE) options. There is at least one source file, compiled into the compat module, which has some code conditional on XEN. (For those who care, it is the compat_60 x86 code for updating AMD cpu_ucode.)

Based on log files, we're currently not defining XEN or PAE for the modules builds. As a result the XEN variant of the compat module does not contain the required code, preventing use of the 6.0 cpuctl command.

So,

1. Would it be reasonable to define the XEN and PAE macros when building
  the module variants?

Still need an answer to this question...

2. What would it take to make it happen?

Add

	CPPFLAGS+=	-DXEN (or PAE)

to the appropriate *.mk files?  (See #3 below)  These files already have

	XEN=	1
   and	PAE=	1

3. Where's the magic?  :)

OK, found the magic.  It's in

	src/sys/modules/arch/x86/amd64-xen/bsd.amd64-xen.mk
	src/sys/modules/arch/x86/i386-xen/bsd.i386-xen.mk
  and	src/sys/modules/arch/x86/i386pae-xen/bsd.i386pae-xen.mk


If the answer to Question #1 is "Yes, it's reasonable" then I can take care of making the changes.

Opinions, anyone?



+------------------+--------------------------+----------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
+------------------+--------------------------+----------------------------+


Home | Main Index | Thread Index | Old Index