aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-03-05 12:46:05 -0500
committerAvi Kivity <avi@qumranet.com>2007-05-03 03:52:24 -0400
commit1961d276c877b99f5f16aaf36377c75e0e191c3a (patch)
tree4ea92fc2821bd0f9013ee567ee2f11c6cc532d79 /include
parent6722c51c51518af9581ab6cd9b6aec93774334a6 (diff)
KVM: Add guest mode signal mask
Allow a special signal mask to be used while executing in guest mode. This allows signals to be used to interrupt a vcpu without requiring signal delivery to a userspace handler, which is quite expensive. Userspace still receives -EINTR and can get the signal via sigwait(). Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/kvm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index b3af92e7bf5d..c0d10cd8088e 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -234,6 +234,12 @@ struct kvm_cpuid {
234 struct kvm_cpuid_entry entries[0]; 234 struct kvm_cpuid_entry entries[0];
235}; 235};
236 236
237/* for KVM_SET_SIGNAL_MASK */
238struct kvm_signal_mask {
239 __u32 len;
240 __u8 sigset[0];
241};
242
237#define KVMIO 0xAE 243#define KVMIO 0xAE
238 244
239/* 245/*
@@ -273,5 +279,6 @@ struct kvm_cpuid {
273#define KVM_GET_MSRS _IOWR(KVMIO, 0x88, struct kvm_msrs) 279#define KVM_GET_MSRS _IOWR(KVMIO, 0x88, struct kvm_msrs)
274#define KVM_SET_MSRS _IOW(KVMIO, 0x89, struct kvm_msrs) 280#define KVM_SET_MSRS _IOW(KVMIO, 0x89, struct kvm_msrs)
275#define KVM_SET_CPUID _IOW(KVMIO, 0x8a, struct kvm_cpuid) 281#define KVM_SET_CPUID _IOW(KVMIO, 0x8a, struct kvm_cpuid)
282#define KVM_SET_SIGNAL_MASK _IOW(KVMIO, 0x8b, struct kvm_signal_mask)
276 283
277#endif 284#endif