Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp520210pxv; Thu, 1 Jul 2021 03:35:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMeZkwFkgWoPpu/A03BwflzOERYoF8VOp+K750UzYkGVmKiqaTzYhdX+d+bXT3ZfTNUSBf X-Received: by 2002:a5d:960b:: with SMTP id w11mr12068608iol.138.1625135736164; Thu, 01 Jul 2021 03:35:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625135736; cv=none; d=google.com; s=arc-20160816; b=L+h6L2TyCB6VXXYGK5i1cqUBBkdKutoUACWnV71iKKv+l9qltp2Yds8gV1YvpCe40T Ml+l5hzPiMe5snNfOIU1V8vDXrD+tZuKn+2j+iAQ4DCXzYui2weg9nVp8P+eKHHmTSbN ipxxqu9MY+Pds5IQ4eMCZFvOisifk+TOyL5jo/ye0jl6tQeQwzzpHoBTYc7ndJz/zSVR z9mqy2cZ9+uxiY5YoXK+waAMCh7oMZzJScHCEu3Tl3iprp8AcbwbnyhYCcuo2MTf9k81 +lh9CKdNq0lr/ZX1N44kSnMHAbBZ6ROkGhKAVetDGRln1tescIL2Fg6mPHeNS7usU+4G jIEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=1YnEfqIAg/Qf9+nKWeuFTP+Rlyf2x224+KDT+hllQM8=; b=GVwC/DnGYbRMBBEQeSfEpSqG14irGm46UpxN4n+5TNjqMZmBa4ZQwE+v04PNluMPjZ t7VMBZsKnS4pZPbg+XDokO11Wxf9UlFzDVvnrSLMoyzmJvjqn+gfYhB5uMH6ftSvtX0a CV7r6oheFea8HSJbhrBaWBsd95PqVUQWevTlX1N9Dnri2vW6fxe2rAzLCSyDtKmOXiex Ogh8L44CodEYsXaGcPOIxaBbvlE98+QfxQkUryXk7SW583kTI2z+YBecYG7cUG/AQsfs TjEef2q+/KQEHJ6t+6cZWyNI7Cn4Mm0NtgAuhGL1lAOrJ+2AAupVGlbpCfDdw1VQz6fY 0A6A== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e6si6176247iov.1.2021.07.01.03.35.22; Thu, 01 Jul 2021 03:35:36 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235991AbhGAKgr (ORCPT + 99 others); Thu, 1 Jul 2021 06:36:47 -0400 Received: from foss.arm.com ([217.140.110.172]:50958 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235300AbhGAKgr (ORCPT ); Thu, 1 Jul 2021 06:36:47 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 79C9AD6E; Thu, 1 Jul 2021 03:34:16 -0700 (PDT) Received: from e120937-lin (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D7B223F718; Thu, 1 Jul 2021 03:34:12 -0700 (PDT) Date: Thu, 1 Jul 2021 11:34:06 +0100 From: Cristian Marussi To: Peter Hilber Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, virtualization@lists.linux-foundation.org, virtio-dev@lists.oasis-open.org, sudeep.holla@arm.com, james.quinlan@broadcom.com, Jonathan.Cameron@Huawei.com, f.fainelli@gmail.com, etienne.carriere@linaro.org, vincent.guittot@linaro.org, souvik.chakravarty@arm.com, igor.skalkin@opensynergy.com, alex.bennee@linaro.org, jean-philippe@linaro.org, mikhail.golubev@opensynergy.com, anton.yakovlev@opensynergy.com, Vasyl.Vavrychuk@opensynergy.com, Andriy.Tryshnivskyy@opensynergy.com Subject: Re: [PATCH v4 14/16] firmware: arm_scmi: Add virtio transport Message-ID: <20210701103406.GE17807@e120937-lin> References: <20210611165937.701-1-cristian.marussi@arm.com> <20210611165937.701-15-cristian.marussi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Jul 01, 2021 at 10:43:07AM +0200, Peter Hilber wrote: > On 11.06.21 18:59, Cristian Marussi wrote: > > > > > +static struct virtio_driver virtio_scmi_driver = { > > + .driver.name = "scmi-virtio", > > + .driver.owner = THIS_MODULE, > > + .feature_table = features, > > + .feature_table_size = ARRAY_SIZE(features), > > + .id_table = id_table, > > + .probe = scmi_vio_probe, > > + .remove = scmi_vio_remove, > > +}; > > + > > It might be good to also check for the VIRTIO_F_VERSION_1 feature bit in the > optional .validate op (not yet implemented above), as some other devices do > (quoting virtio-snd in the following): > Ah, thanks for pointing that out, I'll do because indeed in my hackish emulation test-setup I forgot to emulate that bit and everything fall flat. > > /** > > * virtsnd_validate() - Validate if the device can be started. > > * @vdev: VirtIO parent device. > > * > > * Context: Any context. > > * Return: 0 on success, -EINVAL on failure. > > */ > > static int virtsnd_validate(struct virtio_device *vdev) > > { > > > > > > > if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) { > > dev_err(&vdev->dev, > > "device does not comply with spec version 1.x\n"); > > return -EINVAL; > > } > > > > > > > > > static struct virtio_driver virtsnd_driver = { > > .driver.name = KBUILD_MODNAME, > > .driver.owner = THIS_MODULE, > > .id_table = id_table, > > .validate = virtsnd_validate, > > (end of virtio-snd quote) Thanks, Cristian