From: Jeremy Fitzhardinge <jeremy@goop.org>
To: weiming <zephyr.zhao@gmail.com>
Cc: Xen Developers <xen-devel@lists.xensource.com>,
Daniel Stodden <stodden@cs.tum.edu>
Subject: Re: how to callback from hypervisor to guest os?
Date: Mon, 07 Jul 2008 15:32:02 -0700 [thread overview]
Message-ID: <48729962.1090701@goop.org> (raw)
In-Reply-To: <add59a3f0807071514l4095c7eft1bbe2a232ee9faa1@mail.gmail.com>
weiming wrote:
> Do you mean making a hypercall after guest domain finishes
> processing? If so, in xen, after event_send(), will xxx() be executed
> immediately (non-blocking)?
>
> Xen: Guest:
>
> _interrupt_handler()
> {
> ...
> ...
> event_send(guest_dom) event_virq_handler()
> post: xxx() {
> do_process()
>
> hypercall_xxx()?
>
> }
> ...
> }
You can get Xen to do a callback into the guest. You can either define
this as an event callback (probably a virq like the timer or debug
interrupts), or a specific callback like syscall, event delivery,
failsafe exceptions etc. That schedules the guest vcpu running at a
particular address in kernel context; it can do whatever processing you
want, then do a hypercall to pass the results back into the hypervisor.
It's a close as you're going to get to a syncronous "call into guest"
mechanism. On the hypervisor side you're going to have to deal with it
as an async operation with split "call into guest" and "get results from
guest" phases. You also have to deal with the guest calling the
hypercall 0-N times - with no correlation to your callbacks, and with
arbitrary arguments (ie, can't trust the guest's data).
J
next prev parent reply other threads:[~2008-07-07 22:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-06 4:18 how to callback from hypervisor to guest os? weiming
2008-07-06 9:15 ` Daniel Stodden
2008-07-06 15:46 ` weiming
2008-07-06 21:26 ` Daniel Stodden
2008-07-07 21:46 ` weiming
2008-07-07 21:57 ` Jeremy Fitzhardinge
2008-07-07 22:14 ` weiming
2008-07-07 22:32 ` Jeremy Fitzhardinge [this message]
2008-07-08 0:12 ` weiming
2008-07-08 0:20 ` Jeremy Fitzhardinge
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=48729962.1090701@goop.org \
--to=jeremy@goop.org \
--cc=stodden@cs.tum.edu \
--cc=xen-devel@lists.xensource.com \
--cc=zephyr.zhao@gmail.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.