|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 09/10] ask the hypervisor how much space it needs res
To: |
"Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx> |
Subject: |
[Xen-devel] [PATCH 09/10] ask the hypervisor how much space it needs reserved |
From: |
Jeremy Fitzhardinge <jeremy@xxxxxxxx> |
Date: |
Thu, 14 Jun 2007 17:48:27 -0700 |
Cc: |
Xen-Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Rusty Russell <rusty@xxxxxxxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>, Andi Kleen <ak@xxxxxxx>, Vivek Goyal <vgoyal@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, v12n <virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx> |
Delivery-date: |
Fri, 15 Jun 2007 07:50:38 -0700 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxx |
List-help: |
<mailto:xen-devel-request@lists.xensource.com?subject=help> |
List-id: |
Xen developer discussion <xen-devel.lists.xensource.com> |
List-post: |
<mailto:xen-devel@lists.xensource.com> |
List-subscribe: |
<http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
List-unsubscribe: |
<http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
References: |
<20070615004818.424726597@xxxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
User-agent: |
quilt/0.46-1 |
Ask the hypervisor how much space it needs reserved, since 32-on-64
doesn't need any space, and it may change in future.
Signed-off-by: Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx>
---
arch/i386/xen/enlighten.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
===================================================================
--- a/arch/i386/xen/enlighten.c
+++ b/arch/i386/xen/enlighten.c
@@ -1113,6 +1113,17 @@ static void setup_hypercall_page(void)
native_write_msr(ebx + 0, ((u64)hypercall_mfn) << PAGE_SHIFT);
}
+static void __init xen_reserve_top(void)
+{
+ unsigned long top = HYPERVISOR_VIRT_START;
+ struct xen_platform_parameters pp;
+
+ if (HYPERVISOR_xen_version(XENVER_platform_parameters, &pp) == 0)
+ top = pp.virt_start;
+
+ reserve_top_address(-top + 2 * PAGE_SIZE);
+}
+
/* First C function to be called on Xen boot */
asmlinkage void __init xen_start_kernel(void)
{
@@ -1163,7 +1174,7 @@ asmlinkage void __init xen_start_kernel(
paravirt_ops.kernel_rpl = 0;
/* set the limit of our address space */
- reserve_top_address(-HYPERVISOR_VIRT_START + 2 * PAGE_SIZE);
+ xen_reserve_top();
/* set up basic CPUID stuff */
cpu_detect(&new_cpu_data);
--
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|