[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] Revert "tools/libxc: Drop broken xc_{get, set}_hvm_param() functions"



commit 382329d44da8269b77d236a47ddb04747b7495a3
Author:     Wei Liu <wei.liu2@xxxxxxxxxx>
AuthorDate: Wed May 31 11:35:25 2017 +0100
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Wed May 31 11:35:25 2017 +0100

    Revert "tools/libxc: Drop broken xc_{get,set}_hvm_param() functions"
    
    This reverts commit fa4583333ddba6afb7b07ff7eb4d16e1a6a7459c.
    
    QEMU build is broken by that patch.
---
 tools/libxc/include/xenctrl.h |  4 ++++
 tools/libxc/xc_domain.c       | 17 +++++++++++++++++
 tools/xenpaging/xenpaging.c   |  7 +++----
 3 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h
index 4d3f2ae..1629f41 100644
--- a/tools/libxc/include/xenctrl.h
+++ b/tools/libxc/include/xenctrl.h
@@ -1660,6 +1660,10 @@ void xc_clear_last_error(xc_interface *xch);
 int xc_hvm_param_set(xc_interface *handle, domid_t dom, uint32_t param, 
uint64_t value);
 int xc_hvm_param_get(xc_interface *handle, domid_t dom, uint32_t param, 
uint64_t *value);
 
+/* Deprecated: use xc_hvm_param_set/get() instead. */
+int xc_set_hvm_param(xc_interface *handle, domid_t dom, int param, unsigned 
long value);
+int xc_get_hvm_param(xc_interface *handle, domid_t dom, int param, unsigned 
long *value);
+
 /* HVM guest pass-through */
 int xc_assign_device(xc_interface *xch,
                      uint32_t domid,
diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
index b619440..00909ad4 100644
--- a/tools/libxc/xc_domain.c
+++ b/tools/libxc/xc_domain.c
@@ -1455,6 +1455,23 @@ int xc_hvm_param_get(xc_interface *handle, domid_t dom, 
uint32_t param, uint64_t
     return rc;
 }
 
+int xc_set_hvm_param(xc_interface *handle, domid_t dom, int param, unsigned 
long value)
+{
+    return xc_hvm_param_set(handle, dom, param, value);
+}
+
+int xc_get_hvm_param(xc_interface *handle, domid_t dom, int param, unsigned 
long *value)
+{
+    uint64_t v;
+    int ret;
+
+    ret = xc_hvm_param_get(handle, dom, param, &v);
+    if (ret < 0)
+        return ret;
+    *value = v;
+    return 0;
+}
+
 int xc_domain_setdebugging(xc_interface *xch,
                            uint32_t domid,
                            unsigned int enable)
diff --git a/tools/xenpaging/xenpaging.c b/tools/xenpaging/xenpaging.c
index 431a86b..d0571ca 100644
--- a/tools/xenpaging/xenpaging.c
+++ b/tools/xenpaging/xenpaging.c
@@ -280,8 +280,7 @@ static struct xenpaging *xenpaging_init(int argc, char 
*argv[])
     xentoollog_logger *dbg = NULL;
     char *p;
     int rc;
-    uint64_t ring_pfn;
-    unsigned long mmap_pfn;
+    unsigned long ring_pfn, mmap_pfn;
 
     /* Allocate memory */
     paging = calloc(1, sizeof(struct xenpaging));
@@ -339,8 +338,8 @@ static struct xenpaging *xenpaging_init(int argc, char 
*argv[])
     }
 
     /* Map the ring page */
-    xc_hvm_param_get(xch, paging->vm_event.domain_id,
-                     HVM_PARAM_PAGING_RING_PFN, &ring_pfn);
+    xc_get_hvm_param(xch, paging->vm_event.domain_id, 
+                        HVM_PARAM_PAGING_RING_PFN, &ring_pfn);
     mmap_pfn = ring_pfn;
     paging->vm_event.ring_page = 
         xc_map_foreign_pages(xch, paging->vm_event.domain_id,
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.