LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Andi Kleen <ak@muc.de>, Andrew Morton <akpm@linux-foundation.org>,
	virtualization@lists.osdl.org, xen-devel@lists.xensource.com,
	Chris Wright <chrisw@sous-sol.org>,
	Keir Fraser <keir@xensource.com>
Subject: [PATCH 07/10] xen: ask the hypervisor how much space it needs reserved
Date: Fri, 12 Oct 2007 14:11:39 -0700	[thread overview]
Message-ID: <20071012211148.465174000@goop.org> (raw)
In-Reply-To: <20071012211132.198718000@goop.org>

[-- Attachment #1: xen-dynamic-topaddr.patch --]
[-- Type: text/plain, Size: 1153 bytes --]

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@xensource.com>

---
 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
@@ -1085,6 +1085,17 @@ static const struct machine_ops __initda
 };
 
 
+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)
 {
@@ -1134,7 +1145,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);

-- 


  parent reply	other threads:[~2007-10-12 21:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-12 21:11 [PATCH 00/10] REVIEW: Xen patches for 2.6.24 Jeremy Fitzhardinge
2007-10-12 21:11 ` [PATCH 01/10] remove dead code in pgtable_cache_init Jeremy Fitzhardinge
2007-10-12 21:11 ` [PATCH 02/10] Clean up duplicate includes in arch/i386/xen/ Jeremy Fitzhardinge
2007-10-12 21:11 ` [PATCH 03/10] xen: yield to IPI target if necessary Jeremy Fitzhardinge
2007-10-12 21:11 ` [PATCH 04/10] xen: add batch completion callbacks Jeremy Fitzhardinge
2007-11-13 22:50   ` patch xen-multicall-callbacks.patch queued to -stable tree gregkh
2007-10-12 21:11 ` [PATCH 05/10] xen: deal with stale cr3 values when unpinning pagetables Jeremy Fitzhardinge
2007-11-13 22:50   ` patch xen-handle-lazy-cr3-on-unpin.patch queued to -stable tree gregkh
2007-10-12 21:11 ` [PATCH 06/10] xen: lock pte pages while pinning/unpinning Jeremy Fitzhardinge
2007-10-12 21:11 ` Jeremy Fitzhardinge [this message]
2007-10-12 21:11 ` [PATCH 08/10] xen: fix incorrect vcpu_register_vcpu_info hypercall argument Jeremy Fitzhardinge
2007-11-13 22:50   ` patch xen-fix-register_vcpu_info.patch queued to -stable tree gregkh
2007-10-12 21:11 ` [PATCH 09/10] xen: add some debug output for failed multicalls Jeremy Fitzhardinge
2007-10-12 21:11 ` [PATCH 10/10] xfs: eagerly remove vmap mappings to avoid upsetting Xen Jeremy Fitzhardinge
2007-11-13 22:50   ` patch xen-xfs-unmap.patch queued to -stable tree gregkh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071012211148.465174000@goop.org \
    --to=jeremy@goop.org \
    --cc=ak@muc.de \
    --cc=akpm@linux-foundation.org \
    --cc=chrisw@sous-sol.org \
    --cc=keir@xensource.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=virtualization@lists.osdl.org \
    --cc=xen-devel@lists.xensource.com \
    --subject='Re: [PATCH 07/10] xen: ask the hypervisor how much space it needs reserved' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).