From: Zachary Amsden <zach@vmware.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Chris Wright <chrisw@sous-sol.org>,
Virtualization Mailing List <virtualization@lists.osdl.org>
Subject: Re: paravirt_ops.safe_halt vs .halt?
Date: Thu, 21 Sep 2006 13:58:31 -0700 [thread overview]
Message-ID: <4512FCF7.8040507@vmware.com> (raw)
In-Reply-To: <4512F6D1.60902@goop.org>
Jeremy Fitzhardinge wrote:
> Chris Wright wrote:
>
>> * Jeremy Fitzhardinge (jeremy@goop.org) wrote:
>>
>>
>>> What's paravirt_ops.halt for? Is it the non-safe equivalent to
>>> safe_halt, or is it intended for shutting down the machine? It doesn't
>>> seem to be used anywhere.
>>>
>>>
>> It's called from halt(). Xen should be using it to down the cpu.
>>
It's also called whenever there is a raw hlt instruction. Which happens
in some cases when you don't want to shutdown the CPU (at least, testing
HLT instruction). So there are really three kinds of halt
1) safe_halt - safely halt and enable interrupts
2) shutdown_halt - halt and disable interrupts to shut down the CPU
(some cases of this are bare hlts)
3) bare_hlt - hlt for other reasons than the above, or in regions know
to already have interrupts enabled, thus avoiding the extra sti. This
avoidance is pretty silly, considering the only bare halts I believe are
in bootup code.
We had this triple abstraction in VMI when it was a subarch, but it was
unclear it was worth imposing on places that weren't really applicable
to a virtualization context.
In short, perhaps it is best to separate safe_halt vs shutdown_halt and
unconditionally use sti; hlt or cli; hlt instead of providing a bare
halt paravirt op.
Zach
prev parent reply other threads:[~2006-09-21 20:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-21 19:30 paravirt_ops.safe_halt vs .halt? Jeremy Fitzhardinge
2006-09-21 19:44 ` Chris Wright
2006-09-21 20:32 ` Jeremy Fitzhardinge
2006-09-21 20:58 ` Zachary Amsden [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=4512FCF7.8040507@vmware.com \
--to=zach@vmware.com \
--cc=chrisw@sous-sol.org \
--cc=jeremy@goop.org \
--cc=virtualization@lists.osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).