Hi Jingyi,
On 7/2/20 5:01 AM, Jingyi Wang wrote:
> 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: Jingyi Wang <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Thanks
Eric
> ---
> lib/arm64/gic-v3-its-cmd.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/lib/arm64/gic-v3-its-cmd.c b/lib/arm64/gic-v3-its-cmd.c
> index 2c208d1..34574f7 100644
> --- a/lib/arm64/gic-v3-its-cmd.c
> +++ b/lib/arm64/gic-v3-its-cmd.c
> @@ -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;
> }
>
>
_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm