[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1cf9651a-b8ee-11f1-1f70-db3492a76400@redhat.com>
Date: Tue, 8 Jun 2021 09:00:15 +0800
From: Jason Wang <jasowang@...hat.com>
To: Jason Gunthorpe <jgg@...dia.com>
Cc: Alex Williamson <alex.williamson@...hat.com>,
"Tian, Kevin" <kevin.tian@...el.com>,
Jean-Philippe Brucker <jean-philippe@...aro.org>,
"Jiang, Dave" <dave.jiang@...el.com>,
"Raj, Ashok" <ashok.raj@...el.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
Jonathan Corbet <corbet@....net>,
Robin Murphy <robin.murphy@....com>,
LKML <linux-kernel@...r.kernel.org>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
David Gibson <david@...son.dropbear.id.au>,
Kirti Wankhede <kwankhede@...dia.com>,
David Woodhouse <dwmw2@...radead.org>,
Gerd Hoffmann <kraxel@...hat.com>
Subject: Re: [RFC] /dev/ioasid uAPI proposal
在 2021/6/7 下午10:14, Jason Gunthorpe 写道:
> On Mon, Jun 07, 2021 at 11:18:33AM +0800, Jason Wang wrote:
>
>> Note that no drivers call these things doesn't meant it was not
>> supported by the spec.
> Of course it does. If the spec doesn't define exactly when the driver
> should call the cache flushes for no-snoop transactions then the
> protocol doesn't support no-soop.
Just to make sure we are in the same page. What I meant is, if the DMA
behavior like (no-snoop) is device specific. There's no need to mandate
a virtio general attributes. We can describe it per device. The devices
implemented in the current spec does not use non-coherent DMA doesn't
mean any future devices won't do that. The driver could choose to use
transport (e.g PCI), platform (ACPI) or device specific (general virtio
command) way to detect and flush cache when necessary.
>
> no-snoop is only used in very specific sequences of operations, like
> certain GPU usages, because regaining coherence on x86 is incredibly
> expensive.
>
> ie I wouldn't ever expect a NIC to use no-snoop because NIC's expect
> packets to be processed by the CPU.
For NIC yes. But virtio is more that just NIC. We've already supported
GPU and crypto devices. In this case, no-snoop will be useful since the
data is not necessarily expected to be processed by CPU.
And a lot of other type of devices are being proposed.
Thanks
>
> "non-coherent DMA" is some general euphemism that evokes images of
> embedded platforms that don't have coherent DMA at all and have low
> cost ways to regain coherence. This is not at all what we are talking
> about here at all.
>
> Jason
>
Powered by blists - more mailing lists