Skip to contentSkip to conversation

libxc: remove useless stuff from domain builder

PATCH Superseded Juergen Gross 2 participants 4 messages Sep 14, 2015 Arm/actions semi architecture

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxc: remove useless stuff from domain builder

Remove unused fields from the domain builder and associated functions.

---
 tools/libxc/include/xc_dom.h      | 2 --
 tools/python/xen/lowlevel/xc/xc.c | 8 ++------
 2 files changed, 2 insertions(+), 8 deletions(-)
tools/libxc/include/xc_dom.h +0 -2
index 6192fba..5731098 100644
@@ -132,7 +132,6 @@ struct xc_dom_image {
     xen_pfn_t total_pages;
     xen_pfn_t p2m_size;         /* number of pfns covered by p2m */
     struct xc_dom_phys *phys_pages;
-    int realmodearea_log;
 #if defined (__arm__) || defined(__aarch64__)
     xen_pfn_t rambank_size[GUEST_RAM_BANKS];
 #endif
@@ -157,7 +156,6 @@ struct xc_dom_image {
 
     xc_interface *xch;
     domid_t guest_domid;
-    int8_t vhpt_size_log2; /* for IA64 */
     int8_t superpages;
     int claim_enabled; /* 0 by default, 1 enables it */
     int shadow_enabled;
tools/python/xen/lowlevel/xc/xc.c +2 -6
index 9ab53fb..668e875 100644
@@ -463,7 +463,6 @@ static PyObject *pyxc_linux_build(XcObject *self,
     char *image, *ramdisk = NULL, *cmdline = "", *features = NULL;
     int flags = 0;
     int store_evtchn, console_evtchn;
-    int vhpt = 0;
     int superpages = 0;
     unsigned int mem_mb;
     unsigned long store_mfn = 0;
@@ -477,23 +476,20 @@ static PyObject *pyxc_linux_build(XcObject *self,
                                 "console_evtchn", "image",
                                 /* optional */
                                 "ramdisk", "cmdline", "flags",
-                                "features", "vhpt", "superpages", NULL };
+                                "features", "superpages", NULL };
 
     if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiiis|ssisii", kwd_list,
                                       &domid, &store_evtchn, &mem_mb,
                                       &console_evtchn, &image,
                                       /* optional */
                                       &ramdisk, &cmdline, &flags,
-                                      &features, &vhpt, &superpages) )
+                                      &features, &superpages) )
         return NULL;
 
     xc_dom_loginit(self->xc_handle);
     if (!(dom = xc_dom_allocate(self->xc_handle, cmdline, features)))
         return pyxc_error_to_exception(self->xc_handle);
 
-    /* for IA64 */
-    dom->vhpt_size_log2 = vhpt;
-
     dom->superpages = superpages;
 
     if ( xc_dom_linux_build(self->xc_handle, dom, domid, mem_mb, image,
Signature · 1 line
2.1.4
#1 lore raw
Quoted 41 lines · Juergen Gross

Remove unused fields from the domain builder and associated functions.

---
 tools/libxc/include/xc_dom.h      | 2 --
 tools/python/xen/lowlevel/xc/xc.c | 8 ++------
 2 files changed, 2 insertions(+), 8 deletions(-)
tools/libxc/include/xc_dom.h +0 -2
index 6192fba..5731098 100644
@@ -132,7 +132,6 @@ struct xc_dom_image {
     xen_pfn_t total_pages;
     xen_pfn_t p2m_size;         /* number of pfns covered by p2m */
     struct xc_dom_phys *phys_pages;
-    int realmodearea_log;
 #if defined (__arm__) || defined(__aarch64__)
     xen_pfn_t rambank_size[GUEST_RAM_BANKS];
 #endif
@@ -157,7 +156,6 @@ struct xc_dom_image {
 
     xc_interface *xch;
     domid_t guest_domid;
-    int8_t vhpt_size_log2; /* for IA64 */
     int8_t superpages;
     int claim_enabled; /* 0 by default, 1 enables it */
     int shadow_enabled;
tools/python/xen/lowlevel/xc/xc.c +0 -1
index 9ab53fb..668e875 100644
@@ -463,7 +463,6 @@ static PyObject *pyxc_linux_build(XcObject *self,
     char *image, *ramdisk = NULL, *cmdline = "", *features = NULL;
     int flags = 0;
     int store_evtchn, console_evtchn;
-    int vhpt = 0;
     int superpages = 0;
     unsigned int mem_mb;
     unsigned long store_mfn = 0;

tools/python/xen/lowlevel/xc/xc.c static PyObject *pyxc_linux_build(XcObject *self, · line 481

Quoted 7 lines
tools/python/xen/lowlevel/xc/xc.c +1 -1
@@ -477,23 +476,20 @@ static PyObject *pyxc_linux_build(XcObject *self,
                                 "console_evtchn", "image",
                                 /* optional */
                                 "ramdisk", "cmdline", "flags",
-                                "features", "vhpt", "superpages", NULL };
+                                "features", "superpages", NULL };
 
     if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiiis|ssisii", kwd_list,
                                                      ^

This format string needs to be changed, too. It should be "iiis|ssisi", i.e. one "i" needs to be removed.

Quoted 20 lines
tools/python/xen/lowlevel/xc/xc.c +1 -4
                                       &domid, &store_evtchn, &mem_mb,
                                       &console_evtchn, &image,
                                       /* optional */
                                       &ramdisk, &cmdline, &flags,
-                                      &features, &vhpt, &superpages) )
+                                      &features, &superpages) )
         return NULL;
 
     xc_dom_loginit(self->xc_handle);
     if (!(dom = xc_dom_allocate(self->xc_handle, cmdline, features)))
         return pyxc_error_to_exception(self->xc_handle);
 
-    /* for IA64 */
-    dom->vhpt_size_log2 = vhpt;
-
     dom->superpages = superpages;
 
     if ( xc_dom_linux_build(self->xc_handle, dom, domid, mem_mb, image,
Signature · 1 line
2.1.4
#2 lore raw
Quoted 48 lines · Wei Liu
Quoted 47 lines · Juergen Gross

Remove unused fields from the domain builder and associated functions.

---
  tools/libxc/include/xc_dom.h      | 2 --
  tools/python/xen/lowlevel/xc/xc.c | 8 ++------
  2 files changed, 2 insertions(+), 8 deletions(-)
tools/libxc/include/xc_dom.h +0 -2
index 6192fba..5731098 100644
@@ -132,7 +132,6 @@ struct xc_dom_image {
      xen_pfn_t total_pages;
      xen_pfn_t p2m_size;         /* number of pfns covered by p2m */
      struct xc_dom_phys *phys_pages;
-    int realmodearea_log;
  #if defined (__arm__) || defined(__aarch64__)
      xen_pfn_t rambank_size[GUEST_RAM_BANKS];
  #endif
@@ -157,7 +156,6 @@ struct xc_dom_image {
 
      xc_interface *xch;
      domid_t guest_domid;
-    int8_t vhpt_size_log2; /* for IA64 */
      int8_t superpages;
      int claim_enabled; /* 0 by default, 1 enables it */
      int shadow_enabled;
tools/python/xen/lowlevel/xc/xc.c +1 -2
index 9ab53fb..668e875 100644
@@ -463,7 +463,6 @@ static PyObject *pyxc_linux_build(XcObject *self,
      char *image, *ramdisk = NULL, *cmdline = "", *features = NULL;
      int flags = 0;
      int store_evtchn, console_evtchn;
-    int vhpt = 0;
      int superpages = 0;
      unsigned int mem_mb;
      unsigned long store_mfn = 0;
@@ -477,23 +476,20 @@ static PyObject *pyxc_linux_build(XcObject *self,
                                  "console_evtchn", "image",
                                  /* optional */
                                  "ramdisk", "cmdline", "flags",
-                                "features", "vhpt", "superpages", NULL };
+                                "features", "superpages", NULL };
 
Quoted 4 lines

tools/python/xen/lowlevel/xc/xc.c static PyObject *pyxc_linux_build(XcObject *self, · line 481

Quoted 1 line
tools/python/xen/lowlevel/xc/xc.c +0 -0
      if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiiis|ssisii", kwd_list,
                                                       ^

This format string needs to be changed, too. It should be "iiis|ssisi", i.e. one "i" needs to be removed.

Indeed.

BTW: you've removed two "i"s. It has to be "iiiis|ssisi".

Juergen

#3 lore raw
Quoted 49 lines · Juergen Gross
Quoted 48 lines · Wei Liu
Quoted 47 lines · Juergen Gross

Remove unused fields from the domain builder and associated functions.

---
 tools/libxc/include/xc_dom.h      | 2 --
 tools/python/xen/lowlevel/xc/xc.c | 8 ++------
 2 files changed, 2 insertions(+), 8 deletions(-)
tools/libxc/include/xc_dom.h +0 -2
index 6192fba..5731098 100644
@@ -132,7 +132,6 @@ struct xc_dom_image {
     xen_pfn_t total_pages;
     xen_pfn_t p2m_size;         /* number of pfns covered by p2m */
     struct xc_dom_phys *phys_pages;
-    int realmodearea_log;
 #if defined (__arm__) || defined(__aarch64__)
     xen_pfn_t rambank_size[GUEST_RAM_BANKS];
 #endif
@@ -157,7 +156,6 @@ struct xc_dom_image {
 
     xc_interface *xch;
     domid_t guest_domid;
-    int8_t vhpt_size_log2; /* for IA64 */
     int8_t superpages;
     int claim_enabled; /* 0 by default, 1 enables it */
     int shadow_enabled;
tools/python/xen/lowlevel/xc/xc.c +1 -2
index 9ab53fb..668e875 100644
@@ -463,7 +463,6 @@ static PyObject *pyxc_linux_build(XcObject *self,
     char *image, *ramdisk = NULL, *cmdline = "", *features = NULL;
     int flags = 0;
     int store_evtchn, console_evtchn;
-    int vhpt = 0;
     int superpages = 0;
     unsigned int mem_mb;
     unsigned long store_mfn = 0;
@@ -477,23 +476,20 @@ static PyObject *pyxc_linux_build(XcObject *self,
                                 "console_evtchn", "image",
                                 /* optional */
                                 "ramdisk", "cmdline", "flags",
-                                "features", "vhpt", "superpages", NULL };
+                                "features", "superpages", NULL };
 
Quoted 9 lines
Quoted 4 lines

tools/python/xen/lowlevel/xc/xc.c static PyObject *pyxc_linux_build(XcObject *self, · line 481

Quoted 1 line
tools/python/xen/lowlevel/xc/xc.c +0 -0
     if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiiis|ssisii", kwd_list,
                                                      ^

This format string needs to be changed, too. It should be "iiis|ssisi", i.e. one "i" needs to be removed.

Indeed.

BTW: you've removed two "i"s. It has to be "iiiis|ssisi".

Heh, right. Fortunately you got my idea. :-)

Wei.

Quoted 2 lines

Juergen