We had a deadlock between:
- free_process_memory_range (take lock) -> ihk_mc_pt_free_range ->
... -> remote_flush_tlb_array_cpumask -> "/* Wait for all cores */"
and
- obj_list_lookup() under fileobj_list_lock that disabled irqs
and thus never ack'd the remote flush
The rework is quite big but removes the need for the big lock,
although devobj and shmobj needed a new smaller lock to be
introduced - the new locks are used much more locally and
should not cause problems.
On the bright side, refcounting being moved to memobj level means
we could remove refcounting implemented separately in all object
types and simplifies code a bit.
Change-Id: I6bc8438a98b1d8edddc91c4ac33c11b88e097ebb
This optimization make the offloading thread quickly yield to
another thread. Without this, it yileded only after the interval timer
set the rescheduling flag.
Change-Id: Ida3b17ed94782d5d1af0185a96b1f50d9db8d244
Defining C structures for the following objects:
(1) Remote and local context
(2) Stack of system call arguments / return values
Change-Id: Iafbb6c795bd765e3c78c54a255d8a1e4d4536288
(1) Add --enable-uti option. The binary-patch library is
preloaded with this option.
(2) Binary-patching is done by syscall_intercept developed by Intel
This commit includes the following fixes:
(1) Fix do_exit() and terminate() handling
(2) Fix timing of killing mcexec threads when McKernel thread calls terminate()
Change-Id: Iad885e1e5540ed79f0808debd372463e3b8fecea
Set PROT_EXEC to host VMA because uti needs PROT_EXEC for text VMAs.
Meanings of prot bits of Host VMA has been changed as follows.
RWX: No mapping or RW mapping
RX: Read only mapping
This is because this is a normal case since terminate() is changed so
that it first kills all mcexec threads and then kill McKernel threads.
Change-Id: I88380bf28b60645d361baded525d71105235c16f
It is accompanied by the following fixes:
(1) Fix put ppd locations in mcexec_wait_syscall()
(2) Move put ptd to end of mcexec_terminate_thread_unsafe() and mcexec_ret_syscall()
(3) Add debug messages for ptd add/get/put
(4) Fix ptd-add/get/put matching in mcexec_wait_syscall()
* Skip put when woken-up from wait_event_interruptible() by signal
Change-Id: Ib9be3f5e62a7a370197cb36c9fa7c4d79f44c314