Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp284847ybb; Thu, 9 Apr 2020 23:22:23 -0700 (PDT) X-Google-Smtp-Source: APiQypKq4PE+VNL/cMn1v9CaB3VH6LMkWvvQgn0V09hPZ3q0e3w27miS3z65ya8vh6pvng5c8aZC X-Received: by 2002:a37:8781:: with SMTP id j123mr2664998qkd.308.1586499743098; Thu, 09 Apr 2020 23:22:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586499743; cv=none; d=google.com; s=arc-20160816; b=v/nGV77C/PGXvtuwgcJZi0NrZEWCdAyC2lkdVESibBNIcm5xLDQCQE81vlJa2NrBcR 9OSMifJASVA16d+rVB4EL7SrjarXrKCUZkWPOx6ivSjt9ak46F7sRQUpvRLgSxcRAzi4 jF7PhVgCVkpQnjX91OxhOgCNULGvyi2LxV/2LrTG9u7kVIQFlAA4VhFnQ58d7M2MkM+R 2f/eHlETd/xprxSQKswmqmsNf6bX9ZdKZJe6eppKxxDyejvIPrQuKKE5c1EsBOKDm6Pk +LPsvcoIYeDt4piKnNNL77QL97y7p4DgpSMH0caD9Paj8kVuRA5wszGtcNwuuqiDFpWF CzmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=DLUdw7D/EcbCC4PhngbwYSwRK7VO2nDFahJzRTXLZAM=; b=yqe3gvqE/eddNMJXrVuz1cL+kGCymXfx6G+e4bol/eZuqgXAybzJeR8RU/QpcRMG15 2PjRvgZo/yfjnXNGTD3r3mM474qzCeQ22ANa/JwcxX+Egf8wH7bG6lrt1NjoH9HlSQ/H GPViQVy8qMqDJOkUc/fu6xfIPNoam0zDkk0wRSwswlt6YLSIJMwQAUupZ9JAFU6KHeFG 6D0lUcUh4Gas4wknSiW7CXg2NLHcFSVLvJ12pe1cuGutEFzGhkj2guXQpfLpNBqlC+aU W+ADlFSFuAmZcx21mxGPTcBr6+jSAAJP8ryvtuGk0B0hcYjTtWnKwnWeo64y+lyUvK7q nWKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TFFrSyPo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g15si528203qvo.84.2020.04.09.23.22.00; Thu, 09 Apr 2020 23:22:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TFFrSyPo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725913AbgDJGVM (ORCPT + 99 others); Fri, 10 Apr 2020 02:21:12 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:24977 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725816AbgDJGVM (ORCPT ); Fri, 10 Apr 2020 02:21:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586499671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DLUdw7D/EcbCC4PhngbwYSwRK7VO2nDFahJzRTXLZAM=; b=TFFrSyPoUCnUp6hzx0dGjuASu5xVSHh6Z1chCX7WBeJc0arRHh3Fu79Ces/7pQtwLJs/kQ 5+i/HxvMefdm1/4RIau4L9upJk6Wu+n6Jb9I2vpAzk/9lSDGBkBTxzpb5PEROQfL2+5hdG Leo5CZ9T+s+FVLiB+Rb3c9TyasjVdTY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-502-Wi1lpvTxPdOy0zhbrDjSmg-1; Fri, 10 Apr 2020 02:21:09 -0400 X-MC-Unique: Wi1lpvTxPdOy0zhbrDjSmg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3C15D1005513; Fri, 10 Apr 2020 06:21:08 +0000 (UTC) Received: from [10.72.12.205] (ovpn-12-205.pek2.redhat.com [10.72.12.205]) by smtp.corp.redhat.com (Postfix) with ESMTP id CA521272A6; Fri, 10 Apr 2020 06:21:03 +0000 (UTC) Subject: Re: [PATCH] vdpa: allow a 32 bit vq alignment To: "Michael S. Tsirkin" , linux-kernel@vger.kernel.org Cc: Arnd Bergmann , virtualization@lists.linux-foundation.org, "Zhu, Lingshan" References: <20200409202825.10115-1-mst@redhat.com> From: Jason Wang Message-ID: Date: Fri, 10 Apr 2020 14:21:01 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20200409202825.10115-1-mst@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Cc Ling Shan. On 2020/4/10 =E4=B8=8A=E5=8D=884:28, Michael S. Tsirkin wrote: > get_vq_align returns u16 now, but that's not enough for > systems/devices with 64K pages. All callers assign it to > a u32 variable anyway, so let's just change the return > value type to u32. > > Cc: "Zhu, Lingshan" > Reported-by: Arnd Bergmann > Signed-off-by: Michael S. Tsirkin > --- > drivers/vdpa/ifcvf/ifcvf_main.c | 2 +- > drivers/vdpa/vdpa_sim/vdpa_sim.c | 2 +- > include/linux/vdpa.h | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/vdpa/ifcvf/ifcvf_main.c b/drivers/vdpa/ifcvf/ifcvf= _main.c > index 28d9e5de5675..abf6a061cab6 100644 > --- a/drivers/vdpa/ifcvf/ifcvf_main.c > +++ b/drivers/vdpa/ifcvf/ifcvf_main.c > @@ -226,7 +226,7 @@ static u32 ifcvf_vdpa_get_vendor_id(struct vdpa_dev= ice *vdpa_dev) > return IFCVF_SUBSYS_VENDOR_ID; > } > =20 > -static u16 ifcvf_vdpa_get_vq_align(struct vdpa_device *vdpa_dev) > +static u32 ifcvf_vdpa_get_vq_align(struct vdpa_device *vdpa_dev) > { > return IFCVF_QUEUE_ALIGNMENT; > } > diff --git a/drivers/vdpa/vdpa_sim/vdpa_sim.c b/drivers/vdpa/vdpa_sim/v= dpa_sim.c > index 72863d01a12a..7957d2d41fc4 100644 > --- a/drivers/vdpa/vdpa_sim/vdpa_sim.c > +++ b/drivers/vdpa/vdpa_sim/vdpa_sim.c > @@ -435,7 +435,7 @@ static u64 vdpasim_get_vq_state(struct vdpa_device = *vdpa, u16 idx) > return vrh->last_avail_idx; > } > =20 > -static u16 vdpasim_get_vq_align(struct vdpa_device *vdpa) > +static u32 vdpasim_get_vq_align(struct vdpa_device *vdpa) > { > return VDPASIM_QUEUE_ALIGN; > } > diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h > index 733acfb7ef84..5453af87a33e 100644 > --- a/include/linux/vdpa.h > +++ b/include/linux/vdpa.h > @@ -164,7 +164,7 @@ struct vdpa_config_ops { > u64 (*get_vq_state)(struct vdpa_device *vdev, u16 idx); > =20 > /* Device ops */ > - u16 (*get_vq_align)(struct vdpa_device *vdev); > + u32 (*get_vq_align)(struct vdpa_device *vdev); > u64 (*get_features)(struct vdpa_device *vdev); > int (*set_features)(struct vdpa_device *vdev, u64 features); > void (*set_config_cb)(struct vdpa_device *vdev,