more information is needed about your architecture and what your trying
to do.

first off, as has been pointed out, if your not in user context
getzoneid() isn't really that useful.

second, below you keep mentioning "at boot time".  are you talking about
system boot time?  or zone boot time?  at system boot time, there are
never any zones on the system and the kernel has no knowledge about any
future zones.  adding an SMF service to tell IB about zones at this
point doesn't make any sense since that information could always change
when someone runs zonecfg(1m).  so your device should be able to attach
and initialize itself without any knowledge of what zone is going to be
using it.

the first time the kernel learns about a zone is when that zone is
brought into the ready state.  this is also the point at which a zoneid
is actually allocated for a zone.  once this is done, device and
resource allocation can happen for the zone.  so if there's special
setup that need to be done to associate IB devices with zones, this is
the point at which it should happen.  userland can tell the kernel which
IB devices should be bound to a zone, and those devices can do whatever
re-configuration is necessary.


On Thu, May 27, 2010 at 10:31:27PM -0700, wrote:
> Hi,
> I'm wondering if there is a way to get a zoneid from kernel even though
> it's not in user context. If it's possible, this is useful for us to
> activate an HCA port in the exclusive-IP zone at boot time.
> Here's the background info.
> Currently the IP path info is gotten when the driver is attached, then
> an HCA port can be ready for RDSv3, but this way is for the global zone,
> and it doesn't work well for the exclusive-IP zone because the driver cannot
> get the zoneid when it's attached (so far). After all, we have to wait until
> customers run a command for RDSv3 in the zone, but the port should be ready
> at boot time w/o any customers' actions. It'd be better off getting it
> in the driver attach, but I don't know if it's possible.
> If it's not possible to get a zoneid from kernel if it's not in user context,
> then is there any recommended method to get it at boot time? I'm thinking
> maybe by using SMF, we can invoke an appropriate command (like ifconfig) at
> boot time to activate HCAs in the exclusive-IP zones, but if there is a proper
> way for this kind of purpose, that'd be better.
> Thanks,
> -Eiji
> _______________________________________________
> zones-discuss mailing list
zones-discuss mailing list

Reply via email to