Re: XEN devices included in kernel even if not XEN

2021-12-21 Thread Paul Goyette

On Tue, 21 Dec 2021, Brad Spencer wrote:


Manuel Bouyer  writes:


On Tue, Dec 21, 2021 at 07:44:59AM -0800, Paul Goyette wrote:

I've noticed that device drivers listed in arch/xen/conf/files.xen
(or, at least, most of those devices) seem to be included in kernel
even if not using XEN.  Shouldn't all those devices be conditional?

# sysctl -a | grep driver | tr ',' '\n' | grep 'x[be]*'
...
 [141 -1 xenevt]
 [142 142 xbd]
 [143 -1 xencons]


I think this lists all the known major numbers for the $MACHINE, I don't think
it means that the driver is actually loaded.



... and a PVHVM guest can use the GENERIC kernel, but will want the Xen
devices too.


Thanks to all for the info.

Manuel is correct - I actually checked the build object directory and
there are no *.o files related to the xen devices.



++--+--+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses:|
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com|
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org  |
| & Network Engineer |  | pgoyett...@gmail.com |
++--+--+


Re: XEN devices included in kernel even if not XEN

2021-12-21 Thread Brad Spencer
Manuel Bouyer  writes:

> On Tue, Dec 21, 2021 at 07:44:59AM -0800, Paul Goyette wrote:
>> I've noticed that device drivers listed in arch/xen/conf/files.xen
>> (or, at least, most of those devices) seem to be included in kernel
>> even if not using XEN.  Shouldn't all those devices be conditional?
>> 
>> # sysctl -a | grep driver | tr ',' '\n' | grep 'x[be]*'
>> ...
>>  [141 -1 xenevt]
>>  [142 142 xbd]
>>  [143 -1 xencons]
>
> I think this lists all the known major numbers for the $MACHINE, I don't think
> it means that the driver is actually loaded.


... and a PVHVM guest can use the GENERIC kernel, but will want the Xen
devices too.




-- 
Brad Spencer - b...@anduin.eldar.org - KC8VKS - http://anduin.eldar.org


Re: XEN devices included in kernel even if not XEN

2021-12-21 Thread Manuel Bouyer
On Tue, Dec 21, 2021 at 07:44:59AM -0800, Paul Goyette wrote:
> I've noticed that device drivers listed in arch/xen/conf/files.xen
> (or, at least, most of those devices) seem to be included in kernel
> even if not using XEN.  Shouldn't all those devices be conditional?
> 
> # sysctl -a | grep driver | tr ',' '\n' | grep 'x[be]*'
> ...
>  [141 -1 xenevt]
>  [142 142 xbd]
>  [143 -1 xencons]

I think this lists all the known major numbers for the $MACHINE, I don't think
it means that the driver is actually loaded.

-- 
Manuel Bouyer 
 NetBSD: 26 ans d'experience feront toujours la difference
--


XEN devices included in kernel even if not XEN

2021-12-21 Thread Paul Goyette

I've noticed that device drivers listed in arch/xen/conf/files.xen
(or, at least, most of those devices) seem to be included in kernel
even if not using XEN.  Shouldn't all those devices be conditional?

# sysctl -a | grep driver | tr ',' '\n' | grep 'x[be]*'
...
 [141 -1 xenevt]
 [142 142 xbd]
 [143 -1 xencons]
# tail $OBJDIR/amd64/sys/arch/amd64/compile/SPEEDY/opt_xen.h
#endif
/* option `XEN' not defined */   <<
#ifdef _LOCORE
 .ifndef _KERNEL_OPT_XEN
 .global _KERNEL_OPT_XEN
 .equiv _KERNEL_OPT_XEN,0x6e074def
 .endif
#else
__asm(" .ifndef _KERNEL_OPT_XEN\n .global _KERNEL_OPT_XEN\n .equiv 
_KERNEL_OPT_XEN,0x6e074def\n .endif");

#endif


++--+--+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses:|
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com|
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org  |
| & Network Engineer |  | pgoyett...@gmail.com |
++--+--+