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

Question about gpasize in iotval2 when s1 bare and gpa over 56bit #385

Closed
Orion3-e opened this issue Jul 25, 2024 · 5 comments
Closed

Question about gpasize in iotval2 when s1 bare and gpa over 56bit #385

Orion3-e opened this issue Jul 25, 2024 · 5 comments

Comments

@Orion3-e
Copy link

According to the spec
Snipaste_2024-07-25_11-41-46
seems the iotval2 should save the whole gpa high part value [63:2], even the gpa is over maxgpa ,
but in the c model , seems gpa dont save the value above 56bit when S1 bare (va=gpa), depending on page_sz .
image
image
so , should the iotval2 save the upper_bits in this situation? thanks

@ved-rivos
Copy link
Collaborator

Do you have a test input that you can add to show what you mean? What was your input va and what do you see saved in iotval2 for that input?

@Orion3-e
Copy link
Author

image
this is the req we send : iova = fffffff54d1ee2bc
image
this is the result covert from the rivos model
image
this is the two stage function handles gpa for this req , the page_sz screenshoted in my last comment shows it is not 64 , causing the gpa high part [63:57] discarded
in this situation , dc.pdtv=1 && vsatp mode=bare so s1 bare va =gpa , so i think the iotval2 should save fffffff54d1ee2bc ,not the fffff54d1ee2bc in the temp fault q result rivos , seems bit [63:57] of iotval2 is discarded by two stage translation. Thanks

@ved-rivos
Copy link
Collaborator

The issue is that the pte->PPN is 44 bit wide. I have fixed this in #390
Please also send me a direct message.

@Orion3-e
Copy link
Author

Now the iotval2 check of that req pass, thanks

@zetalog
Copy link

zetalog commented Jul 30, 2024

I have different opinion of the saved iotval/iotval2, probably you guys should take a look over it:
#391

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

No branches or pull requests

3 participants