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

Re: [Xen-devel] Hypervisor compilation for arm without debug=y



So the confusing double negative -fno-omit-frame-pointer is causing the
frame pointer to be omitted for this function?
Not exactly, debug=y forces -fno-omit-frame-pointer into CFLAG. Without debug, it is built without this option.
I just forced -fno-omit-frame-pointer for the particular function.
 
I wonder why the frame pointer is a problem here. This function is a bit
sensitive since it relocates Xen in physical RAM but it doesn't change
the virtual address space so I would expect fp, sp etc to remain valid.

The danger is if something is written to the stack between the initial
copy and the switch over, but I'd have thought that the frame pointer
would be written to the stack near the start and popped at the end and
mostly not touched in the middle.
 Well, I roughly compared the function dumps for both cases (with frame pointer and without), and noticed more aggressive pc-related data manipulation if built without fp. This could be a cause, f.e. if data modified in the old place, while than read from new location.

I guess what I'm trying to say is I'm not confident that adding that
flag has "fixed" the issue, rather than just causing the compiler to
behave a bit differently and avoid it.
I haven't root caused the issue so I do not affirm it's a fix. It's just a WA works for me.
 
Are you able to post any details about the boot failure? Is it a crash
or something more subtle? Are you able to localise it to a particular
instruction or section of code?
Unfortunately I can't localize particular instruction. JTAG I have does not allow stepping through and use HW BP in HYP mode. With SW BP I just localized an issue in this function, but it isn't right tool to debug that relocation stuff.

Sincerely,
Andrii Anisov.

_______________________________________________
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®.