From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: virtio-comment-return-1498-cohuck=redhat.com@lists.oasis-open.org Sender: List-Post: List-Help: List-Unsubscribe: List-Subscribe: References: <61930337391bdfd23ed164288d998c04177bc839.1603435652.git.jie.deng@intel.com> <20201023115932-mutt-send-email-mst@kernel.org> <20201027071957-mutt-send-email-mst@kernel.org> From: Jie Deng Message-ID: Date: Thu, 5 Nov 2020 14:35:08 +0800 MIME-Version: 1.0 In-Reply-To: Subject: [virtio-comment] Re: [virtio-dev] Re: [PATCH v2] virtio-i2c: add the device specification Content-Type: multipart/alternative; boundary="------------A9E8011E07C5A01F1817F4DD" Content-Language: en-US To: Paolo Bonzini Cc: virtio-comment@lists.oasis-open.org, virtio-dev@lists.oasis-open.org, stefanha@redhat.com, Cornelia Huck , "Michael S. Tsirkin" List-ID: --------------A9E8011E07C5A01F1817F4DD Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 2020/10/31 21:58, Paolo Bonzini wrote: > On 27/10/20 12:20, Michael S. Tsirkin wrote: >>> The I2C doesn't support segments numbering and sorting. >>> So if one creates a multi-segment transaction, then he/she should keep the >>> segments in order. >>> >>> Thanks. >> Fine, but I see no flags to signal start/end of such a transaction. >> > In theory there's no difference between one multi-segment transaction > and many single-segment transactions _in a single-master scenario_. > > However, it is a plausible configuration to have multiple guests sharing > an I2C host device as if they were multiple master. > > For this reason, I would prefer to have at least support for > transactions with 1 write and 1 read segment to the same address (see my > other message). > > Paolo Then how to distinguish the order of the two segments if they are in one request ? We don't know this is a write followed by a read or a read followed by a write in this case. However, if the request is the representation of only one segment of an I2C transaction, we can simply judge by the order of the requests in the virtqueue. Thanks --------------A9E8011E07C5A01F1817F4DD Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit


On 2020/10/31 21:58, Paolo Bonzini wrote:
On 27/10/20 12:20, Michael S. Tsirkin wrote:
The I2C doesn't support segments numbering and sorting.
So if one creates a multi-segment transaction, then he/she should keep the
segments in order.

Thanks.
Fine, but I see no flags to signal start/end of such a transaction.

In theory there's no difference between one multi-segment transaction
and many single-segment transactions _in a single-master scenario_.

However, it is a plausible configuration to have multiple guests sharing
an I2C host device as if they were multiple master.

For this reason, I would prefer to have at least support for
transactions with 1 write and 1 read segment to the same address (see my
other message).

Paolo
Then how to distinguish the order of the two segments if they are in one request ?
We don't know this is a write followed by a read or a read followed by a write in this case.

However, if the request is the representation of only one segment of an I2C transaction,
we can simply judge by the order of the requests in the virtqueue.

Thanks


    
--------------A9E8011E07C5A01F1817F4DD--