diff options
author | Sheng Yang <sheng.yang@intel.com> | 2008-03-03 11:50:59 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-04-27 05:00:22 -0400 |
commit | e0f63cb9277b64850854aee301762beeeb463473 (patch) | |
tree | ae10bac92ee6cc1a658b479a311fac67ebd3524c /include | |
parent | 7837699fa6d7adf81f26ab73a5f6897ea1ab9d6a (diff) |
KVM: Add save/restore supporting of in kernel PIT
Signed-off-by: Sheng Yang <sheng.yang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86/kvm.h | 21 | ||||
-rw-r--r-- | include/linux/kvm.h | 2 |
2 files changed, 23 insertions, 0 deletions
diff --git a/include/asm-x86/kvm.h b/include/asm-x86/kvm.h index 7a71120426a3..12b4b25371d5 100644 --- a/include/asm-x86/kvm.h +++ b/include/asm-x86/kvm.h | |||
@@ -188,4 +188,25 @@ struct kvm_cpuid2 { | |||
188 | struct kvm_cpuid_entry2 entries[0]; | 188 | struct kvm_cpuid_entry2 entries[0]; |
189 | }; | 189 | }; |
190 | 190 | ||
191 | /* for KVM_GET_PIT and KVM_SET_PIT */ | ||
192 | struct kvm_pit_channel_state { | ||
193 | __u32 count; /* can be 65536 */ | ||
194 | __u16 latched_count; | ||
195 | __u8 count_latched; | ||
196 | __u8 status_latched; | ||
197 | __u8 status; | ||
198 | __u8 read_state; | ||
199 | __u8 write_state; | ||
200 | __u8 write_latch; | ||
201 | __u8 rw_mode; | ||
202 | __u8 mode; | ||
203 | __u8 bcd; | ||
204 | __u8 gate; | ||
205 | __s64 count_load_time; | ||
206 | }; | ||
207 | |||
208 | struct kvm_pit_state { | ||
209 | struct kvm_pit_channel_state channels[3]; | ||
210 | }; | ||
211 | |||
191 | #endif | 212 | #endif |
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index cefa9a2c7b89..a2f3274016ee 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -260,6 +260,8 @@ struct kvm_vapic_addr { | |||
260 | #define KVM_GET_IRQCHIP _IOWR(KVMIO, 0x62, struct kvm_irqchip) | 260 | #define KVM_GET_IRQCHIP _IOWR(KVMIO, 0x62, struct kvm_irqchip) |
261 | #define KVM_SET_IRQCHIP _IOR(KVMIO, 0x63, struct kvm_irqchip) | 261 | #define KVM_SET_IRQCHIP _IOR(KVMIO, 0x63, struct kvm_irqchip) |
262 | #define KVM_CREATE_PIT _IO(KVMIO, 0x64) | 262 | #define KVM_CREATE_PIT _IO(KVMIO, 0x64) |
263 | #define KVM_GET_PIT _IOWR(KVMIO, 0x65, struct kvm_pit_state) | ||
264 | #define KVM_SET_PIT _IOR(KVMIO, 0x66, struct kvm_pit_state) | ||
263 | 265 | ||
264 | /* | 266 | /* |
265 | * ioctls for vcpu fds | 267 | * ioctls for vcpu fds |