Commit b923826
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>1 parent f9b269f commit b923826
1 file changed
Lines changed: 15 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1936 | 1936 | | |
1937 | 1937 | | |
1938 | 1938 | | |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
1939 | 1947 | | |
1940 | 1948 | | |
1941 | 1949 | | |
| |||
1947 | 1955 | | |
1948 | 1956 | | |
1949 | 1957 | | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
1950 | 1962 | | |
1951 | 1963 | | |
1952 | 1964 | | |
| |||
2103 | 2115 | | |
2104 | 2116 | | |
2105 | 2117 | | |
2106 | | - | |
2107 | | - | |
2108 | | - | |
2109 | | - | |
| 2118 | + | |
2110 | 2119 | | |
2111 | 2120 | | |
2112 | 2121 | | |
| |||
2136 | 2145 | | |
2137 | 2146 | | |
2138 | 2147 | | |
| 2148 | + | |
2139 | 2149 | | |
2140 | | - | |
| 2150 | + | |
2141 | 2151 | | |
2142 | 2152 | | |
2143 | 2153 | | |
| |||
0 commit comments