14 Commits

Author SHA1 Message Date
Gerwin Klein
4f4721706e reply: do not assume replyObject NULL invariant
We no longer guarantee the invariant that the replyObject reference is
NULL when the thread state is not BlockedOnReceive or BlockedOnReply.

It is likely that this invariant was true in the kernel so far, but
proving it would require a new proof that the reference is already NULL
for any setThreadState to a simple state like Running, Inactive,
Restart. This either means reasoning about the state the thread had
before setThreadSate, or explicitly setting the reference to NULL more
often.

There are many of these setThreadState instances, and the benefit of
maintaining the invariant is low. Not maintaining the invariant removes
some state updates from low-level functions (called often) at the cost
of adding some if-checks in higher-level functions (called less often).

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2025-02-10 15:53:08 +11:00
Alwin Joshy
f8b2440b38 Implemented the vm fault fastpath on aarch64
This fastpath optimizes the performance of VM faults in
seL4. It is heavily based on the existing seL4_Call
fastpath and includes the addition of fastpathing replies
to faulted threads in the seL4_ReplyRecv fastpath.
Currently only supported only implemented for aarch64.

Signed-off-by: Alwin Joshy <joshyalwin@gmail.com>
2023-03-08 17:58:14 +11:00
alwin-joshy
069c937272 Implemented signal fastpath on AARCH64 (#793)
The signal fastpath aims to optimize the
seL4_Signal operation. In this commit, it is
implemented for MCS AARCH64 (SMP and non-SMP).
The fastpath does not include the case where
signaling results in a higher priority thread
being unblocked and made available for
scheduling (on any core). It does not
fastpath the case where the signaled thread
is donated a scheduling context and has its
FPU state saved in the FPU of a core.

Co-authored-by: Shane Kadish <shane.kadish@csiro.au>
Signed-off-by: Alwin Joshy <joshyalwin@gmail.com>
2023-01-10 10:15:39 +11:00
Qian Ge
512a0200de replacing all ifndef with pargma once
All the kernel header files now use pargma once rather than the ifndef,
as the pre-processed C files do not change while header files
are protected with pargma once. This will also solve any naming issues
caused by ifndef.
2020-03-23 11:04:46 +11:00
Gerwin Klein
79da079239 Convert license tags to SPDX identifiers
This commit also converts our own copyright headers to directly use
SPDX, but leaves all other copyright header intact, only adding the
SPDX ident. As far as possible this commit also merges multiple
Data61 copyright statements/headers into one for consistency.
2020-03-09 13:21:49 +08:00
Anna Lyons
554f812da3 mcs: scheduling context donation over ipc
After this commit, threads blocked on an endpoint can recieve a
scheduling context from the thread that wakes the blocked thread.
2019-08-22 11:22:37 +10:00
Anna Lyons
d0930f67de style: consistently attach return type
Add attach-return-type to astyle
2019-03-19 14:05:36 +11:00
Thibaut Perami
3df00ea4d7 SELFOUR-6: Add GrantReply to the rights system.
GrantReply is a new access right added to endpoint capabilities, which
allows seL4_Call to be used on those capabilities (specifically, it
allows reply caps *only* to be granted across endpoints).

Prior to the addition of GrantReply, endpoint capabilities required the
Grant access right, which allowed any arbitrary capabilitiy to be
transferred over an endpoint. Using GrantReply, systems can now be
constructed where threads using seL4_Call over an endpoint do not need to be in the same
security subsystem.
2018-12-12 14:04:28 +11:00
Donny Yang
c68a69f82a x64: Rearrange cnode_cap structure to improve fastpath speed 2017-01-10 16:57:57 +11:00
Donny Yang
fbafb777b0 x64: Always set the high bits of certain pointers in the fastpath
seL4 is always in the top of memory, so the high bits of pointers are always 1.
The autogenerated unpacking code doesn't know that, however, so will try to
conditionally sign extend (in 64-bit mode), which wastes cycles in the fast
path. Instead, we can do the unpacking ourselves and explicitly set the high
bits.
2016-11-30 11:25:05 +11:00
Adrian Danis
811800da3e x64: Efficiently pack objects for fastpath
Improves the packing of structures used in the fastpath
2016-11-25 16:26:24 +11:00
Adrian Danis
4c94f43c51 x64: Fastpath 2016-10-12 12:22:32 +11:00
Anna Lyons
54603123e6 SELFOUR-317: rename async endpoint to notification object, and other
fallout.
2015-11-09 17:18:43 +11:00
Adrian Danis
f2b2301aa2 Refactor ARM and ia32 fastpath to use a common code base 2015-08-21 08:34:08 +10:00