diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-30 18:36:45 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-30 18:36:45 -0400 |
| commit | 1bc87b00556e8f7ba30a1010471951c5b8f71114 (patch) | |
| tree | e73c2d187e2dff0df97ed82e32b45e362b923117 /include/linux | |
| parent | acff987d94cbdb4049f3706bed1f1792f8ef6837 (diff) | |
| parent | f1c1da2bde712812a3e0f9a7a7ebe7a916a4b5f4 (diff) | |
Merge branch 'kvm-updates/3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm
* 'kvm-updates/3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: (75 commits)
KVM: SVM: Keep intercepting task switching with NPT enabled
KVM: s390: implement sigp external call
KVM: s390: fix register setting
KVM: s390: fix return value of kvm_arch_init_vm
KVM: s390: check cpu_id prior to using it
KVM: emulate lapic tsc deadline timer for guest
x86: TSC deadline definitions
KVM: Fix simultaneous NMIs
KVM: x86 emulator: convert push %sreg/pop %sreg to direct decode
KVM: x86 emulator: switch lds/les/lss/lfs/lgs to direct decode
KVM: x86 emulator: streamline decode of segment registers
KVM: x86 emulator: simplify OpMem64 decode
KVM: x86 emulator: switch src decode to decode_operand()
KVM: x86 emulator: qualify OpReg inhibit_byte_regs hack
KVM: x86 emulator: switch OpImmUByte decode to decode_imm()
KVM: x86 emulator: free up some flag bits near src, dst
KVM: x86 emulator: switch src2 to generic decode_operand()
KVM: x86 emulator: expand decode flags to 64 bits
KVM: x86 emulator: split dst decode to a generic decode_operand()
KVM: x86 emulator: move memop, memopp into emulation context
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/kvm.h | 6 | ||||
| -rw-r--r-- | include/linux/kvm_host.h | 32 |
2 files changed, 21 insertions, 17 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h index aace6b8691a2..f47fcd30273d 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h | |||
| @@ -371,6 +371,7 @@ struct kvm_s390_psw { | |||
| 371 | #define KVM_S390_INT_VIRTIO 0xffff2603u | 371 | #define KVM_S390_INT_VIRTIO 0xffff2603u |
| 372 | #define KVM_S390_INT_SERVICE 0xffff2401u | 372 | #define KVM_S390_INT_SERVICE 0xffff2401u |
| 373 | #define KVM_S390_INT_EMERGENCY 0xffff1201u | 373 | #define KVM_S390_INT_EMERGENCY 0xffff1201u |
| 374 | #define KVM_S390_INT_EXTERNAL_CALL 0xffff1202u | ||
| 374 | 375 | ||
| 375 | struct kvm_s390_interrupt { | 376 | struct kvm_s390_interrupt { |
| 376 | __u32 type; | 377 | __u32 type; |
| @@ -463,7 +464,7 @@ struct kvm_ppc_pvinfo { | |||
| 463 | #define KVM_CAP_VAPIC 6 | 464 | #define KVM_CAP_VAPIC 6 |
| 464 | #define KVM_CAP_EXT_CPUID 7 | 465 | #define KVM_CAP_EXT_CPUID 7 |
| 465 | #define KVM_CAP_CLOCKSOURCE 8 | 466 | #define KVM_CAP_CLOCKSOURCE 8 |
| 466 | #define KVM_CAP_NR_VCPUS 9 /* returns max vcpus per vm */ | 467 | #define KVM_CAP_NR_VCPUS 9 /* returns recommended max vcpus per vm */ |
| 467 | #define KVM_CAP_NR_MEMSLOTS 10 /* returns max memory slots per vm */ | 468 | #define KVM_CAP_NR_MEMSLOTS 10 /* returns max memory slots per vm */ |
| 468 | #define KVM_CAP_PIT 11 | 469 | #define KVM_CAP_PIT 11 |
| 469 | #define KVM_CAP_NOP_IO_DELAY 12 | 470 | #define KVM_CAP_NOP_IO_DELAY 12 |
| @@ -553,6 +554,9 @@ struct kvm_ppc_pvinfo { | |||
| 553 | #define KVM_CAP_SPAPR_TCE 63 | 554 | #define KVM_CAP_SPAPR_TCE 63 |
| 554 | #define KVM_CAP_PPC_SMT 64 | 555 | #define KVM_CAP_PPC_SMT 64 |
| 555 | #define KVM_CAP_PPC_RMA 65 | 556 | #define KVM_CAP_PPC_RMA 65 |
| 557 | #define KVM_CAP_MAX_VCPUS 66 /* returns max vcpus per vm */ | ||
| 558 | #define KVM_CAP_PPC_HIOR 67 | ||
| 559 | #define KVM_CAP_PPC_PAPR 68 | ||
| 556 | #define KVM_CAP_S390_GMAP 71 | 560 | #define KVM_CAP_S390_GMAP 71 |
| 557 | 561 | ||
| 558 | #ifdef KVM_CAP_IRQ_ROUTING | 562 | #ifdef KVM_CAP_IRQ_ROUTING |
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) |
