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: <DM8PR12MB540077DC5AC4D33D087734E2ABC09@DM8PR12MB5400.namprd12.prod.outlook.com>
Date:   Sun, 15 Jan 2023 11:07:18 +0000
From:   Eli Cohen <elic@...dia.com>
To:     Jason Wang <jasowang@...hat.com>, "mst@...hat.com" <mst@...hat.com>
CC:     "gdawar@....com" <gdawar@....com>,
        "virtualization@...ts.linux-foundation.org" 
        <virtualization@...ts.linux-foundation.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "tanuj.kamde@....com" <tanuj.kamde@....com>
Subject: RE: [PATCH 4/5] vdpa: set dma mask for vDPA device

> From: Jason Wang <jasowang@...hat.com>
> Sent: Wednesday, 11 January 2023 8:28
> To: mst@...hat.com; jasowang@...hat.com
> Cc: Eli Cohen <elic@...dia.com>; gdawar@....com;
> virtualization@...ts.linux-foundation.org; linux-kernel@...r.kernel.org;
> tanuj.kamde@....com
> Subject: [PATCH 4/5] vdpa: set dma mask for vDPA device
> 
> Setting DMA mask for vDPA device in case that there are virtqueue that
> is not backed by DMA so the vDPA device could be advertised as the DMA
> device that is used by DMA API for software emulated virtqueues.
> 
> Signed-off-by: Jason Wang <jasowang@...hat.com>
Reviewed-by: Eli Cohen <elic@...dia.com>
Tested-by: <elic@...dia.com>
> ---
>  drivers/vdpa/vdpa.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/vdpa/vdpa.c b/drivers/vdpa/vdpa.c
> index 8ef7aa1365cc..6821b2850bbb 100644
> --- a/drivers/vdpa/vdpa.c
> +++ b/drivers/vdpa/vdpa.c
> @@ -39,6 +39,11 @@ static int vdpa_dev_probe(struct device *d)
>  	u32 max_num, min_num = 1;
>  	int ret = 0;
> 
> +	d->dma_mask = &d->coherent_dma_mask;
> +	ret = dma_set_mask_and_coherent(d, DMA_BIT_MASK(64));
> +	if (ret)
> +		return ret;
> +
>  	max_num = ops->get_vq_num_max(vdev);
>  	if (ops->get_vq_num_min)
>  		min_num = ops->get_vq_num_min(vdev);
> --
> 2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ