[XenPPC] [xenppc-unstable] [TOOLS][POWERPC] no need to allocate extents in a loop
# HG changeset patch # User Jimi Xenidis <[EMAIL PROTECTED]> # Node ID b17300195f02f7da17f3ad94aed955863ffd4fed # Parent b35682af48d01ddba1d26e6fe2d0c5607a343228 [TOOLS][POWERPC] no need to allocate extents in a loop This patch decreases the number of hcalls needed to allocate all the extents for a domain with large amounts of memory. Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]> --- tools/python/xen/xend/XendDomainInfo.py | 18 ++ 1 files changed, 10 insertions(+), 8 deletions(-) diff -r b35682af48d0 -r b17300195f02 tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Mon Nov 13 14:32:55 2006 -0600 +++ b/tools/python/xen/xend/XendDomainInfo.py Tue Nov 14 19:46:26 2006 -0500 @@ -2017,6 +2017,10 @@ class XendDomainInfo (Common_XendDomainI if memory < rma_kb: raise ValueError("Domain memory must be at least %d KB" % rma_kb) +if memory & (16 << 10): +raise ValueError("Domain memory %dKB must be a multiple of 16MB" + % memory) + # allocate the RMA log.debug("alloc_real_mode_area(%d, %d)", self.domid, rma_log) xc.alloc_real_mode_area(self.domid, rma_log) @@ -2024,13 +2028,11 @@ class XendDomainInfo (Common_XendDomainI # now allocate the remaining memory as large-order allocations memory -= rma_kb extent_log = 24 # 16 MB -extent_size = 1 << extent_log page_log = 12 # 4 KB extent_order = extent_log - page_log -for i in range(0, memory * 1024, extent_size): -log.debug("increase_reservation(%d, 0x%x, %d)", self.domid, -extent_size >> 10, extent_order) -xc.domain_memory_increase_reservation(self.domid, - extent_size >> 10, - extent_order) - +log.debug("increase_reservation(%d, 0x%x, %d)", self.domid, + memory, extent_order) +xc.domain_memory_increase_reservation(self.domid, + memory, + extent_order) + ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
Re: [XenPPC] [linux-ppc-2.6] [XEN][POWERPC] HYPERVISOR_memory_op() return value now has meaning
Yi noticed that we could not build domains with memory beyond the RMA. This Linux patch fixes that. -JX On Nov 14, 2006, at 7:44 PM, Xen patchbot-linux-ppc-2.6 wrote: # HG changeset patch # User Jimi Xenidis <[EMAIL PROTECTED]> # Node ID 47cd37e8f8a91bdf10b314cbaa8d5a9088be30fc # Parent 01f3c63f0343051ce1cc039b4bd38def61eb3def [XEN][POWERPC] HYPERVISOR_memory_op() return value now has meaning This patch fixes a "false" failure when calling HYPERVISOR_memory_op() from user space, where the return value fromt he hcall is expected. With this fix, the recent bits can can create domains beyond their RMA. Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]> --- arch/powerpc/platforms/xen/hcall.c |3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) diff -r 01f3c63f0343 -r 47cd37e8f8a9 arch/powerpc/platforms/xen/ hcall.c --- a/arch/powerpc/platforms/xen/hcall.c Sat Nov 11 10:25:31 2006 -0500 +++ b/arch/powerpc/platforms/xen/hcall.c Tue Nov 14 19:33:36 2006 -0500 @@ -520,7 +520,8 @@ static int xenppc_privcmd_memory_op(priv sizeof(xen_memory_reservation_t))) return -EFAULT; - if (!HYPERVISOR_memory_op(cmd, &kern_op)) { + ret = HYPERVISOR_memory_op(cmd, &kern_op); + if (ret >= 0) { if (copy_to_user(user_op, &kern_op, sizeof(xen_memory_reservation_t))) return -EFAULT; ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel
[XenPPC] [linux-ppc-2.6] [XEN][POWERPC] HYPERVISOR_memory_op() return value now has meaning
# HG changeset patch # User Jimi Xenidis <[EMAIL PROTECTED]> # Node ID 47cd37e8f8a91bdf10b314cbaa8d5a9088be30fc # Parent 01f3c63f0343051ce1cc039b4bd38def61eb3def [XEN][POWERPC] HYPERVISOR_memory_op() return value now has meaning This patch fixes a "false" failure when calling HYPERVISOR_memory_op() from user space, where the return value fromt he hcall is expected. With this fix, the recent bits can can create domains beyond their RMA. Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]> --- arch/powerpc/platforms/xen/hcall.c |3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) diff -r 01f3c63f0343 -r 47cd37e8f8a9 arch/powerpc/platforms/xen/hcall.c --- a/arch/powerpc/platforms/xen/hcall.cSat Nov 11 10:25:31 2006 -0500 +++ b/arch/powerpc/platforms/xen/hcall.cTue Nov 14 19:33:36 2006 -0500 @@ -520,7 +520,8 @@ static int xenppc_privcmd_memory_op(priv sizeof(xen_memory_reservation_t))) return -EFAULT; - if (!HYPERVISOR_memory_op(cmd, &kern_op)) { + ret = HYPERVISOR_memory_op(cmd, &kern_op); + if (ret >= 0) { if (copy_to_user(user_op, &kern_op, sizeof(xen_memory_reservation_t))) return -EFAULT; ___ Xen-ppc-devel mailing list Xen-ppc-devel@lists.xensource.com http://lists.xensource.com/xen-ppc-devel