kvm_coproc.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. #ifndef __ARM64_KVM_COPROC_H__
  21. #define __ARM64_KVM_COPROC_H__
  22. #include <linux/kvm_host.h>
  23. void kvm_reset_sys_regs(struct kvm_vcpu *vcpu);
  24. struct kvm_sys_reg_table {
  25. const struct sys_reg_desc *table;
  26. size_t num;
  27. };
  28. struct kvm_sys_reg_target_table {
  29. struct kvm_sys_reg_table table64;
  30. struct kvm_sys_reg_table table32;
  31. };
  32. void kvm_register_target_sys_reg_table(unsigned int target,
  33. struct kvm_sys_reg_target_table *table);
  34. int kvm_handle_cp14_load_store(struct kvm_vcpu *vcpu, struct kvm_run *run);
  35. int kvm_handle_cp14_32(struct kvm_vcpu *vcpu, struct kvm_run *run);
  36. int kvm_handle_cp14_64(struct kvm_vcpu *vcpu, struct kvm_run *run);
  37. int kvm_handle_cp15_32(struct kvm_vcpu *vcpu, struct kvm_run *run);
  38. int kvm_handle_cp15_64(struct kvm_vcpu *vcpu, struct kvm_run *run);
  39. int kvm_handle_sys_reg(struct kvm_vcpu *vcpu, struct kvm_run *run);
  40. #define kvm_coproc_table_init kvm_sys_reg_table_init
  41. void kvm_sys_reg_table_init(void);
  42. struct kvm_one_reg;
  43. int kvm_arm_copy_sys_reg_indices(struct kvm_vcpu *vcpu, u64 __user *uindices);
  44. int kvm_arm_sys_reg_get_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *);
  45. int kvm_arm_sys_reg_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *);
  46. unsigned long kvm_arm_num_sys_reg_descs(struct kvm_vcpu *vcpu);
  47. #endif /* __ARM64_KVM_COPROC_H__ */