diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2015-04-07 12:09:20 -0400 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-04-07 12:09:20 -0400 |
| commit | bf0fb67cf957fc8ecfaaa2819b7d6a0f795e2ef2 (patch) | |
| tree | 22697f7deae781dbbacd2e19a5030df2e8551e6a /arch/arm/include | |
| parent | 8999602d08a804ae9cb271fdd5378f910058112d (diff) | |
| parent | d44758c0dfc5993a4b9952935a7eae4c91ebb6b4 (diff) | |
Merge tag 'kvm-arm-for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into 'kvm-next'
KVM/ARM changes for v4.1:
- fixes for live migration
- irqfd support
- kvm-io-bus & vgic rework to enable ioeventfd
- page ageing for stage-2 translation
- various cleanups
Diffstat (limited to 'arch/arm/include')
| -rw-r--r-- | arch/arm/include/asm/kvm_arm.h | 1 | ||||
| -rw-r--r-- | arch/arm/include/asm/kvm_host.h | 15 | ||||
| -rw-r--r-- | arch/arm/include/asm/kvm_mmio.h | 22 | ||||
| -rw-r--r-- | arch/arm/include/uapi/asm/kvm.h | 3 |
4 files changed, 8 insertions, 33 deletions
diff --git a/arch/arm/include/asm/kvm_arm.h b/arch/arm/include/asm/kvm_arm.h index 816db0bf2dd8..d995821f1698 100644 --- a/arch/arm/include/asm/kvm_arm.h +++ b/arch/arm/include/asm/kvm_arm.h | |||
| @@ -185,6 +185,7 @@ | |||
| 185 | #define HSR_COND (0xfU << HSR_COND_SHIFT) | 185 | #define HSR_COND (0xfU << HSR_COND_SHIFT) |
| 186 | 186 | ||
| 187 | #define FSC_FAULT (0x04) | 187 | #define FSC_FAULT (0x04) |
| 188 | #define FSC_ACCESS (0x08) | ||
| 188 | #define FSC_PERM (0x0c) | 189 | #define FSC_PERM (0x0c) |
| 189 | 190 | ||
| 190 | /* Hyp Prefetch Fault Address Register (HPFAR/HDFAR) */ | 191 | /* Hyp Prefetch Fault Address Register (HPFAR/HDFAR) */ |
diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h index 41008cd7c53f..d71607c16601 100644 --- a/arch/arm/include/asm/kvm_host.h +++ b/arch/arm/include/asm/kvm_host.h | |||
| @@ -27,6 +27,8 @@ | |||
| 27 | #include <asm/fpstate.h> | 27 | #include <asm/fpstate.h> |
| 28 | #include <kvm/arm_arch_timer.h> | 28 | #include <kvm/arm_arch_timer.h> |
| 29 | 29 | ||
| 30 | #define __KVM_HAVE_ARCH_INTC_INITIALIZED | ||
| 31 | |||
| 30 | #if defined(CONFIG_KVM_ARM_MAX_VCPUS) | 32 | #if defined(CONFIG_KVM_ARM_MAX_VCPUS) |
| 31 | #define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS | 33 | #define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS |
| 32 | #else | 34 | #else |
| @@ -165,19 +167,10 @@ void kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte); | |||
| 165 | 167 | ||
| 166 | unsigned long kvm_arm_num_regs(struct kvm_vcpu *vcpu); | 168 | unsigned long kvm_arm_num_regs(struct kvm_vcpu *vcpu); |
| 167 | int kvm_arm_copy_reg_indices(struct kvm_vcpu *vcpu, u64 __user *indices); | 169 | int kvm_arm_copy_reg_indices(struct kvm_vcpu *vcpu, u64 __user *indices); |
| 170 | int kvm_age_hva(struct kvm *kvm, unsigned long start, unsigned long end); | ||
| 171 | int kvm_test_age_hva(struct kvm *kvm, unsigned long hva); | ||
| 168 | 172 | ||
| 169 | /* We do not have shadow page tables, hence the empty hooks */ | 173 | /* We do not have shadow page tables, hence the empty hooks */ |
| 170 | static inline int kvm_age_hva(struct kvm *kvm, unsigned long start, | ||
| 171 | unsigned long end) | ||
| 172 | { | ||
| 173 | return 0; | ||
| 174 | } | ||
| 175 | |||
| 176 | static inline int kvm_test_age_hva(struct kvm *kvm, unsigned long hva) | ||
| 177 | { | ||
| 178 | return 0; | ||
| 179 | } | ||
| 180 | |||
| 181 | static inline void kvm_arch_mmu_notifier_invalidate_page(struct kvm *kvm, | 174 | static inline void kvm_arch_mmu_notifier_invalidate_page(struct kvm *kvm, |
| 182 | unsigned long address) | 175 | unsigned long address) |
| 183 | { | 176 | { |
diff --git a/arch/arm/include/asm/kvm_mmio.h b/arch/arm/include/asm/kvm_mmio.h index 3f83db2f6cf0..d8e90c8cb5fa 100644 --- a/arch/arm/include/asm/kvm_mmio.h +++ b/arch/arm/include/asm/kvm_mmio.h | |||
| @@ -28,28 +28,6 @@ struct kvm_decode { | |||
| 28 | bool sign_extend; | 28 | bool sign_extend; |
| 29 | }; | 29 | }; |
| 30 | 30 | ||
| 31 | /* | ||
| 32 | * The in-kernel MMIO emulation code wants to use a copy of run->mmio, | ||
| 33 | * which is an anonymous type. Use our own type instead. | ||
| 34 | */ | ||
| 35 | struct kvm_exit_mmio { | ||
| 36 | phys_addr_t phys_addr; | ||
| 37 | u8 data[8]; | ||
| 38 | u32 len; | ||
| 39 | bool is_write; | ||
| 40 | void *private; | ||
| 41 | }; | ||
| 42 | |||
| 43 | static inline void kvm_prepare_mmio(struct kvm_run *run, | ||
| 44 | struct kvm_exit_mmio *mmio) | ||
| 45 | { | ||
| 46 | run->mmio.phys_addr = mmio->phys_addr; | ||
| 47 | run->mmio.len = mmio->len; | ||
| 48 | run->mmio.is_write = mmio->is_write; | ||
| 49 | memcpy(run->mmio.data, mmio->data, mmio->len); | ||
| 50 | run->exit_reason = KVM_EXIT_MMIO; | ||
| 51 | } | ||
| 52 | |||
| 53 | int kvm_handle_mmio_return(struct kvm_vcpu *vcpu, struct kvm_run *run); | 31 | int kvm_handle_mmio_return(struct kvm_vcpu *vcpu, struct kvm_run *run); |
| 54 | int io_mem_abort(struct kvm_vcpu *vcpu, struct kvm_run *run, | 32 | int io_mem_abort(struct kvm_vcpu *vcpu, struct kvm_run *run, |
| 55 | phys_addr_t fault_ipa); | 33 | phys_addr_t fault_ipa); |
diff --git a/arch/arm/include/uapi/asm/kvm.h b/arch/arm/include/uapi/asm/kvm.h index 0db25bc32864..2499867dd0d8 100644 --- a/arch/arm/include/uapi/asm/kvm.h +++ b/arch/arm/include/uapi/asm/kvm.h | |||
| @@ -198,6 +198,9 @@ struct kvm_arch_memory_slot { | |||
| 198 | /* Highest supported SPI, from VGIC_NR_IRQS */ | 198 | /* Highest supported SPI, from VGIC_NR_IRQS */ |
| 199 | #define KVM_ARM_IRQ_GIC_MAX 127 | 199 | #define KVM_ARM_IRQ_GIC_MAX 127 |
| 200 | 200 | ||
| 201 | /* One single KVM irqchip, ie. the VGIC */ | ||
| 202 | #define KVM_NR_IRQCHIPS 1 | ||
| 203 | |||
| 201 | /* PSCI interface */ | 204 | /* PSCI interface */ |
| 202 | #define KVM_PSCI_FN_BASE 0x95c1ba5e | 205 | #define KVM_PSCI_FN_BASE 0x95c1ba5e |
| 203 | #define KVM_PSCI_FN(n) (KVM_PSCI_FN_BASE + (n)) | 206 | #define KVM_PSCI_FN(n) (KVM_PSCI_FN_BASE + (n)) |
