Re: [PATCH v9 15/25] iommu/arm-smmu-v3-kvm: Add CMDQ functions
From: Nicolin Chen
Date: Thu Nov 05 2026 - 19:14:27 EST
On Thu, Oct 15, 2026 at 08:08:46PM +0000, Mostafa Saleh wrote:
> Add the command queue accessors. The hypervisor's own commands, such as
> TLB invalidations, go through smmu_send_cmd(), which queues the command
> followed by a CMD_SYNC and waits for completion. Filtered host commands
> are copied into the shadow queue with smmu_add_cmd_raw().
>
> Polling is bounded by a 1 ms timeout measured with the architected
> counter, and sleeps in WFE when the SMMU supports SEV.
>
> Split queue_space() out of queue_has_space(), as the emulation will
> check the space in the host's queue.
>
> Signed-off-by: Mostafa Saleh <smostafa@xxxxxxxxxx>
Reviewed-by: Nicolin Chen <nicolinc@xxxxxxxxxx>