[prev in list] [next in list] [prev in thread] [next in thread]
List: xen-ppc-devel
Subject: [XenPPC] [PATCH][XEN][POWERPC] avoid xc_get_tot_pages() in the
From: Hollis Blanchard <hollisb () us ! ibm ! com>
Date: 2006-12-08 20:25:11
Message-ID: 1165609511.23364.15.camel () basalt
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Avoid xc_get_tot_pages() in the prose builder.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
diff -r 9d83185b4c37 tools/libxc/powerpc64/xc_prose_build.c
--- a/tools/libxc/powerpc64/xc_prose_build.c Fri Dec 01 19:11:02 2006 -0500
+++ b/tools/libxc/powerpc64/xc_prose_build.c Fri Dec 01 17:18:44 2006 -0600
@@ -230,6 +230,7 @@ static void free_page_array(xen_pfn_t *p
int xc_prose_build(int xc_handle,
uint32_t domid,
+ unsigned int mem_mb,
const char *image_name,
const char *initrd_name,
const char *cmdline,
@@ -257,8 +258,7 @@ int xc_prose_build(int xc_handle,
DPRINTF("cmdline=%s\n", cmdline);
- DPRINTF("xc_get_tot_pages\n");
- nr_pages = xc_get_tot_pages(xc_handle, domid);
+ nr_pages = mem_mb << (20 - PAGE_SHIFT);
DPRINTF("nr_pages 0x%lx\n", nr_pages);
rma_pages = get_rma_pages(devtree);
diff -r 9d83185b4c37 tools/libxc/xenguest.h
--- a/tools/libxc/xenguest.h Fri Dec 01 19:11:02 2006 -0500
+++ b/tools/libxc/xenguest.h Tue Dec 05 10:45:10 2006 -0600
@@ -124,6 +124,7 @@ int xc_get_hvm_param(
int xc_prose_build(int xc_handle,
uint32_t domid,
+ unsigned int mem_mb,
const char *image_name,
const char *ramdisk_name,
const char *cmdline,
diff -r 9d83185b4c37 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py Fri Dec 01 19:11:02 2006 -0500
+++ b/tools/python/xen/xend/image.py Tue Dec 05 10:44:22 2006 -0600
@@ -273,6 +282,7 @@ class PPC_ProseImageHandler(LinuxImageHa
devtree = FlatDeviceTree.build(self)
return xc.prose_build(dom = self.vm.getDomid(),
+ memsize = mem_mb,
image = self.kernel,
store_evtchn = store_evtchn,
console_evtchn = console_evtchn,
--
Hollis Blanchard
IBM Linux Technology Center
[Attachment #5 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.12.1">
</HEAD>
<BODY>
<!--+GtkHTML:<DATA class="ClueFlow" key="signature" value="0">--><!--+GtkHTML:<DATA \
class="ClueFlow" key="signature_name" \
value="uid:1163106765..10975..0@basalt">--><!--+GtkHTML:<DATA class="ClueFlow" \
key="orig" value="0">-->Avoid xc_get_tot_pages() in the prose builder.<BR> <BR>
Signed-off-by: Hollis Blanchard <<A \
HREF="mailto:hollisb@us.ibm.com">hollisb@us.ibm.com</A>><BR> <BR>
<PRE>
diff -r 9d83185b4c37 tools/libxc/powerpc64/xc_prose_build.c
--- a/tools/libxc/powerpc64/xc_prose_build.c Fri Dec 01 19:11:02 2006 -0500
+++ b/tools/libxc/powerpc64/xc_prose_build.c Fri Dec 01 17:18:44 2006 -0600
@@ -230,6 +230,7 @@ static void free_page_array(xen_pfn_t *p
int xc_prose_build(int xc_handle,
\
uint32_t domid, + \
unsigned int mem_mb, \
\
const char *image_name, \
\
const char *initrd_name, \
\
const char *cmdline, @@ -257,8 +258,7 @@ int xc_prose_build(int xc_handle,
DPRINTF("cmdline=%s\n", cmdline);
- DPRINTF("xc_get_tot_pages\n");
- nr_pages = xc_get_tot_pages(xc_handle, domid);
+ nr_pages = mem_mb << (20 - PAGE_SHIFT);
DPRINTF("nr_pages 0x%lx\n", nr_pages);
rma_pages = get_rma_pages(devtree);
diff -r 9d83185b4c37 tools/libxc/xenguest.h
--- a/tools/libxc/xenguest.h Fri Dec 01 19:11:02 2006 -0500
+++ b/tools/libxc/xenguest.h Tue Dec 05 10:45:10 2006 -0600
@@ -124,6 +124,7 @@ int xc_get_hvm_param(
int xc_prose_build(int xc_handle,
\
uint32_t domid, + \
unsigned int mem_mb, \
\
const char *image_name, \
\
const char *ramdisk_name, \
\
const char *cmdline,
diff -r 9d83185b4c37 tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py Fri Dec 01 19:11:02 2006 -0500
+++ b/tools/python/xen/xend/image.py Tue Dec 05 10:44:22 2006 -0600
@@ -273,6 +282,7 @@ class PPC_ProseImageHandler(LinuxImageHa
devtree = FlatDeviceTree.build(self)
return \
xc.prose_build(dom \
= self.vm.getDomid(), \
+ & \
nbsp; \
memsize = mem_mb, \
&n \
bsp; \
image = self.kernel, \
&n \
bsp; \
store_evtchn = store_evtchn, \
&n \
bsp; \
console_evtchn = console_evtchn,
</PRE>
<BR>
<!--+GtkHTML:<DATA class="ClueFlow" clear="orig">--><!--+GtkHTML:<DATA \
class="ClueFlow" key="signature" value="1">--><TABLE CELLSPACING="0" CELLPADDING="0" \
WIDTH="100%"> <TR>
<TD>
<PRE>
<!--+GtkHTML:<DATA class="ClueFlow" key="signature" value="1">-->--
<!--+GtkHTML:<DATA class="ClueFlow" key="signature" value="1">-->Hollis Blanchard
<!--+GtkHTML:<DATA class="ClueFlow" key="signature" value="1">-->IBM Linux Technology \
Center </PRE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic