[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [XEN] Add a start_pfn field in xen_domctl_getmemlist.
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID d741e86a87661b95785d6cd1316bd66558608d0f # Parent 13e09ec65862b05e0d18717f5a93d532709083b7 [XEN] Add a start_pfn field in xen_domctl_getmemlist. This is used by ia64 because it directly reads the P2M table. Signed-off-by: Tristan Gingold <tristan.gingold@xxxxxxxx> --- tools/libxc/ia64/xc_ia64_stubs.c | 16 +++++----------- xen/arch/ia64/xen/dom0_ops.c | 4 ++-- xen/include/public/domctl.h | 5 ++++- 3 files changed, 11 insertions(+), 14 deletions(-) diff -r 13e09ec65862 -r d741e86a8766 tools/libxc/ia64/xc_ia64_stubs.c --- a/tools/libxc/ia64/xc_ia64_stubs.c Wed Aug 30 18:08:19 2006 +0100 +++ b/tools/libxc/ia64/xc_ia64_stubs.c Wed Aug 30 18:19:04 2006 +0100 @@ -36,7 +36,6 @@ xc_ia64_get_pfn_list(int xc_handle, uint struct xen_domctl domctl; int num_pfns,ret; unsigned int __start_page, __nr_pages; - unsigned long max_pfns; xen_pfn_t *__pfn_buf; __start_page = start_page; @@ -44,27 +43,22 @@ xc_ia64_get_pfn_list(int xc_handle, uint __pfn_buf = pfn_buf; while (__nr_pages) { - max_pfns = ((unsigned long)__start_page << 32) | __nr_pages; domctl.cmd = XEN_DOMCTL_getmemlist; - domctl.domain = (domid_t)domid; - domctl.u.getmemlist.max_pfns = max_pfns; + domctl.domain = (domid_t)domid; + domctl.u.getmemlist.max_pfns = __nr_pages; + domctl.u.getmemlist.start_pfn =__start_page; domctl.u.getmemlist.num_pfns = 0; set_xen_guest_handle(domctl.u.getmemlist.buffer, __pfn_buf); - if ((max_pfns != -1UL) - && mlock(__pfn_buf, __nr_pages * sizeof(xen_pfn_t)) != 0) { + if (mlock(__pfn_buf, __nr_pages * sizeof(xen_pfn_t)) != 0) { PERROR("Could not lock pfn list buffer"); return -1; } ret = do_domctl(xc_handle, &domctl); - if (max_pfns != -1UL) - (void)munlock(__pfn_buf, __nr_pages * sizeof(xen_pfn_t)); + (void)munlock(__pfn_buf, __nr_pages * sizeof(xen_pfn_t)); - if (max_pfns == -1UL) - return 0; - num_pfns = domctl.u.getmemlist.num_pfns; __start_page += num_pfns; __nr_pages -= num_pfns; diff -r 13e09ec65862 -r d741e86a8766 xen/arch/ia64/xen/dom0_ops.c --- a/xen/arch/ia64/xen/dom0_ops.c Wed Aug 30 18:08:19 2006 +0100 +++ b/xen/arch/ia64/xen/dom0_ops.c Wed Aug 30 18:19:04 2006 +0100 @@ -39,8 +39,8 @@ long arch_do_domctl(xen_domctl_t *op, XE { unsigned long i; struct domain *d = find_domain_by_id(op->domain); - unsigned long start_page = op->u.getmemlist.max_pfns >> 32; - unsigned long nr_pages = op->u.getmemlist.max_pfns & 0xffffffff; + unsigned long start_page = op->u.getmemlist.start_pfn; + unsigned long nr_pages = op->u.getmemlist.max_pfns; unsigned long mfn; if ( d == NULL ) { diff -r 13e09ec65862 -r d741e86a8766 xen/include/public/domctl.h --- a/xen/include/public/domctl.h Wed Aug 30 18:08:19 2006 +0100 +++ b/xen/include/public/domctl.h Wed Aug 30 18:19:04 2006 +0100 @@ -16,7 +16,7 @@ #include "xen.h" -#define XEN_DOMCTL_INTERFACE_VERSION 0x00000001 +#define XEN_DOMCTL_INTERFACE_VERSION 0x00000002 #define uint64_t uint64_aligned_t @@ -72,7 +72,10 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_getdo #define XEN_DOMCTL_getmemlist 6 struct xen_domctl_getmemlist { /* IN variables. */ + /* Max entries to write to output buffer. */ uint64_t max_pfns; + /* Start index in guest's page list. */ + uint64_t start_pfn; XEN_GUEST_HANDLE_64(xen_pfn_t) buffer; /* OUT variables. */ uint64_t num_pfns; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |