From: Rusty Russell <rusty@rustcorp.com.au>
To: Avi Kivity <avi@qumranet.com>
Cc: kvm-devel <kvm-devel@lists.sourceforge.net>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [kvm-devel] [RFC][KVM] Adding a signal mask to KVM_RUN
Date: Fri, 02 Mar 2007 09:23:05 +1100 [thread overview]
Message-ID: <1172787785.10271.55.camel@localhost.localdomain> (raw)
In-Reply-To: <45E6EC49.9050308@qumranet.com>
On Thu, 2007-03-01 at 17:07 +0200, Avi Kivity wrote:
> I'd like to add a signal mask to kvm, so that when the guest executes,
> the signal mask is temporarily set to some user specified value. This
> allows signals to be used as a way to interrupt the guest, but without
> requiring signal delivery to the userspace handler (which is what makes
> signals expensive).
Hi Avi!
lguest uses SIGUSR1 for similar reasons (console input, incoming
packet). Basically it forks and the child does a select, then sends
SIGUSR1 to the parent whenever the select returns, to pop the parent out
of the kernel/guest.
It's nasty in another respect: the race between checking signal and
entering kernel. (Hence my child sends SIGUSR1 whenever select returns,
but it runs at v. low prio so it usually only sends one before the
parent clears the fd).
My original code passed an fd into the kernel: whenever the fd was
readable, the lg module returned to userspace. This avoids the race,
but might be more awkward to use. I shied away from a complete
select/poll-style mask which would have done exactly what I wanted, but
perhaps this should be considered.
Rusty.
prev parent reply other threads:[~2007-03-01 22:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-01 15:07 [RFC][KVM] Adding a signal mask to KVM_RUN Avi Kivity
2007-03-01 22:23 ` Rusty Russell [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=1172787785.10271.55.camel@localhost.localdomain \
--to=rusty@rustcorp.com.au \
--cc=avi@qumranet.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.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