From patchwork Wed May 20 10:16:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 11559935 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AC1CF14C0 for ; Wed, 20 May 2020 10:17:00 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 91410207D3 for ; Wed, 20 May 2020 10:17:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 91410207D3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jbLlj-0001W8-Mg; Wed, 20 May 2020 10:16:11 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jbLli-0001W3-Jr for xen-devel@lists.xenproject.org; Wed, 20 May 2020 10:16:10 +0000 X-Inumbo-ID: ec8d1d96-9a82-11ea-b07b-bc764e2007e4 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ec8d1d96-9a82-11ea-b07b-bc764e2007e4; Wed, 20 May 2020 10:16:09 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 431F8B1F2; Wed, 20 May 2020 10:16:11 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xenproject.org Subject: [PATCH] docs: update xenstore-migration.md Date: Wed, 20 May 2020 12:16:05 +0200 Message-Id: <20200520101605.4263-1-jgross@suse.com> X-Mailer: git-send-email 2.26.1 MIME-Version: 1.0 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Stefano Stabellini , Julien Grall , Wei Liu , Andrew Cooper , Ian Jackson , George Dunlap , Jan Beulich Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Update connection record details: make flags common for sockets and domains, and add pending incoming data. Signed-off-by: Juergen Gross Reviewed-by: Paul Durrant Reviewed-by: Julien Grall --- docs/designs/xenstore-migration.md | 63 ++++++++++++++++-------------- 1 file changed, 34 insertions(+), 29 deletions(-) diff --git a/docs/designs/xenstore-migration.md b/docs/designs/xenstore-migration.md index 34a2afd17e..e361d6b5e7 100644 --- a/docs/designs/xenstore-migration.md +++ b/docs/designs/xenstore-migration.md @@ -147,31 +147,45 @@ the domain being migrated. ``` 0 1 2 3 4 5 6 7 octet +-------+-------+-------+-------+-------+-------+-------+-------+ -| conn-id | conn-type | conn-spec +| conn-id | conn-type | flags | ++-------------------------------+---------------+---------------+ +| conn-spec ... +-------------------------------+-------------------------------+ -| data-len | data -+-------------------------------+ +| in-data-len | out-data-len | ++-------------------------------+-------------------------------+ +| data ... ``` -| Field | Description | -|-------------|-------------------------------------------------| -| `conn-id` | A non-zero number used to identify this | -| | connection in subsequent connection-specific | -| | records | -| | | -| `conn-type` | 0x0000: shared ring | -| | 0x0001: socket | -| | 0x0002 - 0xFFFF: reserved for future use | -| | | -| `conn-spec` | See below | -| | | -| `data-len` | The length (in octets) of any pending data not | -| | yet written to the connection | -| | | -| `data` | Pending data (may be empty) | +| Field | Description | +|----------------|----------------------------------------------| +| `conn-id` | A non-zero number used to identify this | +| | connection in subsequent connection-specific | +| | records | +| | | +| `flags` | A bit-wise OR of: | +| | 0001: read-only | +| | | +| `conn-type` | 0x0000: shared ring | +| | 0x0001: socket | +| | 0x0002 - 0xFFFF: reserved for future use | +| | | +| `conn-spec` | See below | +| | | +| `in-data-len` | The length (in octets) of any data read | +| | from the connection not yet processed | +| | | +| `out-data-len` | The length (in octets) of any pending data | +| | not yet written to the connection | +| | | +| `data` | Pending data, first read data, then written | +| | data (any of both may be empty) | + +In case of live update the connection record for the connection via which +the live update command was issued will contain the response for the live +update command in the pending write data. The format of `conn-spec` is dependent upon `conn-type`. @@ -182,8 +196,6 @@ For `shared ring` connections it is as follows: ``` 0 1 2 3 4 5 6 7 octet - +-------+-------+ - | flags | +---------------+---------------+---------------+---------------+ | domid | tdomid | evtchn | +-------------------------------+-------------------------------+ @@ -198,8 +210,6 @@ For `shared ring` connections it is as follows: | | it has been subject to an SET_TARGET | | | operation [2] or DOMID_INVALID [3] otherwise | | | | -| `flags` | Must be zero | -| | | | `evtchn` | The port number of the interdomain channel used | | | by `domid` to communicate with xenstored | | | | @@ -211,8 +221,6 @@ For `socket` connections it is as follows: ``` - +-------+-------+ - | flags | +---------------+---------------+---------------+---------------+ | socket-fd | pad | +-------------------------------+-------------------------------+ @@ -221,9 +229,6 @@ For `socket` connections it is as follows: | Field | Description | |-------------|-------------------------------------------------| -| `flags` | A bit-wise OR of: | -| | 0001: read-only | -| | | | `socket-fd` | The file descriptor of the connected socket | This type of connection is only relevant for live update, where the xenstored @@ -398,4 +403,4 @@ explanation of node permissions. [3] See https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/include/public/xen.h;hb=HEAD#l612 -[4] https://wiki.xen.org/wiki/XenBus \ No newline at end of file +[4] https://wiki.xen.org/wiki/XenBus