diff options
author | Jan Kiszka <jan.kiszka@web.de> | 2009-05-14 22:43:05 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-05-31 14:11:46 +0300 |
commit | 5e1661766391b810fd308fa4f5e1ef034e404018 (patch) | |
tree | 4dbb19148551180391d6afd51c46641fa7d73b05 /kvm/include | |
parent | Make sure kvm_vpu_init is the last thing called in cpu initialization (diff) | |
download | qemu-kvm-5e1661766391b810fd308fa4f5e1ef034e404018.tar.gz qemu-kvm-5e1661766391b810fd308fa4f5e1ef034e404018.tar.bz2 qemu-kvm-5e1661766391b810fd308fa4f5e1ef034e404018.zip |
Make PC speaker emulation aware of in-kernel PIT
When using the in-kernel PIT the speaker emulation has to synchronize
the PIT state with KVM. Enhance the existing speaker sound device and
allow it to take over port 0x61 by using KVM_CREATE_PIT2 where
available. This unbreaks -soundhw pcspk in KVM mode.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'kvm/include')
-rw-r--r-- | kvm/include/linux/kvm.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kvm/include/linux/kvm.h b/kvm/include/linux/kvm.h index f5e9d662f..5b4b90c13 100644 --- a/kvm/include/linux/kvm.h +++ b/kvm/include/linux/kvm.h @@ -110,6 +110,14 @@ struct kvm_irqchip { } chip; }; +/* for KVM_CREATE_PIT2 */ +struct kvm_pit_config { + __u32 flags; + __u32 pad[15]; +}; + +#define KVM_PIT_SPEAKER_DUMMY 1 + #define KVM_EXIT_UNKNOWN 0 #define KVM_EXIT_EXCEPTION 1 #define KVM_EXIT_IO 2 @@ -455,6 +463,7 @@ struct kvm_trace_rec { #define KVM_CAP_ASSIGN_DEV_IRQ 29 /* Another bug in KVM_SET_USER_MEMORY_REGION fixed: */ #define KVM_CAP_JOIN_MEMORY_REGIONS_WORKS 30 +#define KVM_CAP_PIT2 31 #ifdef KVM_CAP_IRQ_ROUTING @@ -538,6 +547,7 @@ struct kvm_irq_routing { #define KVM_ASSIGN_SET_MSIX_ENTRY \ _IOW(KVMIO, 0x74, struct kvm_assigned_msix_entry) #define KVM_DEASSIGN_DEV_IRQ _IOW(KVMIO, 0x75, struct kvm_assigned_irq) +#define KVM_CREATE_PIT2 _IOW(KVMIO, 0x76, struct kvm_pit_config) /* * ioctls for vcpu fds |