diff options
| author | Christoffer Dall <christoffer.dall@linaro.org> | 2014-09-18 21:15:32 -0400 |
|---|---|---|
| committer | Christoffer Dall <christoffer.dall@linaro.org> | 2014-09-18 21:15:32 -0400 |
| commit | a875dafcf9b6b266c855e1f9b0aa060ef585d38a (patch) | |
| tree | 1903cb0a39ac1cade1940ccb559591cddf3660a0 /include | |
| parent | 0ba09511ddc3ff0b462f37b4fe4b9c4dccc054ec (diff) | |
| parent | f51770ed465e6eb41da7fa16fd92eb67069600cf (diff) | |
Merge remote-tracking branch 'kvm/next' into queue
Conflicts:
arch/arm64/include/asm/kvm_host.h
virt/kvm/arm/vgic.c
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/kvm_host.h | 14 | ||||
| -rw-r--r-- | include/linux/kvm_types.h | 14 | ||||
| -rw-r--r-- | include/trace/events/kvm.h | 20 | ||||
| -rw-r--r-- | include/uapi/linux/kvm.h | 28 |
4 files changed, 54 insertions, 22 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 6d8a658ec174..bbd8d57b04e0 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
| @@ -140,8 +140,6 @@ static inline bool is_error_page(struct page *page) | |||
| 140 | #define KVM_USERSPACE_IRQ_SOURCE_ID 0 | 140 | #define KVM_USERSPACE_IRQ_SOURCE_ID 0 |
| 141 | #define KVM_IRQFD_RESAMPLE_IRQ_SOURCE_ID 1 | 141 | #define KVM_IRQFD_RESAMPLE_IRQ_SOURCE_ID 1 |
| 142 | 142 | ||
| 143 | struct kvm; | ||
| 144 | struct kvm_vcpu; | ||
| 145 | extern struct kmem_cache *kvm_vcpu_cache; | 143 | extern struct kmem_cache *kvm_vcpu_cache; |
| 146 | 144 | ||
| 147 | extern spinlock_t kvm_lock; | 145 | extern spinlock_t kvm_lock; |
| @@ -325,8 +323,6 @@ struct kvm_kernel_irq_routing_entry { | |||
| 325 | struct hlist_node link; | 323 | struct hlist_node link; |
| 326 | }; | 324 | }; |
| 327 | 325 | ||
| 328 | struct kvm_irq_routing_table; | ||
| 329 | |||
| 330 | #ifndef KVM_PRIVATE_MEM_SLOTS | 326 | #ifndef KVM_PRIVATE_MEM_SLOTS |
| 331 | #define KVM_PRIVATE_MEM_SLOTS 0 | 327 | #define KVM_PRIVATE_MEM_SLOTS 0 |
| 332 | #endif | 328 | #endif |
| @@ -636,8 +632,8 @@ int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu); | |||
| 636 | int kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu); | 632 | int kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu); |
| 637 | void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu); | 633 | void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu); |
| 638 | 634 | ||
| 639 | int kvm_arch_hardware_enable(void *garbage); | 635 | int kvm_arch_hardware_enable(void); |
| 640 | void kvm_arch_hardware_disable(void *garbage); | 636 | void kvm_arch_hardware_disable(void); |
| 641 | int kvm_arch_hardware_setup(void); | 637 | int kvm_arch_hardware_setup(void); |
| 642 | void kvm_arch_hardware_unsetup(void); | 638 | void kvm_arch_hardware_unsetup(void); |
| 643 | void kvm_arch_check_processor_compat(void *rtn); | 639 | void kvm_arch_check_processor_compat(void *rtn); |
| @@ -1038,8 +1034,6 @@ static inline bool kvm_check_request(int req, struct kvm_vcpu *vcpu) | |||
| 1038 | 1034 | ||
| 1039 | extern bool kvm_rebooting; | 1035 | extern bool kvm_rebooting; |
| 1040 | 1036 | ||
| 1041 | struct kvm_device_ops; | ||
| 1042 | |||
| 1043 | struct kvm_device { | 1037 | struct kvm_device { |
| 1044 | struct kvm_device_ops *ops; | 1038 | struct kvm_device_ops *ops; |
| 1045 | struct kvm *kvm; | 1039 | struct kvm *kvm; |
| @@ -1072,12 +1066,10 @@ struct kvm_device_ops { | |||
| 1072 | void kvm_device_get(struct kvm_device *dev); | 1066 | void kvm_device_get(struct kvm_device *dev); |
| 1073 | void kvm_device_put(struct kvm_device *dev); | 1067 | void kvm_device_put(struct kvm_device *dev); |
| 1074 | struct kvm_device *kvm_device_from_filp(struct file *filp); | 1068 | struct kvm_device *kvm_device_from_filp(struct file *filp); |
| 1069 | int kvm_register_device_ops(struct kvm_device_ops *ops, u32 type); | ||
| 1075 | 1070 | ||
| 1076 | extern struct kvm_device_ops kvm_mpic_ops; | 1071 | extern struct kvm_device_ops kvm_mpic_ops; |
| 1077 | extern struct kvm_device_ops kvm_xics_ops; | 1072 | extern struct kvm_device_ops kvm_xics_ops; |
| 1078 | extern struct kvm_device_ops kvm_vfio_ops; | ||
| 1079 | extern struct kvm_device_ops kvm_arm_vgic_v2_ops; | ||
| 1080 | extern struct kvm_device_ops kvm_flic_ops; | ||
| 1081 | 1073 | ||
| 1082 | #ifdef CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT | 1074 | #ifdef CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT |
| 1083 | 1075 | ||
diff --git a/include/linux/kvm_types.h b/include/linux/kvm_types.h index b0bcce0ddc95..b606bb689a3e 100644 --- a/include/linux/kvm_types.h +++ b/include/linux/kvm_types.h | |||
| @@ -17,6 +17,20 @@ | |||
| 17 | #ifndef __KVM_TYPES_H__ | 17 | #ifndef __KVM_TYPES_H__ |
| 18 | #define __KVM_TYPES_H__ | 18 | #define __KVM_TYPES_H__ |
| 19 | 19 | ||
| 20 | struct kvm; | ||
| 21 | struct kvm_async_pf; | ||
| 22 | struct kvm_device_ops; | ||
| 23 | struct kvm_interrupt; | ||
| 24 | struct kvm_irq_routing_table; | ||
| 25 | struct kvm_memory_slot; | ||
| 26 | struct kvm_one_reg; | ||
| 27 | struct kvm_run; | ||
| 28 | struct kvm_userspace_memory_region; | ||
| 29 | struct kvm_vcpu; | ||
| 30 | struct kvm_vcpu_init; | ||
| 31 | |||
| 32 | enum kvm_mr_change; | ||
| 33 | |||
| 20 | #include <asm/types.h> | 34 | #include <asm/types.h> |
| 21 | 35 | ||
| 22 | /* | 36 | /* |
diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h index 908925ace776..ab679c395042 100644 --- a/include/trace/events/kvm.h +++ b/include/trace/events/kvm.h | |||
| @@ -95,6 +95,26 @@ TRACE_EVENT(kvm_ioapic_set_irq, | |||
| 95 | __entry->coalesced ? " (coalesced)" : "") | 95 | __entry->coalesced ? " (coalesced)" : "") |
| 96 | ); | 96 | ); |
| 97 | 97 | ||
| 98 | TRACE_EVENT(kvm_ioapic_delayed_eoi_inj, | ||
| 99 | TP_PROTO(__u64 e), | ||
| 100 | TP_ARGS(e), | ||
| 101 | |||
| 102 | TP_STRUCT__entry( | ||
| 103 | __field( __u64, e ) | ||
| 104 | ), | ||
| 105 | |||
| 106 | TP_fast_assign( | ||
| 107 | __entry->e = e; | ||
| 108 | ), | ||
| 109 | |||
| 110 | TP_printk("dst %x vec=%u (%s|%s|%s%s)", | ||
| 111 | (u8)(__entry->e >> 56), (u8)__entry->e, | ||
| 112 | __print_symbolic((__entry->e >> 8 & 0x7), kvm_deliver_mode), | ||
| 113 | (__entry->e & (1<<11)) ? "logical" : "physical", | ||
| 114 | (__entry->e & (1<<15)) ? "level" : "edge", | ||
| 115 | (__entry->e & (1<<16)) ? "|masked" : "") | ||
| 116 | ); | ||
| 117 | |||
| 98 | TRACE_EVENT(kvm_msi_set_irq, | 118 | TRACE_EVENT(kvm_msi_set_irq, |
| 99 | TP_PROTO(__u64 address, __u64 data), | 119 | TP_PROTO(__u64 address, __u64 data), |
| 100 | TP_ARGS(address, data), | 120 | TP_ARGS(address, data), |
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index cf3a2ff440e4..60768822b140 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h | |||
| @@ -654,9 +654,7 @@ struct kvm_ppc_smmu_info { | |||
| 654 | #endif | 654 | #endif |
| 655 | /* Bug in KVM_SET_USER_MEMORY_REGION fixed: */ | 655 | /* Bug in KVM_SET_USER_MEMORY_REGION fixed: */ |
| 656 | #define KVM_CAP_DESTROY_MEMORY_REGION_WORKS 21 | 656 | #define KVM_CAP_DESTROY_MEMORY_REGION_WORKS 21 |
| 657 | #ifdef __KVM_HAVE_USER_NMI | ||
| 658 | #define KVM_CAP_USER_NMI 22 | 657 | #define KVM_CAP_USER_NMI 22 |
| 659 | #endif | ||
| 660 | #ifdef __KVM_HAVE_GUEST_DEBUG | 658 | #ifdef __KVM_HAVE_GUEST_DEBUG |
| 661 | #define KVM_CAP_SET_GUEST_DEBUG 23 | 659 | #define KVM_CAP_SET_GUEST_DEBUG 23 |
| 662 | #endif | 660 | #endif |
| @@ -738,9 +736,7 @@ struct kvm_ppc_smmu_info { | |||
| 738 | #define KVM_CAP_PPC_GET_SMMU_INFO 78 | 736 | #define KVM_CAP_PPC_GET_SMMU_INFO 78 |
| 739 | #define KVM_CAP_S390_COW 79 | 737 | #define KVM_CAP_S390_COW 79 |
| 740 | #define KVM_CAP_PPC_ALLOC_HTAB 80 | 738 | #define KVM_CAP_PPC_ALLOC_HTAB 80 |
| 741 | #ifdef __KVM_HAVE_READONLY_MEM | ||
| 742 | #define KVM_CAP_READONLY_MEM 81 | 739 | #define KVM_CAP_READONLY_MEM 81 |
| 743 | #endif | ||
| 744 | #define KVM_CAP_IRQFD_RESAMPLE 82 | 740 | #define KVM_CAP_IRQFD_RESAMPLE 82 |
| 745 | #define KVM_CAP_PPC_BOOKE_WATCHDOG 83 | 741 | #define KVM_CAP_PPC_BOOKE_WATCHDOG 83 |
| 746 | #define KVM_CAP_PPC_HTAB_FD 84 | 742 | #define KVM_CAP_PPC_HTAB_FD 84 |
| @@ -947,15 +943,25 @@ struct kvm_device_attr { | |||
| 947 | __u64 addr; /* userspace address of attr data */ | 943 | __u64 addr; /* userspace address of attr data */ |
| 948 | }; | 944 | }; |
| 949 | 945 | ||
| 950 | #define KVM_DEV_TYPE_FSL_MPIC_20 1 | ||
| 951 | #define KVM_DEV_TYPE_FSL_MPIC_42 2 | ||
| 952 | #define KVM_DEV_TYPE_XICS 3 | ||
| 953 | #define KVM_DEV_TYPE_VFIO 4 | ||
| 954 | #define KVM_DEV_VFIO_GROUP 1 | 946 | #define KVM_DEV_VFIO_GROUP 1 |
| 955 | #define KVM_DEV_VFIO_GROUP_ADD 1 | 947 | #define KVM_DEV_VFIO_GROUP_ADD 1 |
| 956 | #define KVM_DEV_VFIO_GROUP_DEL 2 | 948 | #define KVM_DEV_VFIO_GROUP_DEL 2 |
| 957 | #define KVM_DEV_TYPE_ARM_VGIC_V2 5 | 949 | |
| 958 | #define KVM_DEV_TYPE_FLIC 6 | 950 | enum kvm_device_type { |
| 951 | KVM_DEV_TYPE_FSL_MPIC_20 = 1, | ||
| 952 | #define KVM_DEV_TYPE_FSL_MPIC_20 KVM_DEV_TYPE_FSL_MPIC_20 | ||
| 953 | KVM_DEV_TYPE_FSL_MPIC_42, | ||
| 954 | #define KVM_DEV_TYPE_FSL_MPIC_42 KVM_DEV_TYPE_FSL_MPIC_42 | ||
| 955 | KVM_DEV_TYPE_XICS, | ||
| 956 | #define KVM_DEV_TYPE_XICS KVM_DEV_TYPE_XICS | ||
| 957 | KVM_DEV_TYPE_VFIO, | ||
| 958 | #define KVM_DEV_TYPE_VFIO KVM_DEV_TYPE_VFIO | ||
| 959 | KVM_DEV_TYPE_ARM_VGIC_V2, | ||
| 960 | #define KVM_DEV_TYPE_ARM_VGIC_V2 KVM_DEV_TYPE_ARM_VGIC_V2 | ||
| 961 | KVM_DEV_TYPE_FLIC, | ||
| 962 | #define KVM_DEV_TYPE_FLIC KVM_DEV_TYPE_FLIC | ||
| 963 | KVM_DEV_TYPE_MAX, | ||
| 964 | }; | ||
| 959 | 965 | ||
| 960 | /* | 966 | /* |
| 961 | * ioctls for VM fds | 967 | * ioctls for VM fds |
| @@ -1093,7 +1099,7 @@ struct kvm_s390_ucas_mapping { | |||
| 1093 | #define KVM_S390_INITIAL_RESET _IO(KVMIO, 0x97) | 1099 | #define KVM_S390_INITIAL_RESET _IO(KVMIO, 0x97) |
| 1094 | #define KVM_GET_MP_STATE _IOR(KVMIO, 0x98, struct kvm_mp_state) | 1100 | #define KVM_GET_MP_STATE _IOR(KVMIO, 0x98, struct kvm_mp_state) |
| 1095 | #define KVM_SET_MP_STATE _IOW(KVMIO, 0x99, struct kvm_mp_state) | 1101 | #define KVM_SET_MP_STATE _IOW(KVMIO, 0x99, struct kvm_mp_state) |
| 1096 | /* Available with KVM_CAP_NMI */ | 1102 | /* Available with KVM_CAP_USER_NMI */ |
| 1097 | #define KVM_NMI _IO(KVMIO, 0x9a) | 1103 | #define KVM_NMI _IO(KVMIO, 0x9a) |
| 1098 | /* Available with KVM_CAP_SET_GUEST_DEBUG */ | 1104 | /* Available with KVM_CAP_SET_GUEST_DEBUG */ |
| 1099 | #define KVM_SET_GUEST_DEBUG _IOW(KVMIO, 0x9b, struct kvm_guest_debug) | 1105 | #define KVM_SET_GUEST_DEBUG _IOW(KVMIO, 0x9b, struct kvm_guest_debug) |
