aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_private.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-01-05 10:46:37 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-01-05 10:46:37 +0000
commitf5fec95647acc61536578537a1a1f6063b99b1cb (patch)
treeaec71365725f326130aa8824b6802375f64bbd94 /tools/libxc/xc_private.c
parent36e30441326aa951ced7b1890d654d715db3bd3a (diff)
downloadxen-f5fec95647acc61536578537a1a1f6063b99b1cb.tar.gz
xen-f5fec95647acc61536578537a1a1f6063b99b1cb.tar.bz2
xen-f5fec95647acc61536578537a1a1f6063b99b1cb.zip
PoD memory 8/9: libxc interface
Implement libxc interface to PoD functionality: * Add xc_hvm_build_target_mem(), which takes both memsize and target. Memsize is the total memory, allocated in PoD pages and reported in the e820; target is the size of the cache. If these are the same, the normal funcitonality is called. (So you can use the same function to build always, and it will decide whether to use PoD or not.) * Add xc_domain_memory_[gs]et_pod_target(), which sets and/or returns information about the PoD cache and p2m entries. Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Diffstat (limited to 'tools/libxc/xc_private.c')
-rw-r--r--tools/libxc/xc_private.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/libxc/xc_private.c b/tools/libxc/xc_private.c
index b37978afe8..5990415d9e 100644
--- a/tools/libxc/xc_private.c
+++ b/tools/libxc/xc_private.c
@@ -323,6 +323,14 @@ int xc_memory_op(int xc_handle,
goto out1;
}
break;
+ case XENMEM_set_pod_target:
+ case XENMEM_get_pod_target:
+ if ( lock_pages(arg, sizeof(struct xen_pod_target)) )
+ {
+ PERROR("Could not lock");
+ goto out1;
+ }
+ break;
}
ret = do_xen_hypercall(xc_handle, &hypercall);
@@ -355,6 +363,10 @@ int xc_memory_op(int xc_handle,
case XENMEM_maximum_gpfn:
unlock_pages(arg, sizeof(domid_t));
break;
+ case XENMEM_set_pod_target:
+ case XENMEM_get_pod_target:
+ unlock_pages(arg, sizeof(struct xen_pod_target));
+ break;
}
out1: