|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] fix initialisation of physaddr_bitsize etc.
In 64-bit hypervisors with 32-bit dom0, the dom0 domain builder only
initialises d->arch.physaddr_bitsize if it has the ELF tag which sets
virt_hv_start_low. This causes memory allocation to fail very early.
The attached patch fixes this, using __HYPERVISOR_COMPAT_VIRT_START as
a default value for the elf tag.
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
diff -r 99b8ffe25088 xen/arch/x86/domain_build.c
--- a/xen/arch/x86/domain_build.c Mon Feb 04 13:57:01 2008 +0000
+++ b/xen/arch/x86/domain_build.c Thu Feb 07 13:22:27 2008 +0000
@@ -349,8 +349,9 @@ int __init construct_dom0(
if ( parms.pae == PAEKERN_extended_cr3 )
set_bit(VMASST_TYPE_pae_extended_cr3, &d->vm_assist);
- if ( UNSET_ADDR != parms.virt_hv_start_low && elf_32bit(&elf) )
- {
+ if ( elf_32bit(&elf) )
+ {
+ uint64_t virt_hv_start_low;
#if CONFIG_PAGING_LEVELS < 4
unsigned long mask = (1UL << L2_PAGETABLE_SHIFT) - 1;
#else
@@ -358,8 +359,11 @@ int __init construct_dom0(
? (1UL << L2_PAGETABLE_SHIFT) - 1
: (1UL << L4_PAGETABLE_SHIFT) - 1;
#endif
-
- value = (parms.virt_hv_start_low + mask) & ~mask;
+ virt_hv_start_low = parms.virt_hv_start_low;
+ if (virt_hv_start_low == UNSET_ADDR)
+ virt_hv_start_low = __HYPERVISOR_COMPAT_VIRT_START;
+
+ value = (virt_hv_start_low + mask) & ~mask;
#ifdef CONFIG_COMPAT
HYPERVISOR_COMPAT_VIRT_START(d) =
max_t(unsigned int, m2p_compat_vstart, value);
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel] [PATCH] fix initialisation of physaddr_bitsize etc.,
Ian Jackson <=
|
|
|
|
|