diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2017-04-27 11:33:14 -0400 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-04-27 11:33:14 -0400 |
| commit | c24a7be2110ddac2ab75abcded76c62dccb6b1f0 (patch) | |
| tree | cb4ef87091258db6b0f94cf2d4bd938eae1e26de /include | |
| parent | 70f3aac964ae2bc9a0a1d5d65a62e258591ade18 (diff) | |
| parent | 1edb632133efb6226b6bef3e7d9fa8c7134ac4e2 (diff) | |
Merge tag 'kvm-arm-for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
KVM/ARM Changes for v4.12.
Changes include:
- Using the common sysreg definitions between KVM and arm64
- Improved hyp-stub implementation with support for kexec and kdump on the 32-bit side
- Proper PMU exception handling
- Performance improvements of our GIC handling
- Support for irqchip in userspace with in-kernel arch-timers and PMU support
- A fix for a race condition in our PSCI code
Conflicts:
Documentation/virtual/kvm/api.txt
include/uapi/linux/kvm.h
Diffstat (limited to 'include')
| -rw-r--r-- | include/kvm/arm_arch_timer.h | 2 | ||||
| -rw-r--r-- | include/kvm/arm_pmu.h | 7 | ||||
| -rw-r--r-- | include/kvm/arm_vgic.h | 9 | ||||
| -rw-r--r-- | include/uapi/linux/kvm.h | 8 |
4 files changed, 20 insertions, 6 deletions
diff --git a/include/kvm/arm_arch_timer.h b/include/kvm/arm_arch_timer.h index fe797d6ef89d..295584f31a4e 100644 --- a/include/kvm/arm_arch_timer.h +++ b/include/kvm/arm_arch_timer.h | |||
| @@ -63,6 +63,8 @@ int kvm_timer_vcpu_reset(struct kvm_vcpu *vcpu, | |||
| 63 | void kvm_timer_vcpu_init(struct kvm_vcpu *vcpu); | 63 | void kvm_timer_vcpu_init(struct kvm_vcpu *vcpu); |
| 64 | void kvm_timer_flush_hwstate(struct kvm_vcpu *vcpu); | 64 | void kvm_timer_flush_hwstate(struct kvm_vcpu *vcpu); |
| 65 | void kvm_timer_sync_hwstate(struct kvm_vcpu *vcpu); | 65 | void kvm_timer_sync_hwstate(struct kvm_vcpu *vcpu); |
| 66 | bool kvm_timer_should_notify_user(struct kvm_vcpu *vcpu); | ||
| 67 | void kvm_timer_update_run(struct kvm_vcpu *vcpu); | ||
| 66 | void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu); | 68 | void kvm_timer_vcpu_terminate(struct kvm_vcpu *vcpu); |
| 67 | 69 | ||
| 68 | u64 kvm_arm_timer_get_reg(struct kvm_vcpu *, u64 regid); | 70 | u64 kvm_arm_timer_get_reg(struct kvm_vcpu *, u64 regid); |
diff --git a/include/kvm/arm_pmu.h b/include/kvm/arm_pmu.h index 92e7e97ca8ff..1ab4633adf4f 100644 --- a/include/kvm/arm_pmu.h +++ b/include/kvm/arm_pmu.h | |||
| @@ -50,6 +50,8 @@ void kvm_pmu_enable_counter(struct kvm_vcpu *vcpu, u64 val); | |||
| 50 | void kvm_pmu_overflow_set(struct kvm_vcpu *vcpu, u64 val); | 50 | void kvm_pmu_overflow_set(struct kvm_vcpu *vcpu, u64 val); |
| 51 | void kvm_pmu_flush_hwstate(struct kvm_vcpu *vcpu); | 51 | void kvm_pmu_flush_hwstate(struct kvm_vcpu *vcpu); |
| 52 | void kvm_pmu_sync_hwstate(struct kvm_vcpu *vcpu); | 52 | void kvm_pmu_sync_hwstate(struct kvm_vcpu *vcpu); |
| 53 | bool kvm_pmu_should_notify_user(struct kvm_vcpu *vcpu); | ||
| 54 | void kvm_pmu_update_run(struct kvm_vcpu *vcpu); | ||
| 53 | void kvm_pmu_software_increment(struct kvm_vcpu *vcpu, u64 val); | 55 | void kvm_pmu_software_increment(struct kvm_vcpu *vcpu, u64 val); |
| 54 | void kvm_pmu_handle_pmcr(struct kvm_vcpu *vcpu, u64 val); | 56 | void kvm_pmu_handle_pmcr(struct kvm_vcpu *vcpu, u64 val); |
| 55 | void kvm_pmu_set_counter_event_type(struct kvm_vcpu *vcpu, u64 data, | 57 | void kvm_pmu_set_counter_event_type(struct kvm_vcpu *vcpu, u64 data, |
| @@ -85,6 +87,11 @@ static inline void kvm_pmu_enable_counter(struct kvm_vcpu *vcpu, u64 val) {} | |||
| 85 | static inline void kvm_pmu_overflow_set(struct kvm_vcpu *vcpu, u64 val) {} | 87 | static inline void kvm_pmu_overflow_set(struct kvm_vcpu *vcpu, u64 val) {} |
| 86 | static inline void kvm_pmu_flush_hwstate(struct kvm_vcpu *vcpu) {} | 88 | static inline void kvm_pmu_flush_hwstate(struct kvm_vcpu *vcpu) {} |
| 87 | static inline void kvm_pmu_sync_hwstate(struct kvm_vcpu *vcpu) {} | 89 | static inline void kvm_pmu_sync_hwstate(struct kvm_vcpu *vcpu) {} |
| 90 | static inline bool kvm_pmu_should_notify_user(struct kvm_vcpu *vcpu) | ||
| 91 | { | ||
| 92 | return false; | ||
| 93 | } | ||
| 94 | static inline void kvm_pmu_update_run(struct kvm_vcpu *vcpu) {} | ||
| 88 | static inline void kvm_pmu_software_increment(struct kvm_vcpu *vcpu, u64 val) {} | 95 | static inline void kvm_pmu_software_increment(struct kvm_vcpu *vcpu, u64 val) {} |
| 89 | static inline void kvm_pmu_handle_pmcr(struct kvm_vcpu *vcpu, u64 val) {} | 96 | static inline void kvm_pmu_handle_pmcr(struct kvm_vcpu *vcpu, u64 val) {} |
| 90 | static inline void kvm_pmu_set_counter_event_type(struct kvm_vcpu *vcpu, | 97 | static inline void kvm_pmu_set_counter_event_type(struct kvm_vcpu *vcpu, |
diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h index b72dd2ad5f44..26ed4fb896bb 100644 --- a/include/kvm/arm_vgic.h +++ b/include/kvm/arm_vgic.h | |||
| @@ -225,8 +225,6 @@ struct vgic_dist { | |||
| 225 | struct vgic_v2_cpu_if { | 225 | struct vgic_v2_cpu_if { |
| 226 | u32 vgic_hcr; | 226 | u32 vgic_hcr; |
| 227 | u32 vgic_vmcr; | 227 | u32 vgic_vmcr; |
| 228 | u32 vgic_misr; /* Saved only */ | ||
| 229 | u64 vgic_eisr; /* Saved only */ | ||
| 230 | u64 vgic_elrsr; /* Saved only */ | 228 | u64 vgic_elrsr; /* Saved only */ |
| 231 | u32 vgic_apr; | 229 | u32 vgic_apr; |
| 232 | u32 vgic_lr[VGIC_V2_MAX_LRS]; | 230 | u32 vgic_lr[VGIC_V2_MAX_LRS]; |
| @@ -236,8 +234,6 @@ struct vgic_v3_cpu_if { | |||
| 236 | u32 vgic_hcr; | 234 | u32 vgic_hcr; |
| 237 | u32 vgic_vmcr; | 235 | u32 vgic_vmcr; |
| 238 | u32 vgic_sre; /* Restored only, change ignored */ | 236 | u32 vgic_sre; /* Restored only, change ignored */ |
| 239 | u32 vgic_misr; /* Saved only */ | ||
| 240 | u32 vgic_eisr; /* Saved only */ | ||
| 241 | u32 vgic_elrsr; /* Saved only */ | 237 | u32 vgic_elrsr; /* Saved only */ |
| 242 | u32 vgic_ap0r[4]; | 238 | u32 vgic_ap0r[4]; |
| 243 | u32 vgic_ap1r[4]; | 239 | u32 vgic_ap1r[4]; |
| @@ -264,8 +260,6 @@ struct vgic_cpu { | |||
| 264 | */ | 260 | */ |
| 265 | struct list_head ap_list_head; | 261 | struct list_head ap_list_head; |
| 266 | 262 | ||
| 267 | u64 live_lrs; | ||
| 268 | |||
| 269 | /* | 263 | /* |
| 270 | * Members below are used with GICv3 emulation only and represent | 264 | * Members below are used with GICv3 emulation only and represent |
| 271 | * parts of the redistributor. | 265 | * parts of the redistributor. |
| @@ -306,6 +300,9 @@ bool kvm_vgic_map_is_active(struct kvm_vcpu *vcpu, unsigned int virt_irq); | |||
| 306 | 300 | ||
| 307 | int kvm_vgic_vcpu_pending_irq(struct kvm_vcpu *vcpu); | 301 | int kvm_vgic_vcpu_pending_irq(struct kvm_vcpu *vcpu); |
| 308 | 302 | ||
| 303 | void kvm_vgic_load(struct kvm_vcpu *vcpu); | ||
| 304 | void kvm_vgic_put(struct kvm_vcpu *vcpu); | ||
| 305 | |||
| 309 | #define irqchip_in_kernel(k) (!!((k)->arch.vgic.in_kernel)) | 306 | #define irqchip_in_kernel(k) (!!((k)->arch.vgic.in_kernel)) |
| 310 | #define vgic_initialized(k) ((k)->arch.vgic.initialized) | 307 | #define vgic_initialized(k) ((k)->arch.vgic.initialized) |
| 311 | #define vgic_ready(k) ((k)->arch.vgic.ready) | 308 | #define vgic_ready(k) ((k)->arch.vgic.ready) |
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index e43906b95d9f..577429a95ad8 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h | |||
| @@ -894,6 +894,7 @@ struct kvm_ppc_resize_hpt { | |||
| 894 | #define KVM_CAP_S390_AIS 141 | 894 | #define KVM_CAP_S390_AIS 141 |
| 895 | #define KVM_CAP_SPAPR_TCE_VFIO 142 | 895 | #define KVM_CAP_SPAPR_TCE_VFIO 142 |
| 896 | #define KVM_CAP_X86_GUEST_MWAIT 143 | 896 | #define KVM_CAP_X86_GUEST_MWAIT 143 |
| 897 | #define KVM_CAP_ARM_USER_IRQ 144 | ||
| 897 | 898 | ||
| 898 | #ifdef KVM_CAP_IRQ_ROUTING | 899 | #ifdef KVM_CAP_IRQ_ROUTING |
| 899 | 900 | ||
| @@ -1371,4 +1372,11 @@ struct kvm_assigned_msix_entry { | |||
| 1371 | #define KVM_X2APIC_API_USE_32BIT_IDS (1ULL << 0) | 1372 | #define KVM_X2APIC_API_USE_32BIT_IDS (1ULL << 0) |
| 1372 | #define KVM_X2APIC_API_DISABLE_BROADCAST_QUIRK (1ULL << 1) | 1373 | #define KVM_X2APIC_API_DISABLE_BROADCAST_QUIRK (1ULL << 1) |
| 1373 | 1374 | ||
| 1375 | /* Available with KVM_CAP_ARM_USER_IRQ */ | ||
| 1376 | |||
| 1377 | /* Bits for run->s.regs.device_irq_level */ | ||
| 1378 | #define KVM_ARM_DEV_EL1_VTIMER (1 << 0) | ||
| 1379 | #define KVM_ARM_DEV_EL1_PTIMER (1 << 1) | ||
| 1380 | #define KVM_ARM_DEV_PMU (1 << 2) | ||
| 1381 | |||
| 1374 | #endif /* __LINUX_KVM_H */ | 1382 | #endif /* __LINUX_KVM_H */ |
