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

[all]: Add support for SVE fault tolerant instructions #876

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

murzinv
Copy link

@murzinv murzinv commented Jun 17, 2024

SVE adds instructions which can suppresses memory fault, specifically:

  • Load first-fault
  • Load non-fault
  • Auxiliary instructions to inspect First Fault Register (FFR)

SVE adds instructions which can suppresses memory fault, specifically:

 - Load first-fault
 - Load non-fault
 - Auxiliary instructions to inspect First Fault Register (FFR)
@murzinv
Copy link
Author

murzinv commented Jun 17, 2024

@maranget , @relokin I've run into inserting case where SVE load instructions can suppress fault. I noticed that non-vector instructions use lift_memop yet it seems it doesn't fit into vector case:

So, I'm seeking your advice on how to progress with that?

Thanks!

@relokin
Copy link
Member

relokin commented Jul 9, 2024

Thanks for this @murzinv, perhaps before adding support for these new instructions, or in parallel with this change, we need to add vmsa support for the existing vector instructions. Looking at the pseudocode, it looks like we have one translation/tag check per element memory read/write.

I am looking specifically at store_scatter_predicated_elem_or_merge what is that prevents from wrapping the call to do_write_mem inside a call to lift_memop?

@maranget
Copy link
Member

Hi @murzinv and @relokin, I have no precise idea on the next step. I agree with @relokin that combining SVE and VMSA is a prerequisite for this PR. Another, perhaps less interesting but less ambitious direction could be to implement additional arithmetical and logical operations.

@murzinv
Copy link
Author

murzinv commented Jul 12, 2024

we need to add vmsa support for the existing vector instructions

Cannot disagree with that 😄

Looking at the pseudocode, it looks like we have one translation/tag check per element memory read/write.

Correct.

I am looking specifically at store_scatter_predicated_elem_or_merge what is that prevents from wrapping the call to do_write_mem inside a call to lift_memop?

I assume that in such case every store of the element would end-up with either B.next1T or B.Exit, I'm not sure if it is effect we want 🤔 I also noticed that load/store pairs do not do lift_memop for each element of the pair (that's why I mentioned #813 ) and I suspect that there is a good reason for that... Anyway, I can explore your suggestion and report back.

@relokin
Copy link
Member

relokin commented Jul 12, 2024

I assume that in such case every store of the element would end-up with either B.next1T or B.Exit, I'm not sure if it is effect we want 🤔 I also noticed that load/store pairs do not do lift_memop for each element of the pair (that's why I mentioned #813 ) and I suspect that there is a good reason for that... Anyway, I can explore your suggestion and report back.

I think it's B.Next or B.Fault that we want. The instruction should raise a fault, but, also, I suspect that it's architecturally allowed to see from 0 to all non-faulting, active element write happening before entering the fault handler. That might mean multiple architecturally allowed executions just because one element read/write generates a fault.

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.

3 participants