[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] cxenstored: wait until after reset to notify dom0less domains


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 19 Oct 2023 08:47:51 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KnhP3zfZNcV37hu5itZ0SOX16z+YvEZfB4Ow62HPw9I=; b=ka2/CNhmiv2c+qJzMTBD92hHIiASXGvI2Ki6FZPHbG9kTLtmDvOa/OxQK6jzMpX52WYfyG+Vtisqxna6LQEonSFlhgFDXXOEsv62MKPc3XnOBf5DmvGKiQkn9vnsE9iFjcV54MQYeayzl4V72hc/q+5gfXgQ+0ipqdqZqkJfYLFEQSfu9ulW4hHar5EYD5v80Q1ckEPq60m7/qt2k9ZRAP1rlz2SqCUgDpo5luJqsylquBYUv+i6D7lQmPfsh87/aQ0KAD6NTuBIjlBlF1pPNZ463RJ1vSD1PG9bs1I/V7iRj9yZRwiLxL415eNBQTRfQVaHIBtF/hLEB6hnjEA/wg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VdJOO4H7fCxpOAU6HCHAJiM8lAfKGVhqragpthUSv6jPp5pLKw1cNbiDk+0BZdcdOFTlDz4OJBrJWRBrBii4Kz001kEa8XAtUI6HL//BkUjxnPXMFm3y7HtPa8rnn1TXHbTDC5Zj1Tw7rxvGP3Jl2MGu5/qiu0MtZm7O+HRmJkvXrbGnqm+729MsjWyw1Go+0tEyXXvpsVVj1pay9iaCUyilA5JP9llg8GSatVFIBWmCK4u0yM0MqTfCk+Fb1pI9e6A82HIg7M5WTpnbSoJbKMILenF/Vh6Ax/EcOxRsqPLITu0bHhPZ5A7DmJX4I8m/PPh+07Cef/YrsylwDuWZJQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: George Dunlap <george.dunlap@xxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxx>, jgross@xxxxxxxx, julien@xxxxxxx, wl@xxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 19 Oct 2023 06:48:01 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 18.10.2023 23:31, Stefano Stabellini wrote:
> On Wed, 17 Oct 2023, Jan Beulich wrote:
>>
>> On 14.10.2023 01:06, Stefano Stabellini wrote:
>>> From: George Dunlap <george.dunlap@xxxxxxxxx>
>>>
>>> Commit fc2b57c9a ("xenstored: send an evtchn notification on
>>> introduce_domain") introduced the sending of an event channel to the
>>> guest when first introduced, so that dom0less domains waiting for the
>>> connection would know that xenstore was ready to use.
>>>
>>> Unfortunately, it was introduced in introduce_domain(), which 1) is
>>> called by other functions, where such functionality is unneeded, and
>>> 2) after the main XS_INTRODUCE call, calls domain_conn_reset().  This
>>> introduces a race condition, whereby if xenstored is delayed, a domain
>>> can wake up, send messages to the buffer, only to have them deleted by
>>> xenstore before finishing its processing of the XS_INTRODUCE message.
>>>
>>> Move the connect-and-notfy call into do_introduce() instead, after the
>>> domain_conn_rest(); predicated on the state being in the
>>> XENSTORE_RECONNECT state.
>>>
>>> (We don't need to check for "restoring", since that value is always
>>> passed as "false" from do_domain_introduce()).
>>>
>>> Also take the opportunity to add a missing wmb barrier after resetting
>>> the indexes of the ring in domain_conn_reset.
>>>
>>> This change will also remove an extra event channel notification for
>>> dom0 (because the notification is now done by do_introduce which is not
>>> called for dom0.) The extra dom0 event channel notification was only
>>> introduced by fc2b57c9a and was never present before. It is not needed
>>> because dom0 is the one to tell xenstored the connection parameters, so
>>> dom0 has to know that the ring page is setup correctly by the time
>>> xenstored starts looking at it. It is dom0 that performs the ring page
>>> init.
>>>
>>> Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxx>
>>> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>
>>
>> Should this have had a Fixes: tag thus marking it to pick up for
>> backport?
> 
> Sorry this was committed already

That's why I used "have had". I still need an answer to the question
though; your reply only hints towards "yes".

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.