WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Necessary change to support ia64/vti domain build in com

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Necessary change to support ia64/vti domain build in common code.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 29 Oct 2005 09:58:20 +0000
Delivery-date: Sat, 29 Oct 2005 09:57:13 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User djm@xxxxxxxxxxxxxxx
# Node ID 8928c89a8d0af4ec2cd39fadf011a171d511602f
# Parent  935a81f863489998cea61b72149181b613959675
Necessary change to support ia64/vti domain build in common code.

Signed-off-by Ke Yu <ke.yu@xxxxxxxxx>
Signed-off-by Anthony Xu <anthony.xu@xxxxxxxxx>
Signed-off-by Kevin Tian <kevin.tian@xxxxxxxxx>

diff -r 935a81f86348 -r 8928c89a8d0a tools/libxc/xc_private.c
--- a/tools/libxc/xc_private.c  Tue Oct 25 02:56:53 2005
+++ b/tools/libxc/xc_private.c  Tue Oct 25 02:57:47 2005
@@ -313,46 +313,6 @@
     return (ret < 0) ? -1 : op.u.getmemlist.num_pfns;
 }
 
-#ifdef __ia64__
-int xc_ia64_get_pfn_list(int xc_handle,
-                         uint32_t domid, 
-                         unsigned long *pfn_buf, 
-                         unsigned int start_page,
-                         unsigned int nr_pages)
-{
-    dom0_op_t op;
-    int ret;
-
-    op.cmd = DOM0_GETMEMLIST;
-    op.u.getmemlist.domain   = (domid_t)domid;
-    op.u.getmemlist.max_pfns = ((unsigned long)start_page << 32) | nr_pages;
-    op.u.getmemlist.buffer   = pfn_buf;
-
-    if ( mlock(pfn_buf, nr_pages * sizeof(unsigned long)) != 0 )
-    {
-        PERROR("Could not lock pfn list buffer");
-        return -1;
-    }    
-
-    /* XXX Hack to put pages in TLB, hypervisor should be able to handle this 
*/
-    memset(pfn_buf, 0, nr_pages * sizeof(unsigned long));
-    ret = do_dom0_op(xc_handle, &op);
-
-    (void)munlock(pfn_buf, nr_pages * sizeof(unsigned long));
-
-    return (ret < 0) ? -1 : op.u.getmemlist.num_pfns;
-}
-
-long xc_get_max_pages(int xc_handle, uint32_t domid)
-{
-    dom0_op_t op;
-    op.cmd = DOM0_GETDOMAININFO;
-    op.u.getdomaininfo.domain = (domid_t)domid;
-    return (do_dom0_op(xc_handle, &op) < 0) ? 
-        -1 : op.u.getdomaininfo.max_pages;
-}
-#endif
-
 long xc_get_tot_pages(int xc_handle, uint32_t domid)
 {
     dom0_op_t op;
diff -r 935a81f86348 -r 8928c89a8d0a tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h     Tue Oct 25 02:56:53 2005
+++ b/tools/libxc/xenctrl.h     Tue Oct 25 02:57:47 2005
@@ -414,6 +414,12 @@
                          unsigned long *pfn_buf, 
                          unsigned int start_page, unsigned int nr_pages);
 
+int xc_copy_to_domain_page(int xc_handle, uint32_t domid,
+                          unsigned long dst_pfn, void *src_page);
+
+int xc_ia64_copy_to_domain_pages(int xc_handle, uint32_t domid,
+        void* src_page, unsigned long dst_pfn, int nr_pages);
+
 long xc_get_max_pages(int xc_handle, uint32_t domid);
 
 int xc_mmuext_op(int xc_handle, struct mmuext_op *op, unsigned int nr_ops,
diff -r 935a81f86348 -r 8928c89a8d0a tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Tue Oct 25 02:56:53 2005
+++ b/tools/python/xen/xend/image.py    Tue Oct 25 02:57:47 2005
@@ -342,12 +342,15 @@
 
     def getDomainMemory(self, mem):
         """@see ImageHandler.getDomainMemory"""
+       page_kb = 4
+       if os.uname()[4] == 'ia64':
+           page_kb = 16
         # for ioreq_t and xenstore
         static_pages = 2
-        return mem + self.getPageTableSize(mem / 1024) + 4 * static_pages
+        return mem + (self.getPageTableSize(mem / 1024) + static_pages) * 
page_kb
             
     def getPageTableSize(self, mem_mb):
-        """Return the size of memory needed for 1:1 page tables for physical
+        """Return the pages of memory needed for 1:1 page tables for physical
            mode.
 
         @param mem_mb: size in MB
@@ -355,13 +358,13 @@
         """
         # 1 page for the PGD + 1 pte page for 4MB of memory (rounded)
         if os.uname()[4] == 'x86_64':
-            return (5 + ((mem_mb + 1) >> 1)) * 4
+            return 5 + ((mem_mb + 1) >> 1)
         elif os.uname()[4] == 'ia64':
-            # XEN/IA64 has p2m table allocated on demand, so only return
-            # guest firmware size here.
-            return 16 * 1024
+            # 1:1 pgtable is allocated on demand ia64, so just return rom size
+           # for guest firmware
+            return 1024
         else:
-            return (1 + ((mem_mb + 3) >> 2)) * 4
+            return 1 + ((mem_mb + 3) >> 2)
 
 
 """Table of image handler classes for virtual machine images.  Indexed by

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Necessary change to support ia64/vti domain build in common code., Xen patchbot -unstable <=