Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp332116pxk; Thu, 3 Sep 2020 00:23:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwP9ooRIcZWicFsjPaLbw9jd5DhFHvmpSgdwn4Gw+Nvo1jhuRFWRG7YX2sD77LTo9MNGB84 X-Received: by 2002:a17:906:c043:: with SMTP id bm3mr831711ejb.148.1599117809902; Thu, 03 Sep 2020 00:23:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599117809; cv=none; d=google.com; s=arc-20160816; b=cZ5AgLogu87JnbUV0nCWbOQf+Vczrv243dP1ny5il6G5N1E+hWxHqb4R1YlG6h3jfk ytIPzSv6/eYdtfIG4xyAB9uPC5nWI1YdB8MHZJDV9wK4SHAnq83DivuTAes/Zd7WOj9t DKxUn4S5pgZDV+WeJYFJPop2IsceQI83gIlQ86ierX9q58Yv3uMgXMeE1PNRbTea33qS Hq4qfu5/FD9PAw+XQepCWp5dNIpMO4de9KPNIBte5t6SIUnqMW3oGml2qMzCRjuOdlHH /rNNKnfq3AV2Od9964D2oaGagjMyL0BNAPSRMqXZxAaMAZ1HaJJtiVf8reMq1wDMhGnh b5bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=5iwOFIoUfy2+/HFw6/qnqbLr0eEQ1vfw+sunbp1wqYQ=; b=d5K1byIkF2IX9neM9REdl6tgwKPt00BWZIuiiAS0VEbWGZcZ3F/sgSxj4wAvCimW1l Wr4ibdZAmVOsJO248sPp5yRgd/K3TQ7R5idnOxYNuQxkVwo/x80DMl8T3P0d1V0LKkuY KUM5O9IgygVaxavIPTQpXjDxOAGBK8+/9/YMtYFfH7ju4jz16HrA/M66V7GNnE5UeR5a 6NQFRqrnfk0YT36S0qpK86lXU6G4ZNkdSMJSk40KKyEqmkVneZVkeX/P226sC2cy446G g5TapMOi+NfNBF6IP1TT52QBfRFiKSY3ZhHNsyZnU3HwnPlXfy0U+MU8MLDYzntUFPAn BPzg== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id zn8si1345267ejb.737.2020.09.03.00.23.06; Thu, 03 Sep 2020 00:23:29 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728061AbgICHTI (ORCPT + 99 others); Thu, 3 Sep 2020 03:19:08 -0400 Received: from mga11.intel.com ([192.55.52.93]:50360 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727955AbgICHTI (ORCPT ); Thu, 3 Sep 2020 03:19:08 -0400 IronPort-SDR: s2FJnA7GE+DTIZ46pVz/DiuU7I9DZEA+pi/5aHrUrX96hSPYrS+W5zTYvg08OJqE0uf53yzsTv 0vv8aEQVZF+A== X-IronPort-AV: E=McAfee;i="6000,8403,9732"; a="155036824" X-IronPort-AV: E=Sophos;i="5.76,385,1592895600"; d="scan'208";a="155036824" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Sep 2020 00:19:08 -0700 IronPort-SDR: fTo99JnhqCgFkBUut2syhSAtgp8nnudAzDtvy9C5FvzNlHqF0dG9gg8yaORwLKYvna9eRwj6/8 Pp5RHPpGzBCg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,385,1592895600"; d="scan'208";a="297946856" Received: from unknown (HELO [10.239.154.46]) ([10.239.154.46]) by orsmga003.jf.intel.com with ESMTP; 03 Sep 2020 00:19:03 -0700 Subject: Re: [PATCH] i2c: virtio: add a virtio i2c frontend driver To: Jason Wang , linux-i2c@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org Cc: mst@redhat.com, wsa+renesas@sang-engineering.com, wsa@kernel.org, andriy.shevchenko@linux.intel.com, jarkko.nikula@linux.intel.com, jdelvare@suse.de, Sergey.Semin@baikalelectronics.ru, krzk@kernel.org, rppt@kernel.org, loic.poulain@linaro.org, tali.perry1@gmail.com, bjorn.andersson@linaro.org, shuo.a.liu@intel.com, conghui.chen@intel.com, yu1.wang@intel.com References: <0efc2605c8c06b4b1bf68cbad5536c4a900dc019.1599110284.git.jie.deng@intel.com> From: Jie Deng Message-ID: <6517879c-15d4-6265-761c-626cba9c95d6@intel.com> Date: Thu, 3 Sep 2020 15:19:02 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.0.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/9/3 14:12, Jason Wang wrote: > > On 2020/9/3 下午1:34, Jie Deng wrote: >> Add an I2C bus driver for virtio para-virtualization. >> >> The controller can be emulated by the backend driver in >> any device model software by following the virtio protocol. >> >> This driver communicates with the backend driver through a >> virtio I2C message structure which includes following parts: >> >> - Header: i2c_msg addr, flags, len. >> - Data buffer: the pointer to the i2c msg data. >> - Status: the processing result from the backend. >> >> People may implement different backend drivers to emulate >> different controllers according to their needs. A backend >> example can be found in the device model of the open source >> project ACRN. For more information, please refer to >> https://projectacrn.org. > > > May I know the reason why don't you use i2c or virtio directly? > We don't want to add virtio drivers for every I2C devices in the guests. This bus driver is designed to provide a way to flexibly expose the physical I2C slave devices to the guest without adding or changing the drivers of the I2C slave devices in the guest OS. > >> >> The virtio device ID 34 is used for this I2C adpter since IDs >> before 34 have been reserved by other virtio devices. > > > Is there a link to the spec patch? > > Thanks > I haven't submitted the patch to reserve the ID in spec yet. I write the ID here because I want to see your opinions first. Thanks