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] [xen-unstable] [Xen-devel] [PATCH] PoD: Fix domain build

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [Xen-devel] [PATCH] PoD: Fix domain build populate-on-demand cache allocation
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 13 Aug 2010 02:15:45 -0700
Delivery-date: Fri, 13 Aug 2010 02:20:55 -0700
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 George Dunlap <george.dunlap@xxxxxxxxxxxxx>
# Date 1281538581 -3600
# Node ID 6f059a340cdf60e59f58bbca755a62356f57ea0e
# Parent  3b839375d5bcb3a4b484170a890e340493b4738a
[Xen-devel] [PATCH] PoD: Fix domain build populate-on-demand cache allocation
Rather than trying to count the number of PoD entries we're putting in, we
simply pass the target # of pages - the vga hole, and let the hypervisor
do the calculation.

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 tools/libxc/xc_hvm_build.c |   18 ++++--------------
 1 files changed, 4 insertions(+), 14 deletions(-)

diff -r 3b839375d5bc -r 6f059a340cdf tools/libxc/xc_hvm_build.c
--- a/tools/libxc/xc_hvm_build.c        Wed Aug 11 15:56:01 2010 +0100
+++ b/tools/libxc/xc_hvm_build.c        Wed Aug 11 15:56:21 2010 +0100
@@ -123,7 +123,6 @@ static int setup_guest(xc_interface *xch
     xen_pfn_t *page_array = NULL;
     unsigned long i, nr_pages = (unsigned long)memsize << (20 - PAGE_SHIFT);
     unsigned long target_pages = (unsigned long)target << (20 - PAGE_SHIFT);
-    unsigned long pod_pages = 0;
     unsigned long entry_eip, cur_pages;
     void *hvm_info_page;
     uint32_t *ident_pt;
@@ -238,11 +237,6 @@ static int setup_guest(xc_interface *xch
             {
                 stat_1gb_pages += done;
                 done <<= SUPERPAGE_1GB_SHIFT;
-                if ( pod_mode && target_pages > cur_pages )
-                {
-                    int d = target_pages - cur_pages;
-                    pod_pages += ( done < d ) ? done : d;
-                }
                 cur_pages += done;
                 count -= done;
             }
@@ -285,11 +279,6 @@ static int setup_guest(xc_interface *xch
                 {
                     stat_2mb_pages += done;
                     done <<= SUPERPAGE_2MB_SHIFT;
-                    if ( pod_mode && target_pages > cur_pages )
-                    {
-                        int d = target_pages - cur_pages;
-                        pod_pages += ( done < d ) ? done : d;
-                    }
                     cur_pages += done;
                     count -= done;
                 }
@@ -303,15 +292,16 @@ static int setup_guest(xc_interface *xch
                 xch, dom, count, 0, 0, &page_array[cur_pages]);
             cur_pages += count;
             stat_normal_pages += count;
-            if ( pod_mode )
-                pod_pages -= count;
         }
     }
 
+    /* Subtract 0x20 from target_pages for the VGA "hole".  Xen will
+     * adjust the PoD cache size so that domain tot_pages will be
+     * target_pages - 0x20 after this call. */
     if ( pod_mode )
         rc = xc_domain_memory_set_pod_target(xch,
                                              dom,
-                                             pod_pages,
+                                             target_pages - 0x20,
                                              NULL, NULL, NULL);
 
     if ( rc != 0 )

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [Xen-devel] [PATCH] PoD: Fix domain build populate-on-demand cache allocation, Xen patchbot-unstable <=