[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMJs5B8_zfmb0kwHy0To0P3MqucS08QyW2yVzaOdEZS7+k9PiA@mail.gmail.com>
Date: Thu, 2 Nov 2017 06:50:01 +0100
From: Christoffer Dall <cdall@...aro.org>
To: Eric Auger <eric.auger@...hat.com>
Cc: eric.auger.pro@...il.com,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"kvmarm@...ts.cs.columbia.edu" <kvmarm@...ts.cs.columbia.edu>,
"marc.zyngier@....com" <marc.zyngier@....com>,
Peter Maydell <peter.maydell@...aro.org>,
Andre Przywara <andre.przywara@....com>,
Haibin Wang <wanghaibin.wang@...wei.com>, wu.wubin@...wei.com,
Andrew Jones <drjones@...hat.com>, Wei Huang <wei@...hat.com>
Subject: Re: [PATCH v6 2/9] KVM: arm/arm64: vgic-its: Fix vgic_its_restore_collection_table
returned value
On Thu, Oct 26, 2017 at 05:23:04PM +0200, Eric Auger wrote:
> vgic_its_restore_cte returns +1 if the collection table entry
> is valid and properly decoded. As a consequence, if the
> collection table is fully filled with valid data that are
> decoded without error, vgic_its_restore_collection_table()
> returns +1. This is wrong.
>
> Let's return 0 in that case.
>
Acked-by: Christoffer Dall <christoffer.dall@...aro.org>
> Fixes: ea1ad53e1e31a3 (KVM: arm64: vgic-its: Collection table save/restore)
> Signed-off-by: Eric Auger <eric.auger@...hat.com>
>
> ---
>
> v5 -> v6:
> - use the same trick as vgic_its_restore_itt and
> vgic_its_restore_device_tables
>
> v4 -> v5:
> - added Christoffer R-b
>
> v2 -> v3: creation
> ---
> virt/kvm/arm/vgic/vgic-its.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c
> index d27a301..8230ffe 100644
> --- a/virt/kvm/arm/vgic/vgic-its.c
> +++ b/virt/kvm/arm/vgic/vgic-its.c
> @@ -2268,6 +2268,10 @@ static int vgic_its_restore_collection_table(struct vgic_its *its)
> gpa += cte_esz;
> read += cte_esz;
> }
> +
> + if (ret > 0)
> + return 0;
> +
> return ret;
> }
>
> --
> 2.5.5
>
Powered by blists - more mailing lists