vki-xen-physdev.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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_PHYSDEV_H
  22. #define __VKI_XEN_PHYSDEV_H
  23. #define VKI_XEN_MAP_PIRQ_TYPE_MSI 0x0
  24. #define VKI_XEN_MAP_PIRQ_TYPE_GSI 0x1
  25. #define VKI_XEN_MAP_PIRQ_TYPE_UNKNOWN 0x2
  26. #define VKI_XEN_MAP_PIRQ_TYPE_MSI_SEG 0x3
  27. #define VKI_XEN_MAP_PIRQ_TYPE_MULTI_MSI 0x4
  28. #define VKI_XEN_PHYSDEVOP_map_pirq 13
  29. struct vki_xen_physdev_map_pirq {
  30. vki_xen_domid_t domid;
  31. /* IN */
  32. int type;
  33. /* IN (ignored for ..._MULTI_MSI) */
  34. int index;
  35. /* IN or OUT */
  36. int pirq;
  37. /* IN - high 16 bits hold segment for ..._MSI_SEG and ..._MULTI_MSI */
  38. int bus;
  39. /* IN */
  40. int devfn;
  41. /* IN (also OUT for ..._MULTI_MSI) */
  42. int entry_nr;
  43. /* IN */
  44. vki_uint64_t table_base;
  45. };
  46. #define VKI_XEN_PHYSDEVOP_unmap_pirq 14
  47. struct vki_xen_physdev_unmap_pirq {
  48. vki_xen_domid_t domid;
  49. /* IN */
  50. int pirq;
  51. };
  52. #endif // __VKI_XEN_PHYSDEV_H
  53. /*--------------------------------------------------------------------*/
  54. /*--- end ---*/
  55. /*--------------------------------------------------------------------*/