* [PATCH] PoD: Fix domain build populate-on-demand cache allocation
@ 2010-08-09 13:18 George Dunlap
2010-08-11 14:56 ` Stefano Stabellini
0 siblings, 1 reply; 2+ messages in thread
From: George Dunlap @ 2010-08-09 13:18 UTC (permalink / raw)
To: xen-devel; +Cc: george.dunlap
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@eu.citrix.com>
diff -r fe930e1b2ce8 -r c453b237894e tools/libxc/xc_hvm_build.c
--- a/tools/libxc/xc_hvm_build.c Fri Aug 06 18:35:02 2010 +0100
+++ b/tools/libxc/xc_hvm_build.c Mon Aug 09 14:18:02 2010 +0100
@@ -123,7 +123,6 @@
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;
@@ -237,11 +236,6 @@
{
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;
}
@@ -284,11 +278,6 @@
{
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;
}
@@ -302,15 +291,16 @@
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 )
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] PoD: Fix domain build populate-on-demand cache allocation
2010-08-09 13:18 [PATCH] PoD: Fix domain build populate-on-demand cache allocation George Dunlap
@ 2010-08-11 14:56 ` Stefano Stabellini
0 siblings, 0 replies; 2+ messages in thread
From: Stefano Stabellini @ 2010-08-11 14:56 UTC (permalink / raw)
To: George Dunlap; +Cc: xen-devel@lists.xensource.com
On Mon, 9 Aug 2010, George Dunlap wrote:
> 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@eu.citrix.com>
applied, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-11 14:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-09 13:18 [PATCH] PoD: Fix domain build populate-on-demand cache allocation George Dunlap
2010-08-11 14:56 ` Stefano Stabellini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).