From: Edwin Zhai <edwin.zhai@intel.com>
To: Ben Thomas <bthomas@virtualiron.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH] - add symmetry to para and fully virtualized domain shutdown/reboot
Date: Tue, 4 Apr 2006 23:15:59 +0800 [thread overview]
Message-ID: <20060404151559.GA14606@edwin-gen.ccr> (raw)
In-Reply-To: <443145FF.5050800@virtualiron.com>
thomas,
your patch is reasonable.
as my understanding, destroy is totally different from shutdown. destroy just
issues a hyper-call(DOM0_OP), while shutdown writes xenstore and waits the guest
handling almost everything( use sched_op hypercall for itself).
so, qemu's destroy command(kill hvm dom immediately when hang) should use the
original destroy hyper-call to take place of "xm destroy".
On Mon, Apr 03, 2006 at 11:57:51AM -0400, Ben Thomas wrote:
> Add code to make handling domain poweroff/reboot symmetrical
> between paravirtualized and fully virtualized.
>
> A paravirtualized domain uses sched_op to shut down and set the
> reason code. This will send a VIRQ_DOM_EXC, which can be
> handled in dom0 by control software. In some ways, this resembles
> SIGCHILD/waitpid, and is a reasonable model.
>
> The fully virtualized case has qemu invoke xm directly. This is a
> different path than paravirtualized. It also removes
> decision and policy making choices from the rest of the control
> software and places it within qemu. When any dom0 logic
> eventually gets a VIRQ_DOM_EXC, the information about the
> domain is gone having been destroyed by xm.
>
> It would be useful if all shutdown/reboot operations were
> symmetrical from domain 0's point of view. One approach
> would be to redefine sched_op to handle other domains than
> the current domain, but this seemed excessive. Another
> approach, which is what this patch implements, adds
> a DOM0 hypervisor call very similar to the existing
> DOM0_DESTROYDOMAIN, called DOM0_SHUTDOWNDOMAIN, which handles
> the shutdown and reason -- basically, just like a
> paravirtualized system.
>
> Like DOM0_DESTROYDOMAIN, add a xenctrl wrapper, and have qemu
> call it.
>
> With this change, both domain types shutdown/reboot using
> the same dom0 management logic. All control decisions are
> removed from qemu, which now simply handles the request
> and reason. At a very high level, the flow is "notify of
> shutdown and reason", "send VIRQ_DOM_EXC", process, and
> destroy domain. Paravirtualized and fully-virtualized
> domains would differ slightly in the first step of
> notification. Paravirtualized continues to use sched_op,
> fully virtualized uses DOM0_SHUTDOWNDOMAIN. The rest
> of the steps would be identical in both cases.
>
> Or, back to the opening sentence, make the operations as
> symmetrical as possible.
>
> (As a freebie, #if 0 some very verbose logging code in qemu.
> Totally unrelated, but as long as I was there...)
>
> Signed-off-by: Ben Thomas (ben@virtualiron.com)
>
>
> --
> ------------------------------------------------------------------------
> Ben Thomas Virtual Iron Software
> bthomas@virtualiron.com Tower 1, Floor 2
> 978-849-1214 900 Chelmsford Street
> Lowell, MA 01851
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
--
thanks,
edwin
next prev parent reply other threads:[~2006-04-04 15:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-03 15:57 [PATCH] - add symmetry to para and fully virtualized domain shutdown/reboot Ben Thomas
2006-04-03 16:58 ` Keir Fraser
2006-04-03 17:14 ` Ben Thomas
2006-04-03 18:18 ` Keir Fraser
2006-04-04 15:18 ` Edwin Zhai
2006-04-04 16:42 ` Keir Fraser
2006-04-04 15:15 ` Edwin Zhai [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-04-06 13:31 Ben Thomas
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=20060404151559.GA14606@edwin-gen.ccr \
--to=edwin.zhai@intel.com \
--cc=bthomas@virtualiron.com \
--cc=xen-devel@lists.xensource.com \
/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.