mvpkm_private.h 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /*
  2. * Linux 2.6.32 and later Kernel module for VMware MVP Hypervisor Support
  3. *
  4. * Copyright (C) 2010-2013 VMware, Inc. All rights reserved.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License version 2 as published by
  8. * the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful, but WITHOUT
  11. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  13. * more details.
  14. *
  15. * You should have received a copy of the GNU General Public License along with
  16. * this program; see the file COPYING. If not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18. */
  19. #line 5
  20. /**
  21. * @file
  22. *
  23. * @brief Private interface between user level wrappers and kernel module.
  24. * The communication uses the ioctl linux call. The command operand is one
  25. * of the MVPKM_xxx macros defined below, the custom operand is a pointer
  26. * to the respective structure below.
  27. */
  28. #ifndef _MVPKMPRIVATE_H
  29. #define _MVPKMPRIVATE_H
  30. #define INCLUDE_ALLOW_MVPD
  31. #define INCLUDE_ALLOW_MODULE
  32. #define INCLUDE_ALLOW_HOSTUSER
  33. #define INCLUDE_ALLOW_GPL
  34. #include "include_check.h"
  35. #include <linux/ioctl.h>
  36. /*
  37. * For details how to create ioctl numbers, see
  38. * Documentation/ioctl/ioctl-number.txt. The letter '9' is
  39. * unused. The 0xa0-0xaf block is even more unused. Note however, that
  40. * ioctl numbers are desired to be unique for debug purposes, they
  41. * may conflict.
  42. */
  43. #define MVP_IOCTL_LETTER '9'
  44. #define MVPKM_DISABLE_FAULT _IO(MVP_IOCTL_LETTER, 0xa0)
  45. #define MVPKM_LOCK_MPN _IOW(MVP_IOCTL_LETTER, 0xa1, MvpkmLockMPN)
  46. #define MVPKM_UNLOCK_MPN _IOW(MVP_IOCTL_LETTER, 0xa2, MvpkmLockMPN)
  47. #define MVPKM_RUN_MONITOR _IO(MVP_IOCTL_LETTER, 0xa3)
  48. #define MVPKM_CPU_INFO _IOR(MVP_IOCTL_LETTER, 0xa4, MvpkmCpuInfo)
  49. #define MVPKM_ABORT_MONITOR _IO(MVP_IOCTL_LETTER, 0xa5)
  50. #define MVPKM_MAP_WSPHKVA _IOW(MVP_IOCTL_LETTER, 0xa7, MvpkmMapHKVA)
  51. #include "mksck.h"
  52. #include "monva_common.h"
  53. #include "mvpkm_types.h"
  54. /**
  55. * @brief Operand for the MVPKM_LOCK_MPN call
  56. */
  57. typedef struct MvpkmLockMPN {
  58. uint32 order; /* IN */
  59. PhysMem_RegionType forRegion; /* IN */
  60. uint32 mpn; /* OUT */
  61. } MvpkmLockMPN;
  62. /**
  63. * @brief Operand for the MVPKM_MAP_HKVA call
  64. */
  65. typedef struct MvpkmMapHKVA {
  66. HkvaMapInfo *mapInfo; /* IN */
  67. PhysMem_RegionType forRegion; /* IN */
  68. HKVA hkva; /* OUT */
  69. } MvpkmMapHKVA;
  70. #define WSP_PAGE_COUNT 2
  71. /**
  72. * @brief Operand for the MVPKM_CPU_INFO call
  73. */
  74. typedef struct MvpkmCpuInfo {
  75. ARM_L2D attribL2D; /* OUT */
  76. ARM_MemAttrNormal attribMAN; /* OUT */
  77. _Bool mpExt; /* OUT */
  78. } MvpkmCpuInfo;
  79. /**
  80. * @brief These magic numbers mark the beginning and end of the
  81. * special page that is mapped into the virtual address space of MVPD
  82. * when it's monitor coredumper requests an unavailable page.
  83. */
  84. #define MVPKM_STUBPAGE_BEG 0x78d10c67
  85. #define MVPKM_STUBPAGE_END 0x8378f3dd
  86. #endif