[PATCH 09/10] ask the hypervisor how much space it needs reserved

[PATCH 09/10] ask the hypervisor how much space it needs reserved

Post by Jeremy Fit » Sun, 17 Jun 2007 00:00:17


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 < XXXX@XXXXX.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
@@ -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);

--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/
 
 
 

1. SN#22515 Packaging and Patching, ZFS Enhancements in Solaris 10 10/09

2. [PATCH 6/10] lguest code: the little linux hypervisor.


Due to gcc shortcomings, each instance of this will chew an additional 100
bytes of stack. Unless they fixed it recently. Is a bit of a timebomb. I
guess ksaprintf() could be used.

It also looks a bit, umm, innovative.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/

3. [q] kbuild for private asm-offsets ( [PATCH 6/10] lguest code: the little linux hypervisor.)

4. [q] kbuild for private asm-offsets ( [PATCH 6/10] lguest code: the little linux hypervisor.)

5. [RFC PATCH 09/35] Change __FIXADDR_TOP to leave room for the hypervisor.

6. [RFC PATCH 09/35] Change __FIXADDR_TOP to leave room for the hypervisor.

7. [PATCH 13/22] [PATCH] Driver Co Add /sys/hypervisor when needed

8. [RFC/PATCH] FUSYN 10/10: user space fulocks

9. [RFC/PATCH] FUSYN 6/10: user space/kernel space tracker

10. Question in pointers and it's reserved memory space?

11. [patch 6/8] Make __FIXADDR_TOP variable to allow it to make space for a hypervisor.

12. [PATCH 7 of 13] Make __FIXADDR_TOP variable to allow it to make space for a hypervisor

13. [PATCH 05/10] mm: allow mempool to fall back to memalloc reserves

14. [PATCH 04/10] mm: slub: add knowledge of reserve pages

15. [PATCH 7 of 13] Make __FIXADDR_TOP variable to allow it to make space for a hypervisor