diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-21 00:13:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-21 00:13:26 -0400 |
commit | f076ab8d048f152b968bb1c6313fed88abb037fe (patch) | |
tree | fe9ff7bc40d04c5a12eb41a90cc0e1dbf8ae4e45 /include/linux | |
parent | db6d8c7a4027b48d797b369a53f8470aaeed7063 (diff) | |
parent | 597a5f551ec4cd0aa0966e4fff4684ecc8c31c0d (diff) |
Merge branch 'kvm-updates-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm
* 'kvm-updates-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: (70 commits)
KVM: Adjust smp_call_function_mask() callers to new requirements
KVM: MMU: Fix potential race setting upper shadow ptes on nonpae hosts
KVM: x86 emulator: emulate clflush
KVM: MMU: improve invalid shadow root page handling
KVM: MMU: nuke shadowed pgtable pages and ptes on memslot destruction
KVM: Prefix some x86 low level function with kvm_, to avoid namespace issues
KVM: check injected pic irq within valid pic irqs
KVM: x86 emulator: Fix HLT instruction
KVM: Apply the kernel sigmask to vcpus blocked due to being uninitialized
KVM: VMX: Add ept_sync_context in flush_tlb
KVM: mmu_shrink: kvm_mmu_zap_page requires slots_lock to be held
x86: KVM guest: make kvm_smp_prepare_boot_cpu() static
KVM: SVM: fix suspend/resume support
KVM: s390: rename private structures
KVM: s390: Set guest storage limit and offset to sane values
KVM: Fix memory leak on guest exit
KVM: s390: dont allocate dirty bitmap
KVM: move slots_lock acquision down to vapic_exit
KVM: VMX: Fake emulate Intel perfctr MSRs
KVM: VMX: Fix a wrong usage of vmcs_config
...
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/kvm.h | 33 | ||||
-rw-r--r-- | include/linux/kvm_host.h | 11 |
2 files changed, 38 insertions, 6 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 | |||
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 */ |
@@ -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 |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index de9d1df4bba2..07d68a8ae8e9 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -52,7 +52,8 @@ struct kvm_io_bus { | |||
52 | 52 | ||
53 | void kvm_io_bus_init(struct kvm_io_bus *bus); | 53 | void kvm_io_bus_init(struct kvm_io_bus *bus); |
54 | void kvm_io_bus_destroy(struct kvm_io_bus *bus); | 54 | void kvm_io_bus_destroy(struct kvm_io_bus *bus); |
55 | struct kvm_io_device *kvm_io_bus_find_dev(struct kvm_io_bus *bus, gpa_t addr); | 55 | struct kvm_io_device *kvm_io_bus_find_dev(struct kvm_io_bus *bus, |
56 | gpa_t addr, int len, int is_write); | ||
56 | void kvm_io_bus_register_dev(struct kvm_io_bus *bus, | 57 | void kvm_io_bus_register_dev(struct kvm_io_bus *bus, |
57 | struct kvm_io_device *dev); | 58 | struct kvm_io_device *dev); |
58 | 59 | ||
@@ -116,6 +117,10 @@ struct kvm { | |||
116 | struct kvm_vm_stat stat; | 117 | struct kvm_vm_stat stat; |
117 | struct kvm_arch arch; | 118 | struct kvm_arch arch; |
118 | atomic_t users_count; | 119 | atomic_t users_count; |
120 | #ifdef KVM_COALESCED_MMIO_PAGE_OFFSET | ||
121 | struct kvm_coalesced_mmio_dev *coalesced_mmio_dev; | ||
122 | struct kvm_coalesced_mmio_ring *coalesced_mmio_ring; | ||
123 | #endif | ||
119 | }; | 124 | }; |
120 | 125 | ||
121 | /* The guest did something we don't support. */ | 126 | /* The guest did something we don't support. */ |
@@ -135,9 +140,6 @@ void kvm_vcpu_uninit(struct kvm_vcpu *vcpu); | |||
135 | void vcpu_load(struct kvm_vcpu *vcpu); | 140 | void vcpu_load(struct kvm_vcpu *vcpu); |
136 | void vcpu_put(struct kvm_vcpu *vcpu); | 141 | void vcpu_put(struct kvm_vcpu *vcpu); |
137 | 142 | ||
138 | void decache_vcpus_on_cpu(int cpu); | ||
139 | |||
140 | |||
141 | int kvm_init(void *opaque, unsigned int vcpu_size, | 143 | int kvm_init(void *opaque, unsigned int vcpu_size, |
142 | struct module *module); | 144 | struct module *module); |
143 | void kvm_exit(void); | 145 | void kvm_exit(void); |
@@ -166,6 +168,7 @@ int kvm_arch_set_memory_region(struct kvm *kvm, | |||
166 | struct kvm_userspace_memory_region *mem, | 168 | struct kvm_userspace_memory_region *mem, |
167 | struct kvm_memory_slot old, | 169 | struct kvm_memory_slot old, |
168 | int user_alloc); | 170 | int user_alloc); |
171 | void kvm_arch_flush_shadow(struct kvm *kvm); | ||
169 | gfn_t unalias_gfn(struct kvm *kvm, gfn_t gfn); | 172 | gfn_t unalias_gfn(struct kvm *kvm, gfn_t gfn); |
170 | struct page *gfn_to_page(struct kvm *kvm, gfn_t gfn); | 173 | struct page *gfn_to_page(struct kvm *kvm, gfn_t gfn); |
171 | unsigned long gfn_to_hva(struct kvm *kvm, gfn_t gfn); | 174 | unsigned long gfn_to_hva(struct kvm *kvm, gfn_t gfn); |