diff options
Diffstat (limited to 'include/linux/kvm.h')
-rw-r--r-- | include/linux/kvm.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index a281afeddfbb..1c908ac29c6c 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
@@ -173,6 +173,30 @@ struct kvm_run { | |||
173 | }; | 173 | }; |
174 | }; | 174 | }; |
175 | 175 | ||
176 | /* for KVM_REGISTER_COALESCED_MMIO / KVM_UNREGISTER_COALESCED_MMIO */ | ||
177 | |||
178 | struct kvm_coalesced_mmio_zone { | ||
179 | __u64 addr; | ||
180 | __u32 size; | ||
181 | __u32 pad; | ||
182 | }; | ||
183 | |||
184 | struct kvm_coalesced_mmio { | ||
185 | __u64 phys_addr; | ||
186 | __u32 len; | ||
187 | __u32 pad; | ||
188 | __u8 data[8]; | ||
189 | }; | ||
190 | |||
191 | struct kvm_coalesced_mmio_ring { | ||
192 | __u32 first, last; | ||
193 | struct kvm_coalesced_mmio coalesced_mmio[0]; | ||
194 | }; | ||
195 | |||
196 | #define KVM_COALESCED_MMIO_MAX \ | ||
197 | ((PAGE_SIZE - sizeof(struct kvm_coalesced_mmio_ring)) / \ | ||
198 | sizeof(struct kvm_coalesced_mmio)) | ||
199 | |||
176 | /* for KVM_TRANSLATE */ | 200 | /* for KVM_TRANSLATE */ |
177 | struct kvm_translation { | 201 | struct kvm_translation { |
178 | /* in */ | 202 | /* in */ |
@@ -346,6 +370,7 @@ struct kvm_trace_rec { | |||
346 | #define KVM_CAP_NOP_IO_DELAY 12 | 370 | #define KVM_CAP_NOP_IO_DELAY 12 |
347 | #define KVM_CAP_PV_MMU 13 | 371 | #define KVM_CAP_PV_MMU 13 |
348 | #define KVM_CAP_MP_STATE 14 | 372 | #define KVM_CAP_MP_STATE 14 |
373 | #define KVM_CAP_COALESCED_MMIO 15 | ||
349 | 374 | ||
350 | /* | 375 | /* |
351 | * ioctls for VM fds | 376 | * ioctls for VM fds |
@@ -371,6 +396,10 @@ struct kvm_trace_rec { | |||
371 | #define KVM_CREATE_PIT _IO(KVMIO, 0x64) | 396 | #define KVM_CREATE_PIT _IO(KVMIO, 0x64) |
372 | #define KVM_GET_PIT _IOWR(KVMIO, 0x65, struct kvm_pit_state) | 397 | #define KVM_GET_PIT _IOWR(KVMIO, 0x65, struct kvm_pit_state) |
373 | #define KVM_SET_PIT _IOR(KVMIO, 0x66, struct kvm_pit_state) | 398 | #define KVM_SET_PIT _IOR(KVMIO, 0x66, struct kvm_pit_state) |
399 | #define KVM_REGISTER_COALESCED_MMIO \ | ||
400 | _IOW(KVMIO, 0x67, struct kvm_coalesced_mmio_zone) | ||
401 | #define KVM_UNREGISTER_COALESCED_MMIO \ | ||
402 | _IOW(KVMIO, 0x68, struct kvm_coalesced_mmio_zone) | ||
374 | 403 | ||
375 | /* | 404 | /* |
376 | * ioctls for vcpu fds | 405 | * ioctls for vcpu fds |