lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <VI1PR04MB49600F7F1601B99810BB0ACE92340@VI1PR04MB4960.eurprd04.prod.outlook.com>
Date:   Sun, 27 Sep 2020 07:20:09 +0000
From:   Sherry Sun <sherry.sun@....com>
To:     Greg KH <gregkh@...uxfoundation.org>
CC:     "sudeep.dutt@...el.com" <sudeep.dutt@...el.com>,
        "ashutosh.dixit@...el.com" <ashutosh.dixit@...el.com>,
        "arnd@...db.de" <arnd@...db.de>,
        "wang.yi59@....com.cn" <wang.yi59@....com.cn>,
        "huang.zijiang@....com.cn" <huang.zijiang@....com.cn>,
        "rikard.falkeborn@...il.com" <rikard.falkeborn@...il.com>,
        "lee.jones@...aro.org" <lee.jones@...aro.org>,
        "mst@...hat.com" <mst@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        dl-linux-imx <linux-imx@....com>
Subject: RE: [PATCH 4/5] misc: vop: set VIRTIO_F_ACCESS_PLATFORM for
 nocoherent platform

Hi Greg,

> -----Original Message-----
> From: Greg KH <gregkh@...uxfoundation.org>
> Sent: 2020年9月25日 20:17
> To: Sherry Sun <sherry.sun@....com>
> Cc: sudeep.dutt@...el.com; ashutosh.dixit@...el.com; arnd@...db.de;
> wang.yi59@....com.cn; huang.zijiang@....com.cn;
> rikard.falkeborn@...il.com; lee.jones@...aro.org; mst@...hat.com; linux-
> kernel@...r.kernel.org; dl-linux-imx <linux-imx@....com>
> Subject: Re: [PATCH 4/5] misc: vop: set VIRTIO_F_ACCESS_PLATFORM for
> nocoherent platform
> 
> On Fri, Sep 25, 2020 at 03:26:29PM +0800, Sherry Sun wrote:
> > Set VIRTIO_F_ACCESS_PLATFORM feature for nocoherent platform, since it
> > needs the DMA API for virtio.
> >
> > Signed-off-by: Sherry Sun <sherry.sun@....com>
> > Signed-off-by: Joakim Zhang <qiangqing.zhang@....com>
> > ---
> >  drivers/misc/mic/vop/vop_main.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/misc/mic/vop/vop_main.c
> > b/drivers/misc/mic/vop/vop_main.c index d3645122c983..d609f0dc6124
> > 100644
> > --- a/drivers/misc/mic/vop/vop_main.c
> > +++ b/drivers/misc/mic/vop/vop_main.c
> > @@ -125,6 +125,9 @@ static void vop_transport_features(struct
> virtio_device *vdev)
> >  	 * creates virtio rings on preallocated memory.
> >  	 */
> >  	__virtio_clear_bit(vdev, VIRTIO_F_RING_PACKED);
> > +
> > +	if (!dev_is_dma_coherent(vdev->dev.parent))
> > +		__virtio_set_bit(vdev, VIRTIO_F_ACCESS_PLATFORM);
> 
> Why look at the parent and not the device itself?

That's a good question, here use vdev->dev.parent to get the vop device instead of virtio device,  which can keep consistent with other dev_is_dma_coherent check.

Thanks
Sherry 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ