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

arch-arm: Fix Virtual Interrupt logic in secure mode #584

Merged
merged 6 commits into from
Nov 27, 2023

Conversation

giactra
Copy link
Contributor

@giactra giactra commented Nov 21, 2023

This PR is fixing remaining issues in the ArmISA::Interrupt class; more specifically it is enabling
virtual interrupts in secure mode (when FEAT_SEL2 is present). Previous version was assuming no
virtual interrupt was possible in secure mode. We fix this assumption by replacing the security check
with the EL2Enabled helper which closely matches the Arm pseudocode

Change-Id: I358050a507fb76654e87165720dfb3b2ea6ca838
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Vitual interrupts are enabled in secure mode as well
after the introduction of FEAT_SEL2. Replacing the
secure mode check with the EL2Enabled one

Change-Id: Id685a05d5adfa87b2a366f6be42bf344168927d4
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
With this patch we align virtual interrupts with respect to
the physical ones by introducing a matching takeVirtualInt
method.

Change-Id: Ib7835a21b85e4330ba9f051bc8fed691d6e1382e
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
There is no need to call the methods for every kind
of interrupt. A pending one should short-circuit the
remaining checks

Change-Id: I2c9eb680a7baa4644745b8cbe48183ff6f8e3102
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Similarly to the physical version [1], we rewrite the
masking logic to account for FEAT_SEL2.

The interrupt table is taken from the Arm architecture reference
manual (version DDI 0487H.a, section D1.3.6, table R_BKHXL)

[1]: gem5#430

Change-Id: Icb6eb1944d8241293b3ef3c349b20f3981bcc558
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
The CPU should not sleep with a pending virtual interrupt
if secure mode EL2 is supported (FEAT_SEL2)

Change-Id: Ib71c4a09d76a790331cf6750da45f83694946aee
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
@giactra giactra added the arch-arm The ARM ISA label Nov 21, 2023
Copy link
Contributor

@rjc-arch rjc-arch left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@BobbyRBruce BobbyRBruce merged commit ab1d5dc into gem5:develop Nov 27, 2023
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-arm The ARM ISA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants