aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kvm.h
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@web.de>2009-05-14 16:42:53 -0400
committerAvi Kivity <avi@redhat.com>2009-09-10 01:32:41 -0400
commitc5ff41ce66382d657a76bc06ba252d848826950f (patch)
tree4b7bc3674faa6259b1e6b07fc616b17dcf281d98 /include/linux/kvm.h
parent721eecbf4fe995ca94a9edec0c9843b1cc0eaaf3 (diff)
KVM: Allow PIT emulation without speaker port
The in-kernel speaker emulation is only a dummy and also unneeded from the performance point of view. Rather, it takes user space support to generate sound output on the host, e.g. console beeps. To allow this, introduce KVM_CREATE_PIT2 which controls in-kernel speaker port emulation via a flag passed along the new IOCTL. It also leaves room for future extensions of the PIT configuration interface. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/linux/kvm.h')
-rw-r--r--include/linux/kvm.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index 8f53f24e5274..65df6f5e2b98 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -70,6 +70,14 @@ struct kvm_irqchip {
70 } chip; 70 } chip;
71}; 71};
72 72
73/* for KVM_CREATE_PIT2 */
74struct kvm_pit_config {
75 __u32 flags;
76 __u32 pad[15];
77};
78
79#define KVM_PIT_SPEAKER_DUMMY 1
80
73#define KVM_EXIT_UNKNOWN 0 81#define KVM_EXIT_UNKNOWN 0
74#define KVM_EXIT_EXCEPTION 1 82#define KVM_EXIT_EXCEPTION 1
75#define KVM_EXIT_IO 2 83#define KVM_EXIT_IO 2
@@ -419,6 +427,9 @@ struct kvm_trace_rec {
419#define KVM_CAP_MCE 31 427#define KVM_CAP_MCE 31
420#endif 428#endif
421#define KVM_CAP_IRQFD 32 429#define KVM_CAP_IRQFD 32
430#ifdef __KVM_HAVE_PIT
431#define KVM_CAP_PIT2 33
432#endif
422 433
423#ifdef KVM_CAP_IRQ_ROUTING 434#ifdef KVM_CAP_IRQ_ROUTING
424 435
@@ -525,6 +536,7 @@ struct kvm_irqfd {
525 _IOW(KVMIO, 0x74, struct kvm_assigned_msix_entry) 536 _IOW(KVMIO, 0x74, struct kvm_assigned_msix_entry)
526#define KVM_DEASSIGN_DEV_IRQ _IOW(KVMIO, 0x75, struct kvm_assigned_irq) 537#define KVM_DEASSIGN_DEV_IRQ _IOW(KVMIO, 0x75, struct kvm_assigned_irq)
527#define KVM_IRQFD _IOW(KVMIO, 0x76, struct kvm_irqfd) 538#define KVM_IRQFD _IOW(KVMIO, 0x76, struct kvm_irqfd)
539#define KVM_CREATE_PIT2 _IOW(KVMIO, 0x77, struct kvm_pit_config)
528 540
529/* 541/*
530 * ioctls for vcpu fds 542 * ioctls for vcpu fds