]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm/arm64: vgic-its: Fix return value for device table restore
authorwanghaibin <wanghaibin.wang@huawei.com>
Thu, 26 Oct 2017 15:23:03 +0000 (17:23 +0200)
committerChristoffer Dall <christoffer.dall@linaro.org>
Sun, 29 Oct 2017 02:25:06 +0000 (03:25 +0100)
commitb3b6b5992ed59c9579b4389c80ba3ea69f1b42f3
tree348fe223141e12c8878019e002b47f80dc6b84e5
parent22dc0fb6c2eac85ec3f1c801e4ef3396fa270882
KVM: arm/arm64: vgic-its: Fix return value for device table restore

If ITT only contains invalid entries, vgic_its_restore_itt
returns 1 and this is considered as an an error in
vgic_its_restore_dte.

Also in case the device table only contains invalid entries,
the table restore fails and this is not correct.

This patch fixes those 2 issues:
- vgic_its_restore_itt now returns <= 0 values. If all
  ITEs are invalid, this is considered as successful.
- vgic_its_restore_device_tables also returns <= 0 values.

We also simplify the returned value computation in
handle_l1_dte.

Signed-off-by: wanghaibin <wanghaibin.wang@huawei.com>
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
virt/kvm/arm/vgic/vgic-its.c