mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 17:22:07 +00:00
VFIO fixes for v6.3-rc4
- Fix dirty size reporting for pre-copy in mlx5 variant driver (Yishai Hadas) -----BEGIN PGP SIGNATURE----- iQJPBAABCAA5FiEEQvbATlQL0amee4qQI5ubbjuwiyIFAmQaLRwbHGFsZXgud2ls bGlhbXNvbkByZWRoYXQuY29tAAoJECObm247sIsiQjMP+we+dpw91BTxcLShKrrc A1Mzil0gKLeztDFNH04rbi45JshjXZkzbFKH/e0LXumud3Rnywna6Lk63TiwM7qB pAWdy+SXffOMCAIeEep6McjblWheYTmydJjHtuPLOqC5ZJEN2aD9adBzqvtSyG19 COxkZafBZl0m0AfMkEbguv6b14ywQgTkhq8lYpYLsYiZYUOd2M5jy3cATJ9KmcXR 4XSJmv6P9jDa0cci+g+gphDAz90zI8kdTD4Mq9InE56JE1bBMr4/fes79Rbheiui cpZCkFoBSMg0sOqrn2189Hnzc9gnbInPTMfx3Nz6mh5XH3PlAJurfMRd9I9itUQx D/gAysnnlLP8MQntJfCf2o0Njb7a3PqO7BFjXmG7ZK2ZOP+6G8ZIeALQXn/lkbYF RPJwXPEzlo+Pe8oFg/rTD9PqDVFXK6TjQuStIZNT0u1XpJwNZuYr7qSGXD/OdoUa Lkurr7rM/KsOA2fYrrW0jm9tPxEI9ilTSz9ILxkMc5RAzvF2DXkJ2VNLtLY+Lc7d c4IWSgUFBCO+vtvYJyMVsTeVcqkbKauYOQ8ItQCv1j9kg6xb5b8qzerj9CJDFTSE T1PG9wvsZBW9pWbBzAgXHgUt7ohiF2UynOO4jZUCcEXKTOrzxAK8rwoKGhS6j1CF ID36fHwRLnTx8z9yH1WiXoGd =VSl2 -----END PGP SIGNATURE----- Merge tag 'vfio-v6.3-rc4' of https://github.com/awilliam/linux-vfio Pull VFIO fix from Alex Williamson: - Fix dirty size reporting for pre-copy in mlx5 variant driver (Yishai Hadas) * tag 'vfio-v6.3-rc4' of https://github.com/awilliam/linux-vfio: vfio/mlx5: Fix the report of dirty_bytes upon pre-copy
This commit is contained in:
commit
a1effab7a3
@ -442,16 +442,10 @@ static long mlx5vf_precopy_ioctl(struct file *filp, unsigned int cmd,
|
||||
if (migf->pre_copy_initial_bytes > *pos) {
|
||||
info.initial_bytes = migf->pre_copy_initial_bytes - *pos;
|
||||
} else {
|
||||
buf = mlx5vf_get_data_buff_from_pos(migf, *pos, &end_of_data);
|
||||
if (buf) {
|
||||
info.dirty_bytes = buf->start_pos + buf->length - *pos;
|
||||
} else {
|
||||
if (!end_of_data) {
|
||||
ret = -EINVAL;
|
||||
goto err_migf_unlock;
|
||||
}
|
||||
info.dirty_bytes = inc_length;
|
||||
}
|
||||
info.dirty_bytes = migf->max_pos - *pos;
|
||||
if (!info.dirty_bytes)
|
||||
end_of_data = true;
|
||||
info.dirty_bytes += inc_length;
|
||||
}
|
||||
|
||||
if (!end_of_data || !inc_length) {
|
||||
|
Loading…
Reference in New Issue
Block a user