debuggers.hg

view tools/libxc/xc_mem_paging.c @ 21067:b4a1832a916f

Update Xen version to 4.0.0-rc6
author Keir Fraser <keir.fraser@citrix.com>
date Tue Mar 09 18:18:05 2010 +0000 (2010-03-09)
parents 47ec2d131c22
children 779c0ef9682c
line source
1 /******************************************************************************
2 *
3 * tools/libxc/xc_mem_paging.c
4 *
5 * Interface to low-level memory paging functionality.
6 *
7 * Copyright (c) 2009 by Citrix Systems, Inc. (Patrick Colp)
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
25 #include "xc_private.h"
28 int xc_mem_paging_nominate(int xc_handle, domid_t domain_id, unsigned long gfn)
29 {
30 return xc_mem_event_control(xc_handle, domain_id,
31 XEN_DOMCTL_MEM_EVENT_OP_PAGING_NOMINATE,
32 XEN_DOMCTL_MEM_EVENT_OP_PAGING, NULL, NULL,
33 gfn);
34 }
36 int xc_mem_paging_evict(int xc_handle, domid_t domain_id, unsigned long gfn)
37 {
38 return xc_mem_event_control(xc_handle, domain_id,
39 XEN_DOMCTL_MEM_EVENT_OP_PAGING_EVICT,
40 XEN_DOMCTL_MEM_EVENT_OP_PAGING, NULL, NULL,
41 gfn);
42 }
44 int xc_mem_paging_prep(int xc_handle, domid_t domain_id, unsigned long gfn)
45 {
46 return xc_mem_event_control(xc_handle, domain_id,
47 XEN_DOMCTL_MEM_EVENT_OP_PAGING_PREP,
48 XEN_DOMCTL_MEM_EVENT_OP_PAGING, NULL, NULL,
49 gfn);
50 }
52 int xc_mem_paging_resume(int xc_handle, domid_t domain_id, unsigned long gfn)
53 {
54 return xc_mem_event_control(xc_handle, domain_id,
55 XEN_DOMCTL_MEM_EVENT_OP_PAGING_RESUME,
56 XEN_DOMCTL_MEM_EVENT_OP_PAGING, NULL, NULL,
57 gfn);
58 }
61 /*
62 * Local variables:
63 * mode: C
64 * c-set-style: "BSD"
65 * c-basic-offset: 4
66 * indent-tabs-mode: nil
67 * End:
68 */