diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-07 14:35:30 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-07 14:35:30 -0400 |
| commit | 66bb0aa077978dbb76e6283531eb3cc7a878de38 (patch) | |
| tree | 62a28a96cb43df2d8f7c6eb14d4676a1e2ce3887 /include/linux | |
| parent | e306e3be1cbe5b11d0f8a53a557c205cf27e4979 (diff) | |
| parent | c77dcacb397519b6ade8f08201a4a90a7f4f751e (diff) | |
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull second round of KVM changes from Paolo Bonzini:
"Here are the PPC and ARM changes for KVM, which I separated because
they had small conflicts (respectively within KVM documentation, and
with 3.16-rc changes). Since they were all within the subsystem, I
took care of them.
Stephen Rothwell reported some snags in PPC builds, but they are all
fixed now; the latest linux-next report was clean.
New features for ARM include:
- KVM VGIC v2 emulation on GICv3 hardware
- Big-Endian support for arm/arm64 (guest and host)
- Debug Architecture support for arm64 (arm32 is on Christoffer's todo list)
And for PPC:
- Book3S: Good number of LE host fixes, enable HV on LE
- Book3S HV: Add in-guest debug support
This release drops support for KVM on the PPC440. As a result, the
PPC merge removes more lines than it adds. :)
I also included an x86 change, since Davidlohr tied it to an
independent bug report and the reporter quickly provided a Tested-by;
there was no reason to wait for -rc2"
* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (122 commits)
KVM: Move more code under CONFIG_HAVE_KVM_IRQFD
KVM: nVMX: fix "acknowledge interrupt on exit" when APICv is in use
KVM: nVMX: Fix nested vmexit ack intr before load vmcs01
KVM: PPC: Enable IRQFD support for the XICS interrupt controller
KVM: Give IRQFD its own separate enabling Kconfig option
KVM: Move irq notifier implementation into eventfd.c
KVM: Move all accesses to kvm::irq_routing into irqchip.c
KVM: irqchip: Provide and use accessors for irq routing table
KVM: Don't keep reference to irq routing table in irqfd struct
KVM: PPC: drop duplicate tracepoint
arm64: KVM: fix 64bit CP15 VM access for 32bit guests
KVM: arm64: GICv3: mandate page-aligned GICV region
arm64: KVM: GICv3: move system register access to msr_s/mrs_s
KVM: PPC: PR: Handle FSCR feature deselects
KVM: PPC: HV: Remove generic instruction emulation
KVM: PPC: BOOKEHV: rename e500hv_spr to bookehv_spr
KVM: PPC: Remove DCR handling
KVM: PPC: Expose helper functions for data/inst faults
KVM: PPC: Separate loadstore emulation from priv emulation
KVM: PPC: Handle magic page in kvmppc_ld/st
...
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/kvm_host.h | 47 |
1 files changed, 16 insertions, 31 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index ec4e3bd83d47..a4c33b34fe3f 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
| @@ -325,24 +325,7 @@ struct kvm_kernel_irq_routing_entry { | |||
| 325 | struct hlist_node link; | 325 | struct hlist_node link; |
| 326 | }; | 326 | }; |
| 327 | 327 | ||
| 328 | #ifdef CONFIG_HAVE_KVM_IRQ_ROUTING | 328 | struct kvm_irq_routing_table; |
| 329 | |||
| 330 | struct kvm_irq_routing_table { | ||
| 331 | int chip[KVM_NR_IRQCHIPS][KVM_IRQCHIP_NUM_PINS]; | ||
| 332 | struct kvm_kernel_irq_routing_entry *rt_entries; | ||
| 333 | u32 nr_rt_entries; | ||
| 334 | /* | ||
| 335 | * Array indexed by gsi. Each entry contains list of irq chips | ||
| 336 | * the gsi is connected to. | ||
| 337 | */ | ||
| 338 | struct hlist_head map[0]; | ||
| 339 | }; | ||
| 340 | |||
| 341 | #else | ||
| 342 | |||
| 343 | struct kvm_irq_routing_table {}; | ||
| 344 | |||
| 345 | #endif | ||
| 346 | 329 | ||
| 347 | #ifndef KVM_PRIVATE_MEM_SLOTS | 330 | #ifndef KVM_PRIVATE_MEM_SLOTS |
| 348 | #define KVM_PRIVATE_MEM_SLOTS 0 | 331 | #define KVM_PRIVATE_MEM_SLOTS 0 |
| @@ -401,11 +384,12 @@ struct kvm { | |||
| 401 | struct mutex irq_lock; | 384 | struct mutex irq_lock; |
| 402 | #ifdef CONFIG_HAVE_KVM_IRQCHIP | 385 | #ifdef CONFIG_HAVE_KVM_IRQCHIP |
| 403 | /* | 386 | /* |
| 404 | * Update side is protected by irq_lock and, | 387 | * Update side is protected by irq_lock. |
| 405 | * if configured, irqfds.lock. | ||
| 406 | */ | 388 | */ |
| 407 | struct kvm_irq_routing_table __rcu *irq_routing; | 389 | struct kvm_irq_routing_table __rcu *irq_routing; |
| 408 | struct hlist_head mask_notifier_list; | 390 | struct hlist_head mask_notifier_list; |
| 391 | #endif | ||
| 392 | #ifdef CONFIG_HAVE_KVM_IRQFD | ||
| 409 | struct hlist_head irq_ack_notifier_list; | 393 | struct hlist_head irq_ack_notifier_list; |
| 410 | #endif | 394 | #endif |
| 411 | 395 | ||
| @@ -455,7 +439,7 @@ void kvm_vcpu_uninit(struct kvm_vcpu *vcpu); | |||
| 455 | int __must_check vcpu_load(struct kvm_vcpu *vcpu); | 439 | int __must_check vcpu_load(struct kvm_vcpu *vcpu); |
| 456 | void vcpu_put(struct kvm_vcpu *vcpu); | 440 | void vcpu_put(struct kvm_vcpu *vcpu); |
| 457 | 441 | ||
| 458 | #ifdef CONFIG_HAVE_KVM_IRQ_ROUTING | 442 | #ifdef CONFIG_HAVE_KVM_IRQFD |
| 459 | int kvm_irqfd_init(void); | 443 | int kvm_irqfd_init(void); |
| 460 | void kvm_irqfd_exit(void); | 444 | void kvm_irqfd_exit(void); |
| 461 | #else | 445 | #else |
| @@ -602,7 +586,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp, | |||
| 602 | unsigned int ioctl, unsigned long arg); | 586 | unsigned int ioctl, unsigned long arg); |
| 603 | int kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf); | 587 | int kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf); |
| 604 | 588 | ||
| 605 | int kvm_dev_ioctl_check_extension(long ext); | 589 | int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext); |
| 606 | 590 | ||
| 607 | int kvm_get_dirty_log(struct kvm *kvm, | 591 | int kvm_get_dirty_log(struct kvm *kvm, |
| 608 | struct kvm_dirty_log *log, int *is_dirty); | 592 | struct kvm_dirty_log *log, int *is_dirty); |
| @@ -752,6 +736,10 @@ void kvm_unregister_irq_mask_notifier(struct kvm *kvm, int irq, | |||
| 752 | void kvm_fire_mask_notifiers(struct kvm *kvm, unsigned irqchip, unsigned pin, | 736 | void kvm_fire_mask_notifiers(struct kvm *kvm, unsigned irqchip, unsigned pin, |
| 753 | bool mask); | 737 | bool mask); |
| 754 | 738 | ||
| 739 | int kvm_irq_map_gsi(struct kvm *kvm, | ||
| 740 | struct kvm_kernel_irq_routing_entry *entries, int gsi); | ||
| 741 | int kvm_irq_map_chip_pin(struct kvm *kvm, unsigned irqchip, unsigned pin); | ||
| 742 | |||
| 755 | int kvm_set_irq(struct kvm *kvm, int irq_source_id, u32 irq, int level, | 743 | int kvm_set_irq(struct kvm *kvm, int irq_source_id, u32 irq, int level, |
| 756 | bool line_status); | 744 | bool line_status); |
| 757 | int kvm_set_irq_inatomic(struct kvm *kvm, int irq_source_id, u32 irq, int level); | 745 | int kvm_set_irq_inatomic(struct kvm *kvm, int irq_source_id, u32 irq, int level); |
| @@ -942,28 +930,27 @@ int kvm_set_irq_routing(struct kvm *kvm, | |||
| 942 | const struct kvm_irq_routing_entry *entries, | 930 | const struct kvm_irq_routing_entry *entries, |
| 943 | unsigned nr, | 931 | unsigned nr, |
| 944 | unsigned flags); | 932 | unsigned flags); |
| 945 | int kvm_set_routing_entry(struct kvm_irq_routing_table *rt, | 933 | int kvm_set_routing_entry(struct kvm_kernel_irq_routing_entry *e, |
| 946 | struct kvm_kernel_irq_routing_entry *e, | ||
| 947 | const struct kvm_irq_routing_entry *ue); | 934 | const struct kvm_irq_routing_entry *ue); |
| 948 | void kvm_free_irq_routing(struct kvm *kvm); | 935 | void kvm_free_irq_routing(struct kvm *kvm); |
| 949 | 936 | ||
| 950 | int kvm_send_userspace_msi(struct kvm *kvm, struct kvm_msi *msi); | ||
| 951 | |||
| 952 | #else | 937 | #else |
| 953 | 938 | ||
| 954 | static inline void kvm_free_irq_routing(struct kvm *kvm) {} | 939 | static inline void kvm_free_irq_routing(struct kvm *kvm) {} |
| 955 | 940 | ||
| 956 | #endif | 941 | #endif |
| 957 | 942 | ||
| 943 | int kvm_send_userspace_msi(struct kvm *kvm, struct kvm_msi *msi); | ||
| 944 | |||
| 958 | #ifdef CONFIG_HAVE_KVM_EVENTFD | 945 | #ifdef CONFIG_HAVE_KVM_EVENTFD |
| 959 | 946 | ||
| 960 | void kvm_eventfd_init(struct kvm *kvm); | 947 | void kvm_eventfd_init(struct kvm *kvm); |
| 961 | int kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args); | 948 | int kvm_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd *args); |
| 962 | 949 | ||
| 963 | #ifdef CONFIG_HAVE_KVM_IRQCHIP | 950 | #ifdef CONFIG_HAVE_KVM_IRQFD |
| 964 | int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args); | 951 | int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args); |
| 965 | void kvm_irqfd_release(struct kvm *kvm); | 952 | void kvm_irqfd_release(struct kvm *kvm); |
| 966 | void kvm_irq_routing_update(struct kvm *, struct kvm_irq_routing_table *); | 953 | void kvm_irq_routing_update(struct kvm *); |
| 967 | #else | 954 | #else |
| 968 | static inline int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args) | 955 | static inline int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args) |
| 969 | { | 956 | { |
| @@ -985,10 +972,8 @@ static inline int kvm_irqfd(struct kvm *kvm, struct kvm_irqfd *args) | |||
| 985 | static inline void kvm_irqfd_release(struct kvm *kvm) {} | 972 | static inline void kvm_irqfd_release(struct kvm *kvm) {} |
| 986 | 973 | ||
| 987 | #ifdef CONFIG_HAVE_KVM_IRQCHIP | 974 | #ifdef CONFIG_HAVE_KVM_IRQCHIP |
| 988 | static inline void kvm_irq_routing_update(struct kvm *kvm, | 975 | static inline void kvm_irq_routing_update(struct kvm *kvm) |
| 989 | struct kvm_irq_routing_table *irq_rt) | ||
| 990 | { | 976 | { |
| 991 | rcu_assign_pointer(kvm->irq_routing, irq_rt); | ||
| 992 | } | 977 | } |
| 993 | #endif | 978 | #endif |
| 994 | 979 | ||
