CENTOS8-64-STD does not run on Xen
CENTOS8-64-STD does not run on any of our Xen images, seemingly because we run in PV mode. At first we thought this was just grub blsconfig
, and maybe initially it was, but now there is an ELF problem in the centos/rhel kernel binary that causes the xl ELF loader to fail due to a bounds check. For instance, here is output of the key ELF range-populated data structures for the centos kernel and an ubuntu kernel at the bounds check point (after installing libxen-4.9-dbgsym
and xen-utils-4.9-dbgsym
, via gdb --args /usr/lib/xen-4.9/bin/xl create -c xm.conf
and b libelf-dominfo.c:463
p *parms
, against the c8 image in the golden LV):
centos8:
(gdb) p *parms
$5 = {guest_info = 0, elf_note_start = 140737195041828, elf_note_end = 140737195042248, elf_notes = {{type = XEN_ENT_NONE, name = 0x0, data = {str = 0x0, num = 0}}, {type = XEN_ENT_NONE, name = 0x0, data = {str = 0x0, num = 0}}, {type = XEN_ENT_LONG,
name = 0x7ffff68bc6d5 "HYPERCALL_PAGE", data = {str = 0xffffffff81001000 <error: Cannot access memory at address 0xffffffff81001000>, num = 18446744071578849280}}, {type = XEN_ENT_LONG, name = 0x7ffff68bc6af "VIRT_BASE", data = {
str = 0xffffffff80000000 <error: Cannot access memory at address 0xffffffff80000000>, num = 18446744071562067968}}, {type = XEN_ENT_LONG, name = 0x7ffff68bc6c8 "PADDR_OFFSET", data = {str = 0x0, num = 0}}, {type = XEN_ENT_STR, name = 0x7ffff68bc7f9 "XEN_VERSION",
data = {str = 0x7fffee846460 "xen-3.0", num = 140737195041888}}, {type = XEN_ENT_STR, name = 0x7ffff68bc673 "GUEST_OS", data = {str = 0x7fffee846434 "linux", num = 140737195041844}}, {type = XEN_ENT_STR, name = 0x7ffff68bc805 "GUEST_VERSION", data = {
str = 0x7fffee84644c "2.6", num = 140737195041868}}, {type = XEN_ENT_STR, name = 0x7ffff68bc66c "LOADER", data = {str = 0x7fffee846524 "generic", num = 140737195042084}}, {type = XEN_ENT_STR, name = 0x7ffff68bc813 "PAE_MODE", data = {str = 0x7fffee846510 "yes",
num = 140737195042064}}, {type = XEN_ENT_STR, name = 0x7ffff68bc859 "FEATURES", data = {str = 0x7fffee8464c0 "!writable_page_tables|pae_pgdir_above_4gb", num = 140737195041984}}, {type = XEN_ENT_NONE, name = 0x0, data = {str = 0x0, num = 0}}, {
type = XEN_ENT_LONG, name = 0x7ffff68bc81c "HV_START_LOW", data = {str = 0xffff800000000000 <error: Cannot access memory at address 0xffff800000000000>, num = 18446603336221196288}}, {type = XEN_ENT_NONE, name = 0x0, data = {str = 0x0, num = 0}}, {
type = XEN_ENT_LONG, name = 0x7ffff68bc829 "SUSPEND_CANCEL", data = {str = 0x1 <error: Cannot access memory at address 0x1>, num = 1}}, {type = XEN_ENT_LONG, name = 0x7ffff68bc838 "INIT_P2M", data = {
str = 0x8000000000 <error: Cannot access memory at address 0x8000000000>, num = 549755813888}}, {type = XEN_ENT_LONG, name = 0x7ffff68bc841 "MOD_START_PFN", data = {str = 0x1 <error: Cannot access memory at address 0x1>, num = 1}}, {type = XEN_ENT_LONG,
name = 0x7ffff68bc84f "SUPPORTED_FEATURES", data = {str = 0x8801 <error: Cannot access memory at address 0x8801>, num = 34817}}, {type = XEN_ENT_NONE, name = 0x0, data = {str = 0x0, num = 0}}}, guest_os = "linux\000\000\000\000\000\000\000\000\000\000",
guest_ver = "2.6", '\000' <repeats 12 times>, xen_ver = "xen-3.0\000\000\000\000\000\000\000\000", loader = "generic\000\000\000\000\000\000\000\000", pae = XEN_PAE_EXTCR3, bsd_symtab = false, unmapped_initrd = true, virt_base = 18446744071562067968,
virt_entry = 16777216, virt_hypercall = 18446744071578849280, virt_hv_start_low = 18446603336221196288, p2m_base = 549755813888, elf_paddr_offset = 0, f_supported = {34833}, f_required = {1}, phys_entry = 4294967295, virt_kstart = 18446744071578845184,
virt_kend = 18446744071620788224}
ubuntu kernel:
(gdb) p *parms
$1 = {guest_info = 0, elf_note_start = 140737289363924, elf_note_end = 140737289364392, elf_notes = {{type = XEN_ENT_NONE, name = 0x0, data = {str = 0x0, num = 0}}, {type = XEN_ENT_LONG, name = 0x7ffff68bc869 "ENTRY", data = {
str = 0xffffffff826a4180 <error: Cannot access memory at address 0xffffffff826a4180>, num = 18446744071602585984}}, {type = XEN_ENT_LONG, name = 0x7ffff68bc6d5 "HYPERCALL_PAGE", data = {
str = 0xffffffff81001000 <error: Cannot access memory at address 0xffffffff81001000>, num = 18446744071578849280}}, {type = XEN_ENT_LONG, name = 0x7ffff68bc6af "VIRT_BASE", data = {
str = 0xffffffff80000000 <error: Cannot access memory at address 0xffffffff80000000>, num = 18446744071562067968}}, {type = XEN_ENT_LONG, name = 0x7ffff68bc6c8 "PADDR_OFFSET", data = {str = 0x0, num = 0}}, {type = XEN_ENT_STR, name = 0x7ffff68bc7f9 "XEN_VERSION",
data = {str = 0x7ffff423a210 "xen-3.0", num = 140737289363984}}, {type = XEN_ENT_STR, name = 0x7ffff68bc673 "GUEST_OS", data = {str = 0x7ffff423a1e4 "linux", num = 140737289363940}}, {type = XEN_ENT_STR, name = 0x7ffff68bc805 "GUEST_VERSION", data = {
str = 0x7ffff423a1fc "2.6", num = 140737289363964}}, {type = XEN_ENT_STR, name = 0x7ffff68bc66c "LOADER", data = {str = 0x7ffff423a2ec "generic", num = 140737289364204}}, {type = XEN_ENT_STR, name = 0x7ffff68bc813 "PAE_MODE", data = {str = 0x7ffff423a2d8 "yes",
num = 140737289364184}}, {type = XEN_ENT_STR, name = 0x7ffff68bc859 "FEATURES", data = {str = 0x7ffff423a288 "!writable_page_tables|pae_pgdir_above_4gb", num = 140737289364104}}, {type = XEN_ENT_NONE, name = 0x0, data = {str = 0x0, num = 0}}, {
type = XEN_ENT_LONG, name = 0x7ffff68bc81c "HV_START_LOW", data = {str = 0xffff800000000000 <error: Cannot access memory at address 0xffff800000000000>, num = 18446603336221196288}}, {type = XEN_ENT_NONE, name = 0x0, data = {str = 0x0, num = 0}}, {
type = XEN_ENT_LONG, name = 0x7ffff68bc829 "SUSPEND_CANCEL", data = {str = 0x1 <error: Cannot access memory at address 0x1>, num = 1}}, {type = XEN_ENT_LONG, name = 0x7ffff68bc838 "INIT_P2M", data = {
str = 0x8000000000 <error: Cannot access memory at address 0x8000000000>, num = 549755813888}}, {type = XEN_ENT_LONG, name = 0x7ffff68bc841 "MOD_START_PFN", data = {str = 0x1 <error: Cannot access memory at address 0x1>, num = 1}}, {type = XEN_ENT_LONG,
name = 0x7ffff68bc84f "SUPPORTED_FEATURES", data = {str = 0x801 <error: Cannot access memory at address 0x801>, num = 2049}}, {type = XEN_ENT_LONG, name = 0x7ffff68bc862 "PHYS32_ENTRY", data = {str = 0x10003f0 <error: Cannot access memory at address 0x10003f0>,
num = 16778224}}}, guest_os = "linux\000\000\000\000\000\000\000\000\000\000", guest_ver = "2.6", '\000' <repeats 12 times>, xen_ver = "xen-3.0\000\000\000\000\000\000\000\000", loader = "generic\000\000\000\000\000\000\000\000", pae = XEN_PAE_EXTCR3,
bsd_symtab = false, unmapped_initrd = true, virt_base = 18446744071562067968, virt_entry = 18446744071602585984, virt_hypercall = 18446744071578849280, virt_hv_start_low = 18446603336221196288, p2m_base = 549755813888, elf_paddr_offset = 0, f_supported = {2065},
f_required = {1}, phys_entry = 16778224, virt_kstart = 18446744071578845184, virt_kend = 18446744071607926784}
(The bad member in the first data structure is parms->virt_entry
.)
(This issue of inability to boot a centos8 kernel on Xen PV was reported to the CentOS forums (https://forums.centos.org/viewtopic.php?t=71934); but no resolution.)