aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kvm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/kvm.h')
-rw-r--r--include/linux/kvm.h33
1 files changed, 31 insertions, 2 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index a281afeddfbb..0ea064cbfbc8 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
178struct kvm_coalesced_mmio_zone {
179 __u64 addr;
180 __u32 size;
181 __u32 pad;
182};
183
184struct kvm_coalesced_mmio {
185 __u64 phys_addr;
186 __u32 len;
187 __u32 pad;
188 __u8 data[8];
189};
190
191struct 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 */
177struct kvm_translation { 201struct kvm_translation {
178 /* in */ 202 /* in */
@@ -294,14 +318,14 @@ struct kvm_trace_rec {
294 __u32 vcpu_id; 318 __u32 vcpu_id;
295 union { 319 union {
296 struct { 320 struct {
297 __u32 cycle_lo, cycle_hi; 321 __u64 cycle_u64;
298 __u32 extra_u32[KVM_TRC_EXTRA_MAX]; 322 __u32 extra_u32[KVM_TRC_EXTRA_MAX];
299 } cycle; 323 } cycle;
300 struct { 324 struct {
301 __u32 extra_u32[KVM_TRC_EXTRA_MAX]; 325 __u32 extra_u32[KVM_TRC_EXTRA_MAX];
302 } nocycle; 326 } nocycle;
303 } u; 327 } u;
304}; 328} __attribute__((packed));
305 329
306#define KVMIO 0xAE 330#define KVMIO 0xAE
307 331
@@ -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