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

Remove redundant TLBExceptions V bit #3246

Merged
merged 1 commit into from Feb 22, 2023
Merged

Remove redundant TLBExceptions V bit #3246

merged 1 commit into from Feb 22, 2023

Conversation

ZenithalHourlyRate
Copy link
Contributor

This was introduced by "(185cac8) Add hypervisor extension (#2841)"

This is a dead code, as no circuit is producing and consuming this bit.

This was discovered when migrating Core.scala to chisel3, where strict checking was applied for IO and firrtl found this is not connected.

In the context of hypervisor extension, V bit, or virtualization mode, indicates whether the hart is currently executing in a guest.

For TLBReq, the V bit is needed as it affects the PTW thus TLB behavior on whether to do Two-Stage Address Translation.

However, the bit is not needed for TLBException. The exceptions (pf, gf, ae, ma) have no V=1/V=0 variants. Also, there is no point to add V bit for gf (guest page fault).

The io.resp.gf added below in the original patch also does not connect io.resp.gf.v. If this V bit should be added for this specific exception, it should be connected.

I assume this was added accidentally, as the original "extends CoreBundle()(p)" modification seems irrelevant.

Related issue:

Type of change: bug report

Impact: no functional change

Development Phase: implementation

Release Notes

@ZenithalHourlyRate
Copy link
Contributor Author

Do not merge yet, blocked by #3243

This was introduced by "(185cac8) Add hypervisor extension (#2841)"

This is a dead code, as no circuit is producing and consuming
this bit.

This was discovered when migrating Core.scala to chisel3, where
strict checking was applied for IO and firrtl found this is
not connected.

In the context of hypervisor extension, V bit, or _virtualization
mode_, indicates whether the hart is currently executing in a
guest.

For TLBReq, the V bit is needed as it affects the PTW thus TLB
behavior on whether to do _Two-Stage Address Translation_.

However, the bit is not needed for TLBException. The exceptions
(pf, gf, ae, ma) have no V=1/V=0 variants. Also, there is no point
to add V bit for gf (guest page fault).

The io.resp.gf added below in the original patch also does
not connect io.resp.gf.v. If this V bit should be added
for this specific exception, it should be connected.

I assume this was added accidentally, as the original
"extends CoreBundle()(p)" modification seems irrelevant.
@sequencer sequencer merged commit fa102f3 into dev Feb 22, 2023
@sequencer sequencer deleted the fix-tlbresp-v-bit branch February 22, 2023 13:34
@jerryz123 jerryz123 mentioned this pull request Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants