[PATCH 2/6] virtio: pci: Tear down VQs in virtio_pci_reset()

Simon Glass sjg at chromium.org
Sat Apr 1 08:31:58 CEST 2023


On Thu, 30 Mar 2023 at 03:26, Ying-Chun Liu (PaulLiu)
<paul.liu at linaro.org> wrote:
>
> From: Will Deacon <willdeacon at google.com>
>
> The pages backing the virtqueues for virtio PCI devices are not freed
> on reset, despite the virtqueue structure being freed as part of the
> driver '->priv_auto' destruction at ->remove() time.
>
> Call virtio_pci_del_vqs() from virtio_pci_reset() to free the virtqueue
> pages before freeing the virtqueue structure itself.
>
> Signed-off-by: Will Deacon <willdeacon at google.com>
> [ Paul: pick from the Android tree. Rebase to the upstream ]
> Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu at linaro.org>
> Cc: Bin Meng <bmeng.cn at gmail.com>
> Link: https://android.googlesource.com/platform/external/u-boot/+/5ed54ccd83cbffd0d8719ce650604b4e44b5b0d8
> ---
>  drivers/virtio/virtio_pci_modern.c | 38 +++++++++++++++---------------
>  1 file changed, 19 insertions(+), 19 deletions(-)
>

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list