[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YqF/+tqMA7GtjfAY@infradead.org>
Date: Wed, 8 Jun 2022 22:07:06 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Dongli Zhang <dongli.zhang@...cle.com>
Cc: iommu@...ts.linux-foundation.org, xen-devel@...ts.xenproject.org,
x86@...nel.org, linuxppc-dev@...ts.ozlabs.org,
virtualization@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org, hch@...radead.org,
m.szyprowski@...sung.com, jgross@...e.com, tglx@...utronix.de,
mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com,
sstabellini@...nel.org, mpe@...erman.id.au, konrad.wilk@...cle.com,
mst@...hat.com, jasowang@...hat.com, joe.jin@...cle.com
Subject: Re: [PATCH RFC v1 6/7] virtio: use io_tlb_high_mem if it is active
On Wed, Jun 08, 2022 at 05:55:52PM -0700, Dongli Zhang wrote:
> /* Unique numbering for virtio devices. */
> @@ -241,6 +243,12 @@ static int virtio_dev_probe(struct device *_d)
> u64 device_features;
> u64 driver_features;
> u64 driver_features_legacy;
> + struct device *parent = dev->dev.parent;
> + u64 dma_mask = min_not_zero(*parent->dma_mask,
> + parent->bus_dma_limit);
> +
> + if (dma_mask == DMA_BIT_MASK(64))
> + swiotlb_use_high(parent);
The driver already very clearly communicated its addressing
requirements. The underlying swiotlb code needs to transparently
pick the right pool.
Powered by blists - more mailing lists