[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2] xen/tools: Introduce QNX IFS loader



On Fri, 2014-09-19 at 19:45 +0300, Oleksandr Tyshchenko wrote:

> > Is it possible to make QNX position independent?
> Unfortunately, I was trying but I couldn't make.
> 
> More detailed:
> we have base address of the image: [image=0x80008000]
> startup_vaddr is based on "base address"
> domainbuilder: detail: xc_dom_probe_qnx_ifs: startup_vaddr: 0x800085bc
> 
> I dropped base address from IFS buildfile:
> domainbuilder: detail: xc_dom_probe_qnx_ifs: startup_vaddr: 0x000005bc
> and tried to do next thing:
> dom->parms.virt_entry = v_start + startup_hdr->startup_vaddr;
> But this didn't work. QNX didn't boot.

There's more to making something position independent than just dropping
the base address, it needs the code in question to be carefully
written/compiled to be position independent, at least up to the point
where it controls its own virtual address space mappings.

e.g. Xen on ARM is very careful throughout xen/arch/arm/*/head.S to
handle this, once we hit C we are running on our page tables and can
assume a 2MB base address.

I'd not be especially surprised if qnx, which is targeting the embedded
space, had no support for being built as a position independent binary.

The upshot of that is that I expect you would need to do a bunch of core
QNX work to make it position independent, or more likely you would
accept that a given QNX binary may only run on one version of Xen and
upgrading Xen would have knock on affects on your guest VMs (given your
market I don't expect you will be upgrading Xen in the field, so perhaps
you are fine with this).

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.