xen: Improve calculation of beginning of virtual address space
Subsystems (2)
PATCH 1/2 xen: Improve calculation of beginning of virtual address space
Xen changeset 26447 (x86: re-introduce map_domain_page() et al) once again altered virtual address space. Current algorithm calculating its start could not cope with that change. New version establishes this value on the base of image start address and is more generic.
xen_hyper.c +8 -4
@@ -43,10 +43,14 @@ xen_hyper_init(void)#endif #ifdef X86_64 -if (xen_major_version () >=4 ) - xht->xen_virt_start =0xffff82c480000000 ; -else - xht->xen_virt_start =0xffff828c80000000 ; + xht->xen_virt_start =symbol_value ("start" ); + +/* +* Xen virtual mapping is aligned to 1 GiB boundary. +* Image starts no more than 1 GiB below +* beginning of virtual address space. +*/ + xht->xen_virt_start &=0xffffffffc0000000 ;#endif if (machine_type("X86_64") &&
Quoted 4 lines · Daniel Kiper
Xen changeset 26447 (x86: re-introduce
map_domain_page()et al) once again altered virtual address space. Current algorithm calculating its start could not cope with that change. New version establishes this value on the base of image start address and is more generic.
And it works with the older (3.4) hypervisors binary image?
Quoted 31 lines
Signed-off-by Daniel Kiper <[email protected]>diff -Npru
crash-6.1.4.orig/xen_hyper.ccrash-6.1.4/xen_hyper.cxen_hyper.c +8
-4@@ -43,10 +43,14 @@ xen_hyper_init(void)#endif #ifdef X86_64 -if (xen_major_version () >=4 ) - xht->xen_virt_start =0xffff82c480000000 ; -else - xht->xen_virt_start =0xffff828c80000000 ; + xht->xen_virt_start =symbol_value ("start" ); + +/* +* Xen virtual mapping is aligned to 1 GiB boundary. +* Image starts no more than 1 GiB below +* beginning of virtual address space. +*/ + xht->xen_virt_start &=0xffffffffc0000000 ;#endif if (machine_type("X86_64") &&_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 7 lines · Konrad Rzeszutek Wilk
Quoted 4 lines · Daniel Kiper
Xen changeset 26447 (x86: re-introduce
map_domain_page()et al) once again altered virtual address space. Current algorithm calculating its start could not cope with that change. New version establishes this value on the base of image start address and is more generic.And it works with the older (3.4) hypervisors binary image?
It works without any issue.
Daniel