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: <42989b66-9d53-cc2e-4d8e-5a93aad2efa1@redhat.com>
Date:   Mon, 30 Nov 2020 11:07:08 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     Stefano Garzarella <sgarzare@...hat.com>,
        virtualization@...ts.linux-foundation.org
Cc:     Stefan Hajnoczi <stefanha@...hat.com>,
        linux-kernel@...r.kernel.org, Laurent Vivier <lvivier@...hat.com>,
        Max Gurtovoy <mgurtovoy@...dia.com>,
        "Michael S. Tsirkin" <mst@...hat.com>, Eli Cohen <elic@...dia.com>
Subject: Re: [PATCH v2 04/17] vdpa_sim: remove the limit of IOTLB entries


On 2020/11/26 下午10:49, Stefano Garzarella wrote:
> The simulated devices can support multiple queues, so this limit
> should be defined according to the number of queues supported by
> the device.
>
> Since we are in a simulator, let's simply remove that limit.
>
> Suggested-by: Jason Wang <jasowang@...hat.com>
> Acked-by: Jason Wang <jasowang@...hat.com>
> Signed-off-by: Stefano Garzarella <sgarzare@...hat.com>
> ---
> v2:
> - added VDPASIM_IOTLB_LIMIT macro [Jason]


Sorry for being unclear. I meant adding a macro like

VHOST_IOTLB_UNLIMITED 0 in vhost_iotlb.h.

And use that in vdpa_sim.

Thanks


> ---
>   drivers/vdpa/vdpa_sim/vdpa_sim.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/vdpa_sim.c
> index ad72f7b1a4eb..40664d87f303 100644
> --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c
> +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c
> @@ -46,6 +46,7 @@ struct vdpasim_virtqueue {
>   #define VDPASIM_QUEUE_MAX 256
>   #define VDPASIM_DEVICE_ID 0x1
>   #define VDPASIM_VENDOR_ID 0
> +#define VDPASIM_IOTLB_LIMIT 0 /* unlimited */
>   #define VDPASIM_VQ_NUM 0x2
>   #define VDPASIM_NAME "vdpasim-netdev"
>   
> @@ -365,7 +366,7 @@ static struct vdpasim *vdpasim_create(void)
>   	if (!vdpasim->vqs)
>   		goto err_iommu;
>   
> -	vdpasim->iommu = vhost_iotlb_alloc(2048, 0);
> +	vdpasim->iommu = vhost_iotlb_alloc(VDPASIM_IOTLB_LIMIT, 0);
>   	if (!vdpasim->iommu)
>   		goto err_iommu;
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ