[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 5 of 6] xend/xc: Implement a domain_set_e820_hole function to be used by python code
On Mon, Mar 26, 2012 at 10:42:59AM +0100, Ian Campbell wrote: > On Sat, 2012-03-24 at 17:41 +0000, Konrad Rzeszutek Wilk wrote: > > # HG changeset patch > > # User Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> > > # Date 1332610898 14400 > > # Node ID 95eda76084314aa8a5cfd4b5e83969823492deda > > # Parent d42921da3931026ecf5da7c0e5bb86074e77cf71 > > xend/xc: Implement a domain_set_e820_hole function to be used by python code > > > > Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> > > > > diff -r d42921da3931 -r 95eda7608431 tools/python/xen/lowlevel/xc/xc.c > > --- a/tools/python/xen/lowlevel/xc/xc.c Sat Mar 24 13:41:38 2012 -0400 > > +++ b/tools/python/xen/lowlevel/xc/xc.c Sat Mar 24 13:41:38 2012 -0400 > > @@ -16,6 +16,7 @@ > > #include <sys/mman.h> > > #include <netdb.h> > > #include <arpa/inet.h> > > +#include <stdio.h> > > > > #include "xenctrl.h" > > #include <xen/elfnote.h> > > @@ -1697,6 +1698,243 @@ static PyObject *pyxc_domain_set_memmap_ > > return zero; > > } > > > > +#ifdef PRIu64 > > This is a really weird condition -- when / where does this end up not > defined? 32-bit, but not sure now if the problem still exists. > > Perhaps you see this depending on platform? In which case is this just a > case of including the right header (stdint.h?) directly instead of > implicitly via some arch dependent chain of includes? <nods> That is probably what I hit and never tried to resolve. > > > +static const char *e820_names(int type) > > +{ > > + switch (type) { > > + case E820_RAM: return "RAM"; > > + case E820_RESERVED: return "Reserved"; > > + case E820_ACPI: return "ACPI"; > > + case E820_NVS: return "ACPI NVS"; > > + case E820_UNUSABLE: return "Unusable"; > > + default: break; > > + } > > + return "Unknown"; > > +} > > +#endif > > +static int e820_sanitize(struct e820entry src[], > > + uint32_t *nr_entries, > > + unsigned long map_limitkb, > > + unsigned long balloon_kb) > > +{ > > Seems odd to do this in the C bindings, can this be done either in the > python layer or in the libxc layer (in which case libxl can use it too?) So this is copied from the libxl layer (With the removal of the libxl_ctx). I was hoping you could shed some ideas of how to "export" that function (e820_sanitize) from the libxl_pci.c so that the tools/python/xen/lowlevel/xc/xc.c can also use it? _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |