Fix the error handling of the following two functions:
ihk_device_get_cpu_topology: Returns NULL when not found,
valid non-NULL pointer when found
get_cache_topology: Returns NULL when not found,
valid non-NULL pointer when found,
minus error number on error
Change-Id: Ied13a61d4ab0c314477c45ea659ff2b798ad97ee
Fujitsu: POSTK_DEBUG_TEMP_FIX_21
Note: the original fujitsu implementation didn't rename the various
save_fs function/desc to save_tls for some reason, might as well go all
the way though...
Change-Id: Ic362c15c8b320c4d258d2ead8c5fd4eafd9d0ae9
Fujitsu: POSTK_DEBUG_ARCH_DEP_91
arm64 performs context-switch in kernel space instead of user space as in
x86_64.
Change-Id: Ib119b9ff014effb970183ee86cfac67fab773cba
Futjitsu: POSTK_DEBUG_ARCH_DEP_99
Some old commit before -Werror was enabled got merged,
blocking other builds. Quickly fix before anyone notices
Change-Id: I5a034cef6f79e3e99b381bb1a5d97088e33a6718
mcoverlayfs code is now unused (technically should work on top of the
soft emulation but not well tested, and untested unused code is bad).
Remove it.
Left the unshare/bind_mount_recursive code in mcexec in a new
MCEXEC_BIND_MOUNT ifdef (only in config.h.in directly to discourage use.
it disables the ioctl as well, but the main code is still compiled to
keep up to date with linux api changes... although it's using kallsyms
lookup so it does not validate much more than "the symbol still exists")
I honestly think this should go as well (people who would want to use it
are root and could do it manually), but will give up for now.
Change-Id: I832b6a8ab19e24ed67a1a5044b1c6c32381ae0aa
In order to speed up test bot work it would be helpful to check for
identical build outputs and skip tests if required.
This removes most use of the install path in c code:
- ql_mpi uses /proc/self/exe and looks for talker/server in same
directory as itself
- mcexec looks for libihk.so in /proc/self/maps and use that path for
LD_PRELOAD prefix path
- rootfsdir is not used right now but until a better fix happens just
hardcode it, someone who wants to change it can set it through cmake
There is one last occurence of the install directory, MCEXEC_PATH in
mcctrl's binfmt code, for which the build system will just overwrite it
to a constant string at build time instead of trying to remove it too
hard. It would be possible to pass it as a kernel parameter or look for
mcexec in PATH but this is too much work for now.
Change-Id: I5d1352bc5748a1ea10dcae4be630f30a07609296
use generic struct zero initializer instead.
Older gcc used on arm also seem to have trouble with '{}',
so use '{ 0 }' instead
Change-Id: I83d43b05f8d1d44e1dd86502b48e28fe242e1db2
Fujitsu added this ifdef together with ifndef __arch64__ and thus disabled
the option for both archs in practice; it probably does not hurt to restore...
I'm not sure I see the point of disabling the option at mcexec level though,
but who am I to care.
Change-Id: I0d4bffb6ed325edac8ae577773e19c0fff6ca2ed
Fujitsu: POSTK_DEBUG_ARCH_DEP_53
There are valid use cases where a remote page fault has no available
thread data/packet available to use, e.g. when device driver threads
need to access the data (BXI).
Do the per thread data lookup to use the right channel/tid if available,
and use mcctrl_ikc_send_wait with a new message number directly.
The fault is no longer handled in mckernel syscall forwarding code but
in the ikc handler directly in irq, this should be ok because page
faults are interrupts anyway so the code should be irq-safe.
Change-Id: Ie60f413cdaee6c1a824b4a2c93637899cb9bf9c9