Skip to content

Lrcoutinho slbiag #89

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

Open
wants to merge 13 commits into
base: lrcoutinho-master
Choose a base branch
from
Open

Lrcoutinho slbiag #89

wants to merge 13 commits into from

Conversation

lrcoutinho
Copy link

No description provided.

Leandro Lupori and others added 6 commits May 12, 2022 16:25
GEN_PRIV can't be used in functions that return a value.
Add GEN_PRIV2 for this end.
Also decode RIC, PRS and R operands.
Also decode RIC, PRS and R operands.
This initial version supports the invalidation of one or all
TLB entries. Flush by PID/LPID, or based in process/partition
scope is not supported, because it would make using the
generic QEMU TLB implementation hard. In these cases, all
entries are flushed.
Implement the following PowerISA v3.0 instuction:
slbiag: SLB Invalidate All Global X-form

Move the following PowerISA v3.0 instuction to decodetree:
slbie: SLB Invalidate Entry X-form
slbieg: SLB Invalidate Entry Global X-form
slbia: SLB Invalidate All X-form
slbmte: SLB Move To Entry X-form
slbmfev: SLB Move From Entry VSID X-form
slbmfee: SLB Move From Entry ESID X-form
slbfee: SLB Find Entry ESID
slbsync: SLB Synchronize

Signed-off-by: Lucas Coutinho <[email protected]>
@lrcoutinho lrcoutinho self-assigned this May 20, 2022
@luporl
Copy link

luporl commented May 20, 2022

I think it would be better to split the first commit in 2:

  • Move instructions to decode tree
  • Implement slbiag (and then squash the unused variable commit with it)

Copy link

@luporl luporl left a comment

Choose a reason for hiding this comment

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

Overall I agree with the changes and with the approach that was taken, but there are some points that still need attention. However, some of the comments are nitpicks.

Comment on lines 208 to 222
&X_rs_l rs l:bool
@X_rs_l ...... rs:5 .... l:1 ..... .......... . &X_rs_l

&X_ih ih:uint8_t
@X_ih ...... -- ih:3 ----- ----- .......... - &X_ih

&X_rb rb
@X_rb ...... ----- ----- rb:5 .......... - &X_rb

&X_sb rs rb
@X_sb ...... rs:5 ----- rb:5 .......... - &X_sb

&X_tb1 rt rb
@X_tb1 ...... rt:5 ----- rb:5 .......... . &X_tb1

Choose a reason for hiding this comment

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

No '-' (dashes) here, only dots

dashes only in the instructions, below

Comment on lines +488 to +489
is == TLBIE_IS_VA) ||
(!prs && is == TLBIE_IS_PID))) {

Choose a reason for hiding this comment

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

I see your intention with this indentation, but it looks weird
Might be better to remove it and merge the lines

((ric == TLBIE_RIC_PWC || ric == TLBIE_RIC_ALL) &&
 is == TLBIE_IS_VA) || (!prs && is == TLBIE_IS_PID))) {

Choose a reason for hiding this comment

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

or even better (if it fits the 80 cols)

if (unlikely(ric == TLBIE_RIC_GRP ||
    ((ric == TLBIE_RIC_PWC || ric == TLBIE_RIC_ALL) && is == TLBIE_IS_VA) ||
    (!prs && is == TLBIE_IS_PID))) {

IIRC the style guide isn't strict about aligning with the most internal parenthesis, so I think we can align with the if parenthesis

Copy link

Choose a reason for hiding this comment

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

This change actually came from #88. It was already sent to the mailing list.

Copy link

@luporl luporl left a comment

Choose a reason for hiding this comment

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

Nice! LGTM now!

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.

4 participants