From: Avi Kivity <avi@qumranet.com>
To: kvm-devel <kvm-devel@lists.sourceforge.net>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: [RFC][KVM] Adding a signal mask to KVM_RUN
Date: Thu, 01 Mar 2007 17:07:53 +0200 [thread overview]
Message-ID: <45E6EC49.9050308@qumranet.com> (raw)
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).
The question is how to fit the signal mask to the kvm userspace
interface (which has a shared kernel/user structure that userspace
mmaps). I see several options:
1. Add a __u64 to that structure. This is the simplest option, but I
see that signal masks in the kernel/user interface are variable-length
bitmaps, so this clearly doesn't work well.
2. Add __u32 signal_mask_offset and signal_mask_size members to the
structure to tell userspace where to store the signal mask (in the same
shared area). A disadvantage is that here the kernel tells the user the
size of the signal mask instead of the other way round as is traditional.
3. Add a separate ioctl to set the signal mask. A NULL parameter
disables the signal mask functionality.
I am in favor of the third option, but the existence of three options
tells me more are possible.
[Just as background, signals are used for the following in our modified
qemu, the only known public client for kvm:
- interrupt the guest to get timer interrupts
- interrupt the guest on packet arrival
- interrupt the guest on aio completion
- (future) for guest smp, to simulate IPIs]
--
error compiling committee.c: too many arguments to function
next reply other threads:[~2007-03-01 15:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-01 15:07 Avi Kivity [this message]
2007-03-01 22:23 ` [kvm-devel] [RFC][KVM] Adding a signal mask to KVM_RUN Rusty Russell
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=45E6EC49.9050308@qumranet.com \
--to=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