From 01dfef3993bc51dd8432bd7868a6527f4599ca93 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Thu, 28 Jan 2016 15:09:03 +0000 Subject: [PATCH] xenpaging: Switch from xc_{set,get}_hvm_param to xc_hvm_param_{set,get} The former have been deprecated for some time (they take unsigned longs, not uint64_t's, and therefore risk truncation for some params) and I'm about to remove them. To get the types write for both xc_hvm_param_get and xc_domain_populate_physmap_exact (which takes an array of xen_pfn_t) we need to launder the ring pointer through a temporary 64 bit variable. This is the only remaining in tree user. Signed-off-by: Ian Campbell --- tools/xenpaging/xenpaging.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/xenpaging/xenpaging.c b/tools/xenpaging/xenpaging.c index 0377507e11..675e1dd83e 100644 --- a/tools/xenpaging/xenpaging.c +++ b/tools/xenpaging/xenpaging.c @@ -279,7 +279,8 @@ static struct xenpaging *xenpaging_init(int argc, char *argv[]) xentoollog_logger *dbg = NULL; char *p; int rc; - unsigned long ring_pfn, mmap_pfn; + uint64_t val; + xen_pfn_t ring_pfn, mmap_pfn; /* Allocate memory */ paging = calloc(1, sizeof(struct xenpaging)); @@ -337,9 +338,9 @@ static struct xenpaging *xenpaging_init(int argc, char *argv[]) } /* Map the ring page */ - xc_get_hvm_param(xch, paging->vm_event.domain_id, - HVM_PARAM_PAGING_RING_PFN, &ring_pfn); - mmap_pfn = ring_pfn; + xc_hvm_param_get(xch, paging->vm_event.domain_id, + HVM_PARAM_PAGING_RING_PFN, &val); + mmap_pfn = ring_pfn = (xen_pfn_t)val; paging->vm_event.ring_page = xc_map_foreign_pages(xch, paging->vm_event.domain_id, PROT_READ | PROT_WRITE, &mmap_pfn, 1); -- 2.39.5