Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

xen: move checks for e820 conflicts further up

Move the checks for e820 memory map conflicts using the
xen_chk_is_e820_usable() helper further up in order to prepare
resolving some of the possible conflicts by doing some e820 map
modifications, which must happen before evaluating the RAM layout.

Signed-off-by: Juergen Gross <jgross@suse.com>
Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>

+22 -22
+22 -22
arch/x86/xen/setup.c
··· 764 764 /* Make sure the Xen-supplied memory map is well-ordered. */ 765 765 e820__update_table(&xen_e820_table); 766 766 767 + /* 768 + * Check whether the kernel itself conflicts with the target E820 map. 769 + * Failing now is better than running into weird problems later due 770 + * to relocating (and even reusing) pages with kernel text or data. 771 + */ 772 + xen_chk_is_e820_usable(__pa_symbol(_text), 773 + __pa_symbol(_end) - __pa_symbol(_text), 774 + "kernel"); 775 + 776 + /* 777 + * Check for a conflict of the xen_start_info memory with the target 778 + * E820 map. 779 + */ 780 + xen_chk_is_e820_usable(__pa(xen_start_info), sizeof(*xen_start_info), 781 + "xen_start_info"); 782 + 783 + /* 784 + * Check for a conflict of the hypervisor supplied page tables with 785 + * the target E820 map. 786 + */ 787 + xen_pt_check_e820(); 788 + 767 789 max_pages = xen_get_max_pages(); 768 790 769 791 /* How many extra pages do we need due to remapping? */ ··· 857 835 e820__range_add(ISA_START_ADDRESS, ISA_END_ADDRESS - ISA_START_ADDRESS, E820_TYPE_RESERVED); 858 836 859 837 e820__update_table(e820_table); 860 - 861 - /* 862 - * Check whether the kernel itself conflicts with the target E820 map. 863 - * Failing now is better than running into weird problems later due 864 - * to relocating (and even reusing) pages with kernel text or data. 865 - */ 866 - xen_chk_is_e820_usable(__pa_symbol(_text), 867 - __pa_symbol(_end) - __pa_symbol(_text), 868 - "kernel"); 869 - 870 - /* 871 - * Check for a conflict of the xen_start_info memory with the target 872 - * E820 map. 873 - */ 874 - xen_chk_is_e820_usable(__pa(xen_start_info), sizeof(*xen_start_info), 875 - "xen_start_info"); 876 - 877 - /* 878 - * Check for a conflict of the hypervisor supplied page tables with 879 - * the target E820 map. 880 - */ 881 - xen_pt_check_e820(); 882 838 883 839 xen_reserve_xen_mfnlist(); 884 840