lkml.org 
[lkml]   [2022]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V1 6/6] arm/xen: Assign xen-grant DMA ops for xen-grant DMA devices
From
Date

On 23.04.22 19:42, Christoph Hellwig wrote:

Hello Christoph

> On Fri, Apr 22, 2022 at 07:51:03PM +0300, Oleksandr Tyshchenko wrote:
>> static inline void xen_setup_dma_ops(struct device *dev)
>> {
>> #ifdef CONFIG_XEN
>> - if (xen_swiotlb_detect())
>> + if (arch_has_restricted_virtio_memory_access() &&
>> + xen_is_grant_dma_device(dev))
>> + xen_grant_setup_dma_ops(dev);
>> + else if (xen_swiotlb_detect())
> I don't think that arch_has_restricted_virtio_memory_access
> check should be there as it still is a bit of a layering violation.

Well, I will remove it then (and update commit description).

For virtualized but non-virtio devices, it is not needed at all. For the
virtio devices, this check is already present at
virtio.c:virtio_features_ok()



>
--
Regards,

Oleksandr Tyshchenko

\
 
 \ /
  Last update: 2022-04-24 18:07    [W:0.083 / U:3.820 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site