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

Can you clarify "command-queue access" #254

Closed
hsxyb opened this issue Aug 28, 2023 · 8 comments
Closed

Can you clarify "command-queue access" #254

hsxyb opened this issue Aug 28, 2023 · 8 comments

Comments

@hsxyb
Copy link

hsxyb commented Aug 28, 2023

Can you clarify what does "command-queue access" mean in description of cqmf ?
Does it include command queue read access and the write access of IOFENCE.C command with AV=1?

|8 |`cqmf` |RW1C | If command-queue access leads to a memory fault then
the command-queue-memory-fault bit is set to 1 and
the command-queue stalls until this bit is cleared.
To re-enable command processing, software should
clear this bit by writing 1.

@ved-rivos
Copy link
Collaborator

Does it include command queue read access and the write access of IOFENCE.C command with AV=1?

Yes. It includes both.

@ved-rivos
Copy link
Collaborator

Would be a good clarification to include - see 6902620.

@hsxyb hsxyb closed this as completed Aug 29, 2023
@wangyongzhen0322
Copy link

If the write access failure of IOFENCE.C command with AV=1 will set the cqmf to 1, the cqh will reference the IOFENCE.C command. But a IOFENCE.C command completion is determined by cqh advancing past the index of the IOFENCE.C command in the CQ and the IOMMU writes data to memory with AV=1 when the IOFENCE.C command completes. It seems that there is confusion in the description of the spec. When a write access leads a failure with AV=1, wheather the IOFENCE.C is complete?Using only cqh and cqmf does not seem to be enough; it cannot indicate both IOFENCE.C completion and memory failure.

@ved-rivos
Copy link
Collaborator

When a write access leads a failure with AV=1, wheather the IOFENCE.C is complete?

The IOFENCE.C is not complete because it encounters a memory fault.

@wangyongzhen0322
Copy link

Thanks for your answer. And could you consider revising the sentence in the spec, as it reads very ambiguously in terms of time relationships?

If AV=1, the IOMMU writes DATA to memory at a 4-byte aligned address ADDR[63:2] * 4 as a 4-byte store when the command completes.

@wangyongzhen0322
Copy link

And in the function do_fence_c, the bit fence_w_ip will be set to 1 no matter whether the write access is successful if the AV=1. So is there an error in the c_model?

@ved-rivos
Copy link
Collaborator

And in the function do_fence_c, the bit fence_w_ip will be set to 1 no matter whether the write access is successful if the AV=1. So is there an error in the c_model?

Yes, the fence_w_ip interrupt signaling should happen after the memory write. Updated in #367

@ved-rivos
Copy link
Collaborator

ved-rivos commented Jun 28, 2024

And could you consider revising the sentence in the spec, as it reads very ambiguously in terms of time relationships?

The DATA is written to the ADDR if the command completes but if the write to ADDR faults then no data is written i.e. no data is written unless the command completes and completing the command involves writing the data. Included a clarification here a3b06a2

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