Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3764261pxb; Tue, 17 Nov 2020 03:00:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJyLk6ds7Pz+Gqeq9Yf/7NGrHidS6PwcHN8bcx7Cn9DCKzdOUkYAMGQs3GMMg/BVod6FNVnE X-Received: by 2002:a50:cd0a:: with SMTP id z10mr19707801edi.223.1605610818256; Tue, 17 Nov 2020 03:00:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605610818; cv=none; d=google.com; s=arc-20160816; b=H4ANOGcTYSKX8BZEcTN53R/KBdab3ieqXuYRJEA0NhmFbKEHBhoLjO4cD3hV4Dw9zM 45Zkwe5ovgK5aoQwTTQoIlbAdhD4wyfCfY9gzD55Ao8Q2H5XRzlwhmRfJlHzG7toT0wq Igi8ocXsCBcSv0Sqtk8VEg0KrjlVtFuZbr7L9EW+1C7f+MCLmAn7nCL1IqtRFgkjeCtR dLDQ6nM6C8iAnN3aEdcvuUyF40EGpv7rdIz2cLjqmkciuujJX+0lkbry59sRNsp6+D8k VosiS2aLccUa+7MM7iNOLCNSwu5H1EGq1jq+Q71HHmpU+fnqM/CX3TJC6w1jh4qBhzM5 Ef9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:in-reply-to:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Sef5YC7ElT0CPIu8Xi0KQIpgG9At4z3nHnONcWlaT6I=; b=Eq5p/gLH+JDt93fB/oXj8r5SdQsjIckhgMNInZIjg8WGkbZgpsHhMBd/osmIWd5TPh /RpcFBa2bynC2kEkG0HQAoyZKYM2Hfv9Eo1gnzMu1H/ul60jMVQepmp685RbMXdKA+q9 iRQBoeIW0bim6YzguPP5cwk9qy7qXbedKFh7CAGI1/pV+hs2pzIgaKykRkoGtlvwW1z5 K+nUUxVcK99sq4a6kAh5NEivzn4ptVNHol/Z6Q9O8Tfd56PO3+2YYgIj8FCpTnDCwjvj Zk7vukCDwS6EvcN0YKQJgFYjlfzquEYiYGr7O1O+4nn9vNu2va6Jy2JhtgoYGvgNuzLP YnMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Bm6Q8IJr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id c8si1266633edl.577.2020.11.17.02.59.54; Tue, 17 Nov 2020 03:00:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Bm6Q8IJr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728281AbgKQK5V (ORCPT + 99 others); Tue, 17 Nov 2020 05:57:21 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:43244 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727928AbgKQK5T (ORCPT ); Tue, 17 Nov 2020 05:57:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605610638; 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: in-reply-to:in-reply-to:references:references; bh=Sef5YC7ElT0CPIu8Xi0KQIpgG9At4z3nHnONcWlaT6I=; b=Bm6Q8IJrjOU0k5kViYBmlnx9Sawci0GMjJr8fskqTLRZGvZguaTLpubNiTjhPoUeAJwjYA XPVfnBT2xv39WLxg9/WSlgscHL1LVIfh+igV3gV+9vlI6hnggI3T19YBnLewjUQV4MFHyD DsjLkZQqT9QauxxR8RrFCtF8lwpcExc= 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-65-CLA16zfPMwG3lzZ5nu0hvg-1; Tue, 17 Nov 2020 05:57:15 -0500 X-MC-Unique: CLA16zfPMwG3lzZ5nu0hvg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A255B8030BD; Tue, 17 Nov 2020 10:57:14 +0000 (UTC) Received: from localhost (ovpn-113-172.ams2.redhat.com [10.36.113.172]) by smtp.corp.redhat.com (Postfix) with ESMTP id 16B645B4AA; Tue, 17 Nov 2020 10:57:10 +0000 (UTC) Date: Tue, 17 Nov 2020 10:57:09 +0000 From: Stefan Hajnoczi To: Stefano Garzarella Cc: virtualization@lists.linux-foundation.org, Laurent Vivier , linux-kernel@vger.kernel.org, Eli Cohen , Jason Wang , "Michael S. Tsirkin" , Max Gurtovoy Subject: Re: [PATCH RFC 01/12] vhost-vdpa: add support for vDPA blk devices Message-ID: <20201117105709.GC131917@stefanha-x1.localdomain> References: <20201113134712.69744-1-sgarzare@redhat.com> <20201113134712.69744-2-sgarzare@redhat.com> MIME-Version: 1.0 In-Reply-To: <20201113134712.69744-2-sgarzare@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=stefanha@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7gGkHNMELEOhSGF6" Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --7gGkHNMELEOhSGF6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 13, 2020 at 02:47:01PM +0100, Stefano Garzarella wrote: > diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c > index 2754f3069738..fb0411594963 100644 > --- a/drivers/vhost/vdpa.c > +++ b/drivers/vhost/vdpa.c > @@ -22,6 +22,7 @@ > #include > #include > #include > +#include > =20 > #include "vhost.h" > =20 > @@ -194,6 +195,9 @@ static int vhost_vdpa_config_validate(struct vhost_vd= pa *v, > =09case VIRTIO_ID_NET: > =09=09size =3D sizeof(struct virtio_net_config); > =09=09break; > +=09case VIRTIO_ID_BLOCK: > +=09=09size =3D sizeof(struct virtio_blk_config); > +=09=09break; > =09} > =20 > =09if (c->len =3D=3D 0) Can vdpa_config_ops->get/set_config() handle the size check instead of hardcoding device-specific knowledge into drivers/vhost/vdpa.c? --7gGkHNMELEOhSGF6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAl+zrIUACgkQnKSrs4Gr c8gvowf/Wpwi/uMVifoS0NwyRCe5/CVH7tVJdmGYKpQ0EOCpn9vsgvZ+nD+xnnf5 6X8eiwurchLDat2lMMlWEupsa4ThfFqlLeRIvoGzlIhyc0bJfS3BfhAF+K/dFYhb UtOzecblfCtEbcTb2wNicHsz3M1wdxW8T04y0vD8vxQRJN3SFvUqa6fxToU9Z4ji np403zzsVijvNfZf1c204D5oUBr9OR8TXJldXrGPXdp0yTglBi6ZLeicuCiN6Mr5 RHES2SztSo5XrXAoIgI/JZsKgFWCCnYdpJxOt+WUuJVH5PyxhX+57fDLQxZiOXF0 7TVh+myYaXRw0joEJZuSu/zKU0uGzQ== =Mbol -----END PGP SIGNATURE----- --7gGkHNMELEOhSGF6--