Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C53CC83000 for ; Tue, 28 Apr 2020 12:56:24 +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 03234206D6 for ; Tue, 28 Apr 2020 12:56:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 03234206D6 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 1jTPmT-0005q3-8s; Tue, 28 Apr 2020 12:56:09 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jTPmR-0005py-TM for xen-devel@lists.xenproject.org; Tue, 28 Apr 2020 12:56:07 +0000 X-Inumbo-ID: 9f994ee0-894f-11ea-9854-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 9f994ee0-894f-11ea-9854-12813bfff9fa; Tue, 28 Apr 2020 12:56:06 +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 6534DAC6C; Tue, 28 Apr 2020 12:56:04 +0000 (UTC) Subject: Re: [PATCH v4] docs/designs: re-work the xenstore migration document... To: paul@xen.org, 'Julien Grall' , xen-devel@lists.xenproject.org References: <20200427155035.668-1-paul@xen.org> <7ab25832-66e6-020f-b343-059f21771054@xen.org> <2087b3dd-7d2c-3ab3-d6ce-a4d132f7ec4d@xen.org> <000c01d61d5b$00bc05c0$02341140$@xen.org> From: =?UTF-8?B?SsO8cmdlbiBHcm/Dnw==?= Message-ID: Date: Tue, 28 Apr 2020 14:56:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <000c01d61d5b$00bc05c0$02341140$@xen.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit 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: 'Stefano Stabellini' , 'Wei Liu' , 'Andrew Cooper' , 'Paul Durrant' , 'Ian Jackson' , 'George Dunlap' , 'Jan Beulich' Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On 28.04.20 14:46, Paul Durrant wrote: >> -----Original Message----- >> From: Julien Grall >> Sent: 28 April 2020 11:23 >> To: Jürgen Groß ; Paul Durrant ; xen-devel@lists.xenproject.org >> Cc: Paul Durrant ; Andrew Cooper ; George Dunlap >> ; Ian Jackson ; Jan Beulich ; >> Stefano Stabellini ; Wei Liu >> Subject: Re: [PATCH v4] docs/designs: re-work the xenstore migration document... >> >> Hi Juergen, >> >> On 28/04/2020 11:10, Jürgen Groß wrote: >>> On 28.04.20 11:05, Julien Grall wrote: >>>>> -where tx_id is the non-zero identifier values of an open transaction. >>>>> +| Field | Description | >>>>> +|-----------|---------------------------------------------------| >>>>> +| `domid` | The domain-id that owns the shared page | >>>>> +| | | >>>>> +| `tdomid` | The domain-id that `domid` acts on behalf of if | >>>>> +| | 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 | >>>>> +| | | >>>>> +| `mfn` | The MFN of the shared page for a live update or | >>>>> +| | ~0 (i.e. all bits set) otherwise | >>>>> -### Protocol Extension >>>>> +Since the ABI guarantees that entry 1 in `domid`'s grant table will >>>>> always >>>>> +contain the GFN of the shared page, so for a live update `mfn` can >>>>> be used to >>>>> +give confidence that `domid` has not been re-cycled during the update. >>>> >>>> I am confused, there is no way a XenStored running in an Arm domain >>>> can map the MFN of the shared page. So how is this going to work out? >>> >>> I guess this will be a MFN for PV guests and a guest PFN else. >> >> If we use Xen terminology (xen/include/xen/mm.h), this would be a GFN. >> > > TBH I'm not sure a GFN would give much confidence about domain recycling as it would likely be the same for many domains, I think. We really need a UUID. No, we need a per-host domain value, which is associated with a domain and which is unique during the life-time of the host. E.g. a global counter, which is incremented at each domain creation and stored in struct domain. Juergen