[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1172787785.10271.55.camel@localhost.localdomain>
Date: Fri, 02 Mar 2007 09:23:05 +1100
From: Rusty Russell <rusty@...tcorp.com.au>
To: Avi Kivity <avi@...ranet.com>
Cc: kvm-devel <kvm-devel@...ts.sourceforge.net>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [kvm-devel] [RFC][KVM] Adding a signal mask to KVM_RUN
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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists