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