Re: [PATCH v8 3/7] swiotlb: Zero out bounce buffer for untrusted device

From: Christoph Hellwig
Date: Fri Aug 30 2019 - 03:31:37 EST


On Fri, Aug 30, 2019 at 03:17:14PM +0800, Lu Baolu wrote:
> +#include <linux/pci.h>

> + if (dev_is_untrusted(hwdev) && zero_size)
> + memset(zero_addr, 0, zero_size);

As said before swiotlb must not grow pci dependencies like this.
Please move the untrusted flag to struct device.