vki-xen-mmuext.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. This file is part of Valgrind, a dynamic binary instrumentation
  3. framework.
  4. Copyright (C) 2012-2017 Citrix
  5. This program is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License as
  7. published by the Free Software Foundation; either version 2 of the
  8. License, or (at your option) any later version.
  9. This program is distributed in the hope that it will be useful, but
  10. WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  16. 02111-1307, USA.
  17. The GNU General Public License is contained in the file COPYING.
  18. */
  19. /* Contributed by Andrew Cooper <andrew.cooper3@citrix.com>
  20. and Ian Campbell <ian.campbell@citrix.com> */
  21. #ifndef __VKI_XEN_MMUEXT_H
  22. #define __VKI_XEN_MMUEXT_H
  23. #define VKI_XEN_MMUEXT_PIN_L1_TABLE 0
  24. #define VKI_XEN_MMUEXT_PIN_L2_TABLE 1
  25. #define VKI_XEN_MMUEXT_PIN_L3_TABLE 2
  26. #define VKI_XEN_MMUEXT_PIN_L4_TABLE 3
  27. #define VKI_XEN_MMUEXT_UNPIN_TABLE 4
  28. #define VKI_XEN_MMUEXT_NEW_BASEPTR 5
  29. #define VKI_XEN_MMUEXT_TLB_FLUSH_LOCAL 6
  30. #define VKI_XEN_MMUEXT_INVLPG_LOCAL 7
  31. #define VKI_XEN_MMUEXT_TLB_FLUSH_MULTI 8
  32. #define VKI_XEN_MMUEXT_INVLPG_MULTI 9
  33. #define VKI_XEN_MMUEXT_TLB_FLUSH_ALL 10
  34. #define VKI_XEN_MMUEXT_INVLPG_ALL 11
  35. #define VKI_XEN_MMUEXT_FLUSH_CACHE 12
  36. #define VKI_XEN_MMUEXT_SET_LDT 13
  37. #define VKI_XEN_MMUEXT_NEW_USER_BASEPTR 15
  38. #define VKI_XEN_MMUEXT_CLEAR_PAGE 16
  39. #define VKI_XEN_MMUEXT_COPY_PAGE 17
  40. #define VKI_XEN_MMUEXT_FLUSH_CACHE_GLOBAL 18
  41. #define VKI_XEN_MMUEXT_MARK_SUPER 19
  42. #define VKI_XEN_MMUEXT_UNMARK_SUPER 20
  43. struct vki_xen_mmuext_op {
  44. unsigned int cmd;
  45. union {
  46. /* [UN]PIN_TABLE, NEW_BASEPTR, NEW_USER_BASEPTR
  47. * CLEAR_PAGE, COPY_PAGE, [UN]MARK_SUPER */
  48. vki_xen_pfn_t mfn;
  49. /* INVLPG_LOCAL, INVLPG_ALL, SET_LDT */
  50. unsigned long linear_addr;
  51. } arg1;
  52. union {
  53. /* SET_LDT */
  54. unsigned int nr_ents;
  55. /* TLB_FLUSH_MULTI, INVLPG_MULTI */
  56. VKI_XEN_GUEST_HANDLE(const_void) vcpumask;
  57. /* COPY_PAGE */
  58. vki_xen_pfn_t src_mfn;
  59. } arg2;
  60. };
  61. #endif // __VKI_XEN_MMUEXT_H
  62. /*--------------------------------------------------------------------*/
  63. /*--- end ---*/
  64. /*--------------------------------------------------------------------*/