xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Razvan Cojocaru <rzvncj@gmail.com>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: Hypervisor to dom0 communication
Date: Tue, 13 Nov 2012 10:36:13 +0000	[thread overview]
Message-ID: <1352802973.7491.40.camel@zakaz.uk.xensource.com> (raw)
In-Reply-To: <50A22044.6060608@gmail.com>

On Tue, 2012-11-13 at 10:26 +0000, Razvan Cojocaru wrote:
> > I think I'd look at the ioreq stuff in preference to the trace stuff.
> > You probably want to use a normal evtchn rather than VIRQ. The code
> > which handles HVM_PARAM_BUFIOREQ_PFN and HVM_PARAM_BUFIOREQ_EVTCHN
> > should give a reasonable starting point (I think, I'm not actually the
> > familiar with this bit of Xen).
> 
> Thanks, I'll look that up.
> 
> > It might also be useful if you describe your actual end-goal -- i.e.
> > what you are ultimately trying to achieve. It may be that there are
> > better approaches or even existing solutions or things which are already
> > close to your needs.
> 
> OK, my immediate end-goal is real-time logging of hypervisor events via 
> a dom0 userspace application. These events are always about a currently 
> running virtual machine, and said virtual machine is paused at the time.
> The userspace tool should be immediately notified, so no polling.

This is very like the ioreq model, where the domain (or maybe just the
vcpu, I'm not sure) is paused while qemu does its thing.

What sort of events are we talking about here? 

> Ideally, in the future, based on information received from the 
> hypervisor, the dom0 application would control other virtual machines 
> (restart them, shut them down, and so on). This, I'm thinking, could 
> either be done by replying to the hypervisor itself via the 
> communication channel and do some work there, or, since the application 
> is in dom0, do this via libxl or some other available userspace tool. 

The right thing to do here is for the userspace tool to communicate with
the toolstack (by whatever means) rather the hypervisor in order to
control the domains.

> However, the paused virtual machine should not be allowed to resume 
> unless the userspace application replies that it is OK to resume.

You might also find some inspiration for this sort of model in the
xenpaging and memshare code.

Ian.

  reply	other threads:[~2012-11-13 10:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-12 21:12 Hypervisor to dom0 communication Razvan Cojocaru
2012-11-13  9:59 ` Ian Campbell
2012-11-13 10:26   ` Razvan Cojocaru
2012-11-13 10:36     ` Ian Campbell [this message]
2012-11-13 10:49       ` Razvan Cojocaru
2012-11-13 11:12         ` Ian Campbell
2012-11-13 11:24           ` Razvan Cojocaru
2012-11-15 14:26             ` Steven Maresca
2012-11-15 14:37               ` Razvan Cojocaru
2012-11-16 16:51               ` Razvan Cojocaru
2012-11-15 12:10         ` Tim Deegan
  -- strict thread matches above, loose matches on Subject: below --
2008-07-10 12:26 Matthew Donovan
2008-07-11 14:47 ` Mark Williamson

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=1352802973.7491.40.camel@zakaz.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=rzvncj@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 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).