Thomas Gleixner | d94d71c | 2019-05-29 07:12:40 -0700 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Christoffer Dall | 749cf76c | 2013-01-20 18:28:06 -0500 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2012 Rusty Russell IBM Corporation |
Christoffer Dall | 749cf76c | 2013-01-20 18:28:06 -0500 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef __ARM_KVM_COPROC_H__ |
| 7 | #define __ARM_KVM_COPROC_H__ |
| 8 | #include <linux/kvm_host.h> |
| 9 | |
| 10 | void kvm_reset_coprocs(struct kvm_vcpu *vcpu); |
| 11 | |
Christoffer Dall | 5b3e5e5 | 2013-01-20 18:28:09 -0500 | [diff] [blame] | 12 | struct kvm_coproc_target_table { |
| 13 | unsigned target; |
| 14 | const struct coproc_reg *table; |
| 15 | size_t num; |
| 16 | }; |
| 17 | void kvm_register_target_coproc_table(struct kvm_coproc_target_table *table); |
| 18 | |
| 19 | int kvm_handle_cp10_id(struct kvm_vcpu *vcpu, struct kvm_run *run); |
| 20 | int kvm_handle_cp_0_13_access(struct kvm_vcpu *vcpu, struct kvm_run *run); |
| 21 | int kvm_handle_cp14_load_store(struct kvm_vcpu *vcpu, struct kvm_run *run); |
Zhichao Huang | 661e6b0 | 2017-05-11 13:46:11 +0100 | [diff] [blame] | 22 | int kvm_handle_cp14_32(struct kvm_vcpu *vcpu, struct kvm_run *run); |
| 23 | int kvm_handle_cp14_64(struct kvm_vcpu *vcpu, struct kvm_run *run); |
Christoffer Dall | 5b3e5e5 | 2013-01-20 18:28:09 -0500 | [diff] [blame] | 24 | int kvm_handle_cp15_32(struct kvm_vcpu *vcpu, struct kvm_run *run); |
| 25 | int kvm_handle_cp15_64(struct kvm_vcpu *vcpu, struct kvm_run *run); |
Christoffer Dall | 1138245 | 2013-01-20 18:28:10 -0500 | [diff] [blame] | 26 | |
| 27 | unsigned long kvm_arm_num_guest_msrs(struct kvm_vcpu *vcpu); |
| 28 | int kvm_arm_copy_msrindices(struct kvm_vcpu *vcpu, u64 __user *uindices); |
Christoffer Dall | 5b3e5e5 | 2013-01-20 18:28:09 -0500 | [diff] [blame] | 29 | void kvm_coproc_table_init(void); |
Christoffer Dall | 1138245 | 2013-01-20 18:28:10 -0500 | [diff] [blame] | 30 | |
| 31 | struct kvm_one_reg; |
| 32 | int kvm_arm_copy_coproc_indices(struct kvm_vcpu *vcpu, u64 __user *uindices); |
| 33 | int kvm_arm_coproc_get_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *); |
| 34 | int kvm_arm_coproc_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *); |
| 35 | unsigned long kvm_arm_num_coproc_regs(struct kvm_vcpu *vcpu); |
Christoffer Dall | 749cf76c | 2013-01-20 18:28:06 -0500 | [diff] [blame] | 36 | #endif /* __ARM_KVM_COPROC_H__ */ |