Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not disable counters when reading on aarch64 #32

Merged
merged 3 commits into from
Sep 7, 2021

Conversation

xurtis
Copy link
Contributor

@xurtis xurtis commented May 11, 2021

If the cycle counter is disabled during a read, the operation can be preempted and lose the count of cycles for the duration of the preemption.

If the cycle counter is disabled during a read, the operation can be
preempted and lose the count of cycles for the duration of the
preemption.

Signed-off-by: Curtis Millar <curtis.millar@data61.csiro.au>
@xurtis xurtis requested a review from nomadeel May 11, 2021 05:59
@xurtis xurtis self-assigned this May 11, 2021
@kent-mcleod
Copy link
Member

Should armv7 also be updated in the same way?

@xurtis
Copy link
Contributor Author

xurtis commented May 16, 2021

armv7 performs this check in the kernel using the API to execute a function in the kernel. As this is performed while the kernel lock is held and while interrupts are disabled, it cannot be preempted.

@kent-mcleod
Copy link
Member

armv7 performs this check in the kernel using the API to execute a function in the kernel. As this is performed while the kernel lock is held and while interrupts are disabled, it cannot be preempted.

Can you show me where, because from what I can see, it accesses the register directly from userlevel: https://github.com/seL4/seL4_libs/blob/master/libsel4bench/arch_include/arm/armv/armv7-a/sel4bench/armv/sel4bench.h#L91

@xurtis
Copy link
Contributor Author

xurtis commented May 18, 2021

Not sure where I saw it. You're right, the issue is also an ARMv7.

@axel-h
Copy link
Member

axel-h commented Sep 7, 2021

any plans to merge this?

@lsf37 lsf37 assigned lsf37 and unassigned xurtis Sep 7, 2021
@lsf37 lsf37 merged commit 707000b into seL4:master Sep 7, 2021
sleffler pushed a commit to AmbiML/sparrow-seL4_libs that referenced this pull request Oct 11, 2022
If the cycle counter is disabled during a read, the operation can be
preempted and lose the count of cycles for the duration of the
preemption.

Signed-off-by: Curtis Millar <curtis.millar@data61.csiro.au>
GitOrigin-RevId: 707000b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants