All of lore.kernel.org
 help / color / mirror / Atom feed
From: Razvan Cojocaru <rcojocaru@bitdefender.com>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: Can I xc_await_suspend() for a suspend event caused by another application?
Date: Mon, 10 Aug 2015 12:28:09 +0300	[thread overview]
Message-ID: <55C86EA9.2000600@bitdefender.com> (raw)
In-Reply-To: <55B22AAC.5080808@bitdefender.com>

> 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?


Thanks,
Razvan

  reply	other threads:[~2015-08-10  9:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-24 12:08 Can I xc_await_suspend() for a suspend event caused by another application? Razvan Cojocaru
2015-08-10  9:28 ` Razvan Cojocaru [this message]
2015-08-10  9:52   ` Andrew Cooper
2015-08-10 10:03     ` Razvan Cojocaru

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=55C86EA9.2000600@bitdefender.com \
    --to=rcojocaru@bitdefender.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.