diff options
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r-- | include/linux/kvm_host.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index eabb21a30c34..d52623199978 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/msi.h> | 18 | #include <linux/msi.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/rcupdate.h> | 20 | #include <linux/rcupdate.h> |
21 | #include <linux/ratelimit.h> | ||
21 | #include <asm/signal.h> | 22 | #include <asm/signal.h> |
22 | 23 | ||
23 | #include <linux/kvm.h> | 24 | #include <linux/kvm.h> |
@@ -48,6 +49,7 @@ | |||
48 | #define KVM_REQ_EVENT 11 | 49 | #define KVM_REQ_EVENT 11 |
49 | #define KVM_REQ_APF_HALT 12 | 50 | #define KVM_REQ_APF_HALT 12 |
50 | #define KVM_REQ_STEAL_UPDATE 13 | 51 | #define KVM_REQ_STEAL_UPDATE 13 |
52 | #define KVM_REQ_NMI 14 | ||
51 | 53 | ||
52 | #define KVM_USERSPACE_IRQ_SOURCE_ID 0 | 54 | #define KVM_USERSPACE_IRQ_SOURCE_ID 0 |
53 | 55 | ||
@@ -55,16 +57,16 @@ struct kvm; | |||
55 | struct kvm_vcpu; | 57 | struct kvm_vcpu; |
56 | extern struct kmem_cache *kvm_vcpu_cache; | 58 | extern struct kmem_cache *kvm_vcpu_cache; |
57 | 59 | ||
58 | /* | 60 | struct kvm_io_range { |
59 | * It would be nice to use something smarter than a linear search, TBD... | 61 | gpa_t addr; |
60 | * Thankfully we dont expect many devices to register (famous last words :), | 62 | int len; |
61 | * so until then it will suffice. At least its abstracted so we can change | 63 | struct kvm_io_device *dev; |
62 | * in one place. | 64 | }; |
63 | */ | 65 | |
64 | struct kvm_io_bus { | 66 | struct kvm_io_bus { |
65 | int dev_count; | 67 | int dev_count; |
66 | #define NR_IOBUS_DEVS 200 | 68 | #define NR_IOBUS_DEVS 300 |
67 | struct kvm_io_device *devs[NR_IOBUS_DEVS]; | 69 | struct kvm_io_range range[NR_IOBUS_DEVS]; |
68 | }; | 70 | }; |
69 | 71 | ||
70 | enum kvm_bus { | 72 | enum kvm_bus { |
@@ -77,8 +79,8 @@ int kvm_io_bus_write(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, | |||
77 | int len, const void *val); | 79 | int len, const void *val); |
78 | int kvm_io_bus_read(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, int len, | 80 | int kvm_io_bus_read(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, int len, |
79 | void *val); | 81 | void *val); |
80 | int kvm_io_bus_register_dev(struct kvm *kvm, enum kvm_bus bus_idx, | 82 | int kvm_io_bus_register_dev(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr, |
81 | struct kvm_io_device *dev); | 83 | int len, struct kvm_io_device *dev); |
82 | int kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, | 84 | int kvm_io_bus_unregister_dev(struct kvm *kvm, enum kvm_bus bus_idx, |
83 | struct kvm_io_device *dev); | 85 | struct kvm_io_device *dev); |
84 | 86 | ||
@@ -256,8 +258,9 @@ struct kvm { | |||
256 | struct kvm_arch arch; | 258 | struct kvm_arch arch; |
257 | atomic_t users_count; | 259 | atomic_t users_count; |
258 | #ifdef KVM_COALESCED_MMIO_PAGE_OFFSET | 260 | #ifdef KVM_COALESCED_MMIO_PAGE_OFFSET |
259 | struct kvm_coalesced_mmio_dev *coalesced_mmio_dev; | ||
260 | struct kvm_coalesced_mmio_ring *coalesced_mmio_ring; | 261 | struct kvm_coalesced_mmio_ring *coalesced_mmio_ring; |
262 | spinlock_t ring_lock; | ||
263 | struct list_head coalesced_zones; | ||
261 | #endif | 264 | #endif |
262 | 265 | ||
263 | struct mutex irq_lock; | 266 | struct mutex irq_lock; |
@@ -281,11 +284,8 @@ struct kvm { | |||
281 | 284 | ||
282 | /* The guest did something we don't support. */ | 285 | /* The guest did something we don't support. */ |
283 | #define pr_unimpl(vcpu, fmt, ...) \ | 286 | #define pr_unimpl(vcpu, fmt, ...) \ |
284 | do { \ | 287 | pr_err_ratelimited("kvm: %i: cpu%i " fmt, \ |
285 | if (printk_ratelimit()) \ | 288 | current->tgid, (vcpu)->vcpu_id , ## __VA_ARGS__) |
286 | printk(KERN_ERR "kvm: %i: cpu%i " fmt, \ | ||
287 | current->tgid, (vcpu)->vcpu_id , ## __VA_ARGS__); \ | ||
288 | } while (0) | ||
289 | 289 | ||
290 | #define kvm_printf(kvm, fmt ...) printk(KERN_DEBUG fmt) | 290 | #define kvm_printf(kvm, fmt ...) printk(KERN_DEBUG fmt) |
291 | #define vcpu_printf(vcpu, fmt...) kvm_printf(vcpu->kvm, fmt) | 291 | #define vcpu_printf(vcpu, fmt...) kvm_printf(vcpu->kvm, fmt) |