diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2012-12-10 11:15:34 -0500 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2013-06-07 09:03:36 -0400 |
commit | 7c8c5e6a9101ea57a1c2c9faff0917e79251a21e (patch) | |
tree | 9cfd6c3a7f2c1235911b0473bec8ce00b4f3fca0 /arch/arm64/include/asm/kvm_coproc.h | |
parent | 54f81d0eb93896da73d1636bca84cf90f52cabdf (diff) |
arm64: KVM: system register handling
Provide 64bit system register handling, modeled after the cp15
handling for ARM.
Reviewed-by: Christopher Covington <cov@codeaurora.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/kvm_coproc.h')
-rw-r--r-- | arch/arm64/include/asm/kvm_coproc.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/kvm_coproc.h b/arch/arm64/include/asm/kvm_coproc.h new file mode 100644 index 000000000000..9b4477acb554 --- /dev/null +++ b/arch/arm64/include/asm/kvm_coproc.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2012,2013 - ARM Ltd | ||
3 | * Author: Marc Zyngier <marc.zyngier@arm.com> | ||
4 | * | ||
5 | * Derived from arch/arm/include/asm/kvm_coproc.h | ||
6 | * Copyright (C) 2012 Rusty Russell IBM Corporation | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | */ | ||
20 | |||
21 | #ifndef __ARM64_KVM_COPROC_H__ | ||
22 | #define __ARM64_KVM_COPROC_H__ | ||
23 | |||
24 | #include <linux/kvm_host.h> | ||
25 | |||
26 | void kvm_reset_sys_regs(struct kvm_vcpu *vcpu); | ||
27 | |||
28 | struct kvm_sys_reg_table { | ||
29 | const struct sys_reg_desc *table; | ||
30 | size_t num; | ||
31 | }; | ||
32 | |||
33 | struct kvm_sys_reg_target_table { | ||
34 | struct kvm_sys_reg_table table64; | ||
35 | }; | ||
36 | |||
37 | void kvm_register_target_sys_reg_table(unsigned int target, | ||
38 | struct kvm_sys_reg_target_table *table); | ||
39 | |||
40 | int kvm_handle_sys_reg(struct kvm_vcpu *vcpu, struct kvm_run *run); | ||
41 | |||
42 | #define kvm_coproc_table_init kvm_sys_reg_table_init | ||
43 | void kvm_sys_reg_table_init(void); | ||
44 | |||
45 | struct kvm_one_reg; | ||
46 | int kvm_arm_copy_sys_reg_indices(struct kvm_vcpu *vcpu, u64 __user *uindices); | ||
47 | int kvm_arm_sys_reg_get_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *); | ||
48 | int kvm_arm_sys_reg_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *); | ||
49 | unsigned long kvm_arm_num_sys_reg_descs(struct kvm_vcpu *vcpu); | ||
50 | |||
51 | #endif /* __ARM64_KVM_COPROC_H__ */ | ||