[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Can I xc_await_suspend() for a suspend event caused by another application?

  • To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
  • Date: Mon, 10 Aug 2015 12:28:09 +0300
  • Comment: DomainKeys? See http://domainkeys.sourceforge.net/
  • Delivery-date: Mon, 10 Aug 2015 09:27:14 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=UKPYg7Ah7e7A4mLWktx26PAmf9KVPwZ2IyqUNLYnqMaUdZG9eL7HQT5ZCJcGJmNxg5RppVekGwwdMMQxZI+Z3atbIOM1aaPt+F3kfJo7LKP4KwHhF9XXB6UR5otJA0EWriuJT+4Lltj3M6ev01xv8VaIvXooZrLfN/7PEqTIAdfGk0on2ofU6n9SWAdgByzMu/YSawZMjhcmfWj9mkv9XvdllTK++AnNrUEaD+a7VylRHWZul8Lx3JagD4V+nmt8I1d8ck2t9iLZwkTUkH1lcSkQI/GMhP7+e4z5vKsIxHtLhq9Kw+JAHCtFgoH3dN418S62M3yGU6QJZBoZ/GVYTQ==; h=Received:Received:Received:Received:Received:From:Subject:To:References:X-Enigmail-Draft-Status:Message-ID:Date:User-Agent:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-BitDefender-Scanner:X-BitDefender-Spam:X-BitDefender-SpamStamp:X-BitDefender-CF-Stamp;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

> I've noticed that the xc_suspend_evtchn_init() functions in xenguest.h
> connect the client application to a guest suspend event channel, and
> that it's possible to subscribe to these events, in theory even if you
> never signal the channel (i.e. even if you don't issue a suspend request).
> But all the in-tree examples I've read seem to first signal the channel
> and then wait on the same channel for the confirmation that the guest is
> suspending.
> Can the event channel be used solely to inform a monitoring application
> that _another_ application (for example, xl) has requested a suspend?

Looking at the code and what documentation I could find, it turns out
that not only xc_suspend_evtchn_init() has not been designed to do what
I am after, but it additionally only works for (some) PV guests.

I've also looked into monitoring writes to ~/control/shutdown, but that
of course also only applies to PV domains.

What I need is to be able to know that any domain (but mostly HVMs) is
about to be suspended, so that I can do some hooks cleanup in the guest
while it's still running, and I'm looking for a way to do that without
modifying Xen at all, otherwise I'd need to send out a new kind of
vm_event or something similar, and obviously simpler is better. Could
maybe someone kindly point out a reliable way to do that with the
current Xen code, if it exists and I just haven't been able to find it?


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.