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

QEMU Morello #149

Merged
merged 208 commits into from
Oct 12, 2021
Merged

QEMU Morello #149

merged 208 commits into from
Oct 12, 2021

Conversation

arichardson
Copy link
Member

Supersedes #128

Comments from #148 also still need to be addressed, but otherwise it should mostly be ready for reviewing.

@arichardson
Copy link
Member Author

I think we should not use rebase+merge here but rather create a merge commit once all issues have been addressed. Rebasing and fixing history is rather awkward.

include/qemu/log.h Outdated Show resolved Hide resolved
accel/tcg/log_instr.c Outdated Show resolved Hide resolved
accel/tcg/tcg-runtime.h Outdated Show resolved Hide resolved
target/arm/helper.c Outdated Show resolved Hide resolved
accel/tcg/translator.c Outdated Show resolved Hide resolved
hw/arm/Kconfig Outdated Show resolved Hide resolved
hw/arm/armtrickbox.c Outdated Show resolved Hide resolved
scripts/sail_parser.py Outdated Show resolved Hide resolved
target/arm/arm-semi.c Outdated Show resolved Hide resolved
target/arm/cpu.h Outdated Show resolved Hide resolved
target/arm/helper.c Outdated Show resolved Hide resolved
target/arm/helper.c Outdated Show resolved Hide resolved
tcg/tcg.c Outdated Show resolved Hide resolved
target/arm/helper.c Outdated Show resolved Hide resolved
LawrenceEsswood and others added 17 commits October 12, 2021 14:14
One was missing and one was poor style.
This matches RISC-V and avoids using the binutils INSN_* namespace.
This reduces the diff to upstream.
It is impossible to have an otype outside of the valid range with the
current compression schemes. Now that we extract the otype from the
pesbt bits it's also impossible for cap_get_otype_unsigned() to return
such a value.
These helpers are not called by the TCG generated for Morello.
This removes some CAP_cc usages from the Morello helpers.
And factor out a new cap_otype_is_reserved() helper function.
After the latest refactoring we can now drop the TARGET_MORELLO branch.
Most uses appear to assume that LAST_NONRESERVED_OTYPE is a valid
non-reserved otype rather than the first reserved one. However, all of
those checks are incorrect for Morello, so we should really remove
this macro.
target/cheri-common/cheri_utils.h Outdated Show resolved Hide resolved
target/cheri-common/cheri_utils.h Show resolved Hide resolved
target/cheri-common/op_helper_cheri_common.c Outdated Show resolved Hide resolved
target/cheri-common/op_helper_cheri_common.c Outdated Show resolved Hide resolved
target/cheri-common/cheri_utils.h Outdated Show resolved Hide resolved
Performing comparisons against this constant is likely to cause bugs
since Morello allocates otypes from the bottom but MIPS/RISC-V allocate
from the top, so any less than/greater than checks are wrong for at
least one architecture.
This makes it clear that we are referring the the MIN/MAX numerical value.
Previously it was -1 to -16 for MIPS/RISC-V which meant that my
implementation of cap_otype_is_reserved() was broken since the check
`otype > 0x3ffff && otype <= 0x3fff0` is never true.
This does not corrupt other fields, but they will be truncated silently.
Copy link
Member

@jrtc27 jrtc27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's hope this one didn't break anything... 🤞

@arichardson arichardson changed the title QEMU Morello (rebased) QEMU Morello Oct 12, 2021
@arichardson arichardson merged commit 138fc64 into dev Oct 12, 2021
@arichardson arichardson deleted the qemu-morello-rebased branch October 12, 2021 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ctrl-C in interactive morello-purecap session hits assertion and brings down QEMU.
4 participants