Commit db6767ba authored by Jingyi Wang's avatar Jingyi Wang Committed by Paolo Bonzini
Browse files

arm64: its: Handle its command queue wrapping



Because micro-bench may send a large number of ITS commands, we
should handle ITS command queue wrapping as kernel instead of just
failing the test.

Signed-off-by: default avatarJingyi Wang <wangjingyi11@huawei.com>
Reviewed-by: default avatarEric Auger <eric.auger@redhat.com>
Signed-off-by: Andrew Jones's avatarAndrew Jones <drjones@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 9c537510
......@@ -164,8 +164,9 @@ static struct its_cmd_block *its_allocate_entry(void)
{
struct its_cmd_block *cmd;
assert((u64)its_data.cmd_write < (u64)its_data.cmd_base + SZ_64K);
cmd = its_data.cmd_write++;
if ((u64)its_data.cmd_write == (u64)its_data.cmd_base + SZ_64K)
its_data.cmd_write = its_data.cmd_base;
return cmd;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment