kvm_types.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * This program is free software; you can redistribute it and/or modify
  3. * it under the terms of the GNU General Public License as published by
  4. * the Free Software Foundation; either version 2 of the License.
  5. *
  6. * This program is distributed in the hope that it will be useful,
  7. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. * GNU General Public License for more details.
  10. *
  11. * You should have received a copy of the GNU General Public License
  12. * along with this program; if not, write to the Free Software
  13. * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  14. *
  15. */
  16. #ifndef __KVM_TYPES_H__
  17. #define __KVM_TYPES_H__
  18. struct kvm;
  19. struct kvm_async_pf;
  20. struct kvm_device_ops;
  21. struct kvm_interrupt;
  22. struct kvm_irq_routing_table;
  23. struct kvm_memory_slot;
  24. struct kvm_one_reg;
  25. struct kvm_run;
  26. struct kvm_userspace_memory_region;
  27. struct kvm_vcpu;
  28. struct kvm_vcpu_init;
  29. struct kvm_memslots;
  30. enum kvm_mr_change;
  31. #include <asm/types.h>
  32. /*
  33. * Address types:
  34. *
  35. * gva - guest virtual address
  36. * gpa - guest physical address
  37. * gfn - guest frame number
  38. * hva - host virtual address
  39. * hpa - host physical address
  40. * hfn - host frame number
  41. */
  42. typedef unsigned long gva_t;
  43. typedef u64 gpa_t;
  44. typedef u64 gfn_t;
  45. typedef unsigned long hva_t;
  46. typedef u64 hpa_t;
  47. typedef u64 hfn_t;
  48. typedef hfn_t pfn_t;
  49. struct gfn_to_hva_cache {
  50. u64 generation;
  51. gpa_t gpa;
  52. unsigned long hva;
  53. unsigned long len;
  54. struct kvm_memory_slot *memslot;
  55. };
  56. #endif /* __KVM_TYPES_H__ */