All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Choonho Son <choonho.son@gmail.com>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [XL] How hotplug scripts are called?
Date: Tue, 7 May 2013 10:11:35 +0200	[thread overview]
Message-ID: <5188B737.8050603@citrix.com> (raw)
In-Reply-To: <CAJBXtnkBaJvY8eOVJ4MWQWAb0gjnJJ84N4ahA3UM6v9zEYynbQ@mail.gmail.com>

On 07/05/13 07:56, Choonho Son wrote:
> Hi All,
> 
> I have question how domain is built, so I looked at xl.c.
> 
> If we run "xl create vm.cfg",  
>  main_create( ) function is called like;
> 
> create_domain()
>   `---- libxl_domain_create_new( )
>           `---- do_domain_create( )
>                    `---- initiate_domain_create( )
>                            `---- lixl__domain_make( )
>                                    `---- xc_domain_create( )
> 
> following these functions, we can make one domain.
> 
> but my question is how hotplug script like vif-bridge is called? It
> seems like that  "main_networkattach( )" is called somewhere.

Scripts are called from libxl__device_{disk/nic}_add, in the call to
libxl__wait_device_connection libxl waits for the device backend to
reach state 2 and then it executes hotplug scripts.

The function device_hotplug in libxl_device.c takes care of most of the
work, aided by OS specific helpers (see libxl_linux.c and libxl_netbsd.c
for the OS specific implementation).

      reply	other threads:[~2013-05-07  8:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-07  5:56 [XL] How hotplug scripts are called? Choonho Son
2013-05-07  8:11 ` Roger Pau Monné [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5188B737.8050603@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=choonho.son@gmail.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.