mksck_kernel.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 The monitor-kernel socket interface kernel-only definitions.
  24. */
  25. #ifndef _MKSCK_KERNEL_H
  26. #define _MKSCK_KERNEL_H
  27. #define INCLUDE_ALLOW_MODULE
  28. #define INCLUDE_ALLOW_GPL
  29. #include "include_check.h"
  30. #include "mksck_shared.h"
  31. /*
  32. * prototypes
  33. */
  34. int Mksck_Init(void);
  35. void Mksck_Exit(void);
  36. void Mksck_WakeBlockedSockets(MksckPage *mksckPage);
  37. MksckPage *MksckPage_GetFromTgidIncRefc(void);
  38. MksckPage *MksckPage_GetFromVmIdIncRefc(Mksck_VmId vmId);
  39. MksckPage *MksckPage_GetFromIdx(uint32 idx);
  40. void MksckPageInfo_Init(struct dentry *parent);
  41. int Mksck_WspInitialize(struct MvpkmVM *vm);
  42. void Mksck_WspRelease(WorldSwitchPage *wsp);
  43. int MksckPage_LookupAndInsertPage(struct vm_area_struct *vma,
  44. unsigned long address,
  45. MPN mpn);
  46. /*
  47. * Mksck open request must come from this uid.
  48. */
  49. extern uid_t Mvpkm_vmwareUid;
  50. #define MKSCK_DEVEL 0
  51. #if MKSCK_DEVEL
  52. #define PRINTK(...) pr_info(__VA_ARGS__)
  53. #else
  54. #define PRINTK(...)
  55. #endif
  56. #define HOST_CPUID_UNDEF (~0)
  57. #endif